@gravitee/graphene-charts 3.22.0 → 3.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +335 -251
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2285,7 +2285,91 @@ var Ht = W(({ variant: e = "brand", ...t }, n) => e === "mono" ? /* @__PURE__ */
|
|
|
2285
2285
|
]
|
|
2286
2286
|
}));
|
|
2287
2287
|
Ht.displayName = "TogetherAiIcon";
|
|
2288
|
-
var Ut = W((e, t) => {
|
|
2288
|
+
var Ut = W(({ variant: e, ...t }, n) => {
|
|
2289
|
+
let r = K();
|
|
2290
|
+
return /* @__PURE__ */ X("svg", {
|
|
2291
|
+
ref: n,
|
|
2292
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2293
|
+
width: 24,
|
|
2294
|
+
height: 24,
|
|
2295
|
+
viewBox: "0 0 600 600",
|
|
2296
|
+
fill: "none",
|
|
2297
|
+
...t,
|
|
2298
|
+
children: [
|
|
2299
|
+
/* @__PURE__ */ X("g", {
|
|
2300
|
+
className: "dark:hidden",
|
|
2301
|
+
clipPath: `url(#${r}-a)`,
|
|
2302
|
+
children: [
|
|
2303
|
+
/* @__PURE__ */ Y("rect", {
|
|
2304
|
+
width: "600",
|
|
2305
|
+
height: "600",
|
|
2306
|
+
fill: "#FFFFFF"
|
|
2307
|
+
}),
|
|
2308
|
+
/* @__PURE__ */ Y("path", {
|
|
2309
|
+
fill: "#000000",
|
|
2310
|
+
d: "M900.551 99.7843C804.619 107.606 427.549 154.353 166.092 417.192H69.0684L79.9091 406.388C134.623 353.529 376.727 129.506 900.551 99.4932V99.7843Z"
|
|
2311
|
+
}),
|
|
2312
|
+
/* @__PURE__ */ Y("path", {
|
|
2313
|
+
fill: "#000000",
|
|
2314
|
+
d: "M572.178 417.192H496.133L346.301 308.126C360.108 299.443 374.004 291.173 387.943 283.297L572.178 417.192Z"
|
|
2315
|
+
}),
|
|
2316
|
+
/* @__PURE__ */ Y("path", {
|
|
2317
|
+
fill: "#000000",
|
|
2318
|
+
d: "M450.645 417.193H374.634L351.576 400.422H222.839C231.902 392.374 241.077 384.561 250.349 376.977H319.308L283.623 351.019C296.378 341.528 309.274 332.437 322.274 323.728L450.645 417.193Z"
|
|
2319
|
+
}),
|
|
2320
|
+
/* @__PURE__ */ Y("path", {
|
|
2321
|
+
fill: "#000000",
|
|
2322
|
+
d: "M173.984 216.084L232.598 258.681C218.01 267.271 204.357 275.774 191.613 284.091L98.0385 216.047L173.984 216.084Z"
|
|
2323
|
+
})
|
|
2324
|
+
]
|
|
2325
|
+
}),
|
|
2326
|
+
/* @__PURE__ */ X("g", {
|
|
2327
|
+
className: "hidden dark:block",
|
|
2328
|
+
clipPath: `url(#${r}-b)`,
|
|
2329
|
+
children: [
|
|
2330
|
+
/* @__PURE__ */ Y("rect", {
|
|
2331
|
+
width: "600",
|
|
2332
|
+
height: "600",
|
|
2333
|
+
fill: "#000000"
|
|
2334
|
+
}),
|
|
2335
|
+
/* @__PURE__ */ Y("path", {
|
|
2336
|
+
fill: "#FFFFFF",
|
|
2337
|
+
d: "M900.551 99.7843C804.619 107.606 427.549 154.353 166.092 417.192H69.0684L79.9091 406.388C134.623 353.529 376.727 129.506 900.551 99.4932V99.7843Z"
|
|
2338
|
+
}),
|
|
2339
|
+
/* @__PURE__ */ Y("path", {
|
|
2340
|
+
fill: "#FFFFFF",
|
|
2341
|
+
d: "M572.178 417.192H496.133L346.301 308.126C360.108 299.443 374.004 291.173 387.943 283.297L572.178 417.192Z"
|
|
2342
|
+
}),
|
|
2343
|
+
/* @__PURE__ */ Y("path", {
|
|
2344
|
+
fill: "#FFFFFF",
|
|
2345
|
+
d: "M450.645 417.193H374.634L351.576 400.422H222.839C231.902 392.374 241.077 384.561 250.349 376.977H319.308L283.623 351.019C296.378 341.528 309.274 332.437 322.274 323.728L450.645 417.193Z"
|
|
2346
|
+
}),
|
|
2347
|
+
/* @__PURE__ */ Y("path", {
|
|
2348
|
+
fill: "#FFFFFF",
|
|
2349
|
+
d: "M173.984 216.084L232.598 258.681C218.01 267.271 204.357 275.774 191.613 284.091L98.0385 216.047L173.984 216.084Z"
|
|
2350
|
+
})
|
|
2351
|
+
]
|
|
2352
|
+
}),
|
|
2353
|
+
/* @__PURE__ */ X("defs", { children: [/* @__PURE__ */ Y("clipPath", {
|
|
2354
|
+
id: `${r}-a`,
|
|
2355
|
+
children: /* @__PURE__ */ Y("rect", {
|
|
2356
|
+
width: "600",
|
|
2357
|
+
height: "600",
|
|
2358
|
+
fill: "#FFFFFF"
|
|
2359
|
+
})
|
|
2360
|
+
}), /* @__PURE__ */ Y("clipPath", {
|
|
2361
|
+
id: `${r}-b`,
|
|
2362
|
+
children: /* @__PURE__ */ Y("rect", {
|
|
2363
|
+
width: "600",
|
|
2364
|
+
height: "600",
|
|
2365
|
+
fill: "#FFFFFF"
|
|
2366
|
+
})
|
|
2367
|
+
})] })
|
|
2368
|
+
]
|
|
2369
|
+
});
|
|
2370
|
+
});
|
|
2371
|
+
Ut.displayName = "XaiIcon";
|
|
2372
|
+
var Wt = W((e, t) => {
|
|
2289
2373
|
let n = K();
|
|
2290
2374
|
return /* @__PURE__ */ X("svg", {
|
|
2291
2375
|
ref: t,
|
|
@@ -2510,8 +2594,8 @@ var Ut = W((e, t) => {
|
|
|
2510
2594
|
})]
|
|
2511
2595
|
});
|
|
2512
2596
|
});
|
|
2513
|
-
|
|
2514
|
-
var
|
|
2597
|
+
Wt.displayName = "GioAgentManagementIcon";
|
|
2598
|
+
var Gt = W((e, t) => {
|
|
2515
2599
|
let n = K();
|
|
2516
2600
|
return /* @__PURE__ */ X("svg", {
|
|
2517
2601
|
ref: t,
|
|
@@ -2749,8 +2833,8 @@ var Wt = W((e, t) => {
|
|
|
2749
2833
|
})]
|
|
2750
2834
|
});
|
|
2751
2835
|
});
|
|
2752
|
-
|
|
2753
|
-
var
|
|
2836
|
+
Gt.displayName = "GioApiManagementIcon";
|
|
2837
|
+
var Kt = W((e, t) => {
|
|
2754
2838
|
let n = K();
|
|
2755
2839
|
return /* @__PURE__ */ X("svg", {
|
|
2756
2840
|
ref: t,
|
|
@@ -2877,8 +2961,8 @@ var Gt = W((e, t) => {
|
|
|
2877
2961
|
})]
|
|
2878
2962
|
});
|
|
2879
2963
|
});
|
|
2880
|
-
|
|
2881
|
-
var
|
|
2964
|
+
Kt.displayName = "GioAuthorizationIcon";
|
|
2965
|
+
var qt = W((e, t) => {
|
|
2882
2966
|
let n = K();
|
|
2883
2967
|
return /* @__PURE__ */ X("svg", {
|
|
2884
2968
|
ref: t,
|
|
@@ -3065,8 +3149,8 @@ var Kt = W((e, t) => {
|
|
|
3065
3149
|
})]
|
|
3066
3150
|
});
|
|
3067
3151
|
});
|
|
3068
|
-
|
|
3069
|
-
var
|
|
3152
|
+
qt.displayName = "GioCatalogIcon";
|
|
3153
|
+
var Jt = W((e, t) => {
|
|
3070
3154
|
let n = K();
|
|
3071
3155
|
return /* @__PURE__ */ X("svg", {
|
|
3072
3156
|
ref: t,
|
|
@@ -3291,8 +3375,8 @@ var qt = W((e, t) => {
|
|
|
3291
3375
|
})]
|
|
3292
3376
|
});
|
|
3293
3377
|
});
|
|
3294
|
-
|
|
3295
|
-
var
|
|
3378
|
+
Jt.displayName = "GioDeveloperPortalIcon";
|
|
3379
|
+
var Yt = W((e, t) => {
|
|
3296
3380
|
let n = K();
|
|
3297
3381
|
return /* @__PURE__ */ X("svg", {
|
|
3298
3382
|
ref: t,
|
|
@@ -3567,8 +3651,8 @@ var Jt = W((e, t) => {
|
|
|
3567
3651
|
})]
|
|
3568
3652
|
});
|
|
3569
3653
|
});
|
|
3570
|
-
|
|
3571
|
-
var
|
|
3654
|
+
Yt.displayName = "GioEdgeManagementIcon";
|
|
3655
|
+
var Xt = W((e, t) => {
|
|
3572
3656
|
let n = K();
|
|
3573
3657
|
return /* @__PURE__ */ X("svg", {
|
|
3574
3658
|
ref: t,
|
|
@@ -3755,8 +3839,8 @@ var Yt = W((e, t) => {
|
|
|
3755
3839
|
})]
|
|
3756
3840
|
});
|
|
3757
3841
|
});
|
|
3758
|
-
|
|
3759
|
-
var
|
|
3842
|
+
Xt.displayName = "GioEventApiManagementIcon";
|
|
3843
|
+
var Zt = W((e, t) => {
|
|
3760
3844
|
let n = K();
|
|
3761
3845
|
return /* @__PURE__ */ X("svg", {
|
|
3762
3846
|
ref: t,
|
|
@@ -3997,8 +4081,8 @@ var Xt = W((e, t) => {
|
|
|
3997
4081
|
})]
|
|
3998
4082
|
});
|
|
3999
4083
|
});
|
|
4000
|
-
|
|
4001
|
-
var
|
|
4084
|
+
Zt.displayName = "GioGammaIcon";
|
|
4085
|
+
var Qt = W((e, t) => {
|
|
4002
4086
|
let n = K();
|
|
4003
4087
|
return /* @__PURE__ */ X("svg", {
|
|
4004
4088
|
ref: t,
|
|
@@ -4239,8 +4323,8 @@ var Zt = W((e, t) => {
|
|
|
4239
4323
|
})]
|
|
4240
4324
|
});
|
|
4241
4325
|
});
|
|
4242
|
-
|
|
4243
|
-
var
|
|
4326
|
+
Qt.displayName = "GioHomeIcon";
|
|
4327
|
+
var $t = W((e, t) => {
|
|
4244
4328
|
let n = K();
|
|
4245
4329
|
return /* @__PURE__ */ X("svg", {
|
|
4246
4330
|
ref: t,
|
|
@@ -4535,8 +4619,8 @@ var Qt = W((e, t) => {
|
|
|
4535
4619
|
})]
|
|
4536
4620
|
});
|
|
4537
4621
|
});
|
|
4538
|
-
|
|
4539
|
-
var
|
|
4622
|
+
$t.displayName = "GioIamIcon";
|
|
4623
|
+
var en = W((e, t) => {
|
|
4540
4624
|
let n = K();
|
|
4541
4625
|
return /* @__PURE__ */ X("svg", {
|
|
4542
4626
|
ref: t,
|
|
@@ -4761,8 +4845,8 @@ var $t = W((e, t) => {
|
|
|
4761
4845
|
})]
|
|
4762
4846
|
});
|
|
4763
4847
|
});
|
|
4764
|
-
|
|
4765
|
-
var
|
|
4848
|
+
en.displayName = "GioObservabilityIcon";
|
|
4849
|
+
var tn = W((e, t) => {
|
|
4766
4850
|
let n = K();
|
|
4767
4851
|
return /* @__PURE__ */ X("svg", {
|
|
4768
4852
|
ref: t,
|
|
@@ -4881,8 +4965,8 @@ var en = W((e, t) => {
|
|
|
4881
4965
|
})]
|
|
4882
4966
|
});
|
|
4883
4967
|
});
|
|
4884
|
-
|
|
4885
|
-
var
|
|
4968
|
+
tn.displayName = "GioObserveIcon";
|
|
4969
|
+
var nn = W((e, t) => {
|
|
4886
4970
|
let n = K();
|
|
4887
4971
|
return /* @__PURE__ */ X("svg", {
|
|
4888
4972
|
ref: t,
|
|
@@ -5213,8 +5297,8 @@ var tn = W((e, t) => {
|
|
|
5213
5297
|
})]
|
|
5214
5298
|
});
|
|
5215
5299
|
});
|
|
5216
|
-
|
|
5217
|
-
var
|
|
5300
|
+
nn.displayName = "GioPlatformIcon";
|
|
5301
|
+
var rn = W((e, t) => {
|
|
5218
5302
|
let n = K();
|
|
5219
5303
|
return /* @__PURE__ */ X("svg", {
|
|
5220
5304
|
ref: t,
|
|
@@ -5333,8 +5417,8 @@ var nn = W((e, t) => {
|
|
|
5333
5417
|
})]
|
|
5334
5418
|
});
|
|
5335
5419
|
});
|
|
5336
|
-
|
|
5337
|
-
var
|
|
5420
|
+
rn.displayName = "GioProductizeIcon";
|
|
5421
|
+
var an = W((e, t) => {
|
|
5338
5422
|
let n = K();
|
|
5339
5423
|
return /* @__PURE__ */ X("svg", {
|
|
5340
5424
|
ref: t,
|
|
@@ -5461,10 +5545,10 @@ var rn = W((e, t) => {
|
|
|
5461
5545
|
})]
|
|
5462
5546
|
});
|
|
5463
5547
|
});
|
|
5464
|
-
|
|
5548
|
+
an.displayName = "GioSecureIcon";
|
|
5465
5549
|
//#endregion
|
|
5466
5550
|
//#region src/lib/useContainerSize.ts
|
|
5467
|
-
function
|
|
5551
|
+
function on() {
|
|
5468
5552
|
let [e, t] = q({
|
|
5469
5553
|
width: 0,
|
|
5470
5554
|
height: 0
|
|
@@ -5489,29 +5573,29 @@ function an() {
|
|
|
5489
5573
|
}
|
|
5490
5574
|
//#endregion
|
|
5491
5575
|
//#region src/charts/Metric/Metric.tsx
|
|
5492
|
-
var
|
|
5576
|
+
var sn = {
|
|
5493
5577
|
positive: "text-success",
|
|
5494
5578
|
negative: "text-destructive",
|
|
5495
5579
|
neutral: "text-muted-foreground"
|
|
5496
5580
|
};
|
|
5497
|
-
function
|
|
5581
|
+
function cn(e, t) {
|
|
5498
5582
|
return e === "neutral" || t === "neutral" ? "neutral" : t === "higher-is-better" ? e === "up" ? "positive" : "negative" : e === "up" ? "negative" : "positive";
|
|
5499
5583
|
}
|
|
5500
|
-
var
|
|
5501
|
-
function
|
|
5584
|
+
var ln = 56;
|
|
5585
|
+
function un(e, t) {
|
|
5502
5586
|
let n = Math.min(t > 0 ? t : 100, (e > 0 ? e : 200) * .65);
|
|
5503
5587
|
return Math.max(18, Math.min(96, Math.round(n * .22)));
|
|
5504
5588
|
}
|
|
5505
|
-
function
|
|
5589
|
+
function dn(e) {
|
|
5506
5590
|
return Math.max(10, Math.round(e * .22));
|
|
5507
5591
|
}
|
|
5508
|
-
function
|
|
5592
|
+
function fn(e) {
|
|
5509
5593
|
return e < 80 ? "text-sm font-semibold leading-tight" : e < 110 ? "text-base font-semibold leading-tight" : e < 150 ? "text-lg font-semibold leading-tight" : "text-xl font-semibold leading-tight";
|
|
5510
5594
|
}
|
|
5511
|
-
function
|
|
5595
|
+
function pn(e) {
|
|
5512
5596
|
return e < 50 ? "text-[9px]" : e < 80 ? "text-[10px]" : e < 120 ? "text-xs" : "text-sm";
|
|
5513
5597
|
}
|
|
5514
|
-
function
|
|
5598
|
+
function mn(e) {
|
|
5515
5599
|
return e < 60 ? {
|
|
5516
5600
|
text: "text-[9px]",
|
|
5517
5601
|
icon: "size-2 stroke-[2.5]"
|
|
@@ -5526,7 +5610,7 @@ function pn(e) {
|
|
|
5526
5610
|
icon: "size-3.5 stroke-[2.5]"
|
|
5527
5611
|
};
|
|
5528
5612
|
}
|
|
5529
|
-
function
|
|
5613
|
+
function hn({ data: t, color: n, colorClass: r }) {
|
|
5530
5614
|
let i = U.useRef(null), [a, o] = U.useState({
|
|
5531
5615
|
width: 0,
|
|
5532
5616
|
height: 0
|
|
@@ -5578,14 +5662,14 @@ function mn({ data: t, color: n, colorClass: r }) {
|
|
|
5578
5662
|
] })
|
|
5579
5663
|
});
|
|
5580
5664
|
}
|
|
5581
|
-
function
|
|
5665
|
+
function gn({ trend: t, sentiment: n, trendClass: r }) {
|
|
5582
5666
|
let i = t.direction === "down" ? Q : pt;
|
|
5583
5667
|
return /* @__PURE__ */ X("span", {
|
|
5584
|
-
className: e("inline-flex items-center gap-1 font-medium", r.text,
|
|
5668
|
+
className: e("inline-flex items-center gap-1 font-medium", r.text, sn[n]),
|
|
5585
5669
|
children: [t.direction !== "neutral" && /* @__PURE__ */ Y(i, { className: r.icon }), t.isNew ? "New" : `${t.value}%`]
|
|
5586
5670
|
});
|
|
5587
5671
|
}
|
|
5588
|
-
function
|
|
5672
|
+
function _n({ className: t, ...n }) {
|
|
5589
5673
|
return /* @__PURE__ */ X("div", {
|
|
5590
5674
|
role: "img",
|
|
5591
5675
|
"aria-busy": "true",
|
|
@@ -5604,15 +5688,15 @@ function gn({ className: t, ...n }) {
|
|
|
5604
5688
|
}), /* @__PURE__ */ Y(b, { className: "min-h-5 w-full flex-1" })]
|
|
5605
5689
|
});
|
|
5606
5690
|
}
|
|
5607
|
-
function
|
|
5608
|
-
let { ref: p, width: m, height: h } =
|
|
5609
|
-
if (r === "loading") return /* @__PURE__ */ Y(
|
|
5691
|
+
function vn({ value: t, label: n, state: r, description: i, icon: a, trend: o, trendSentiment: s = "higher-is-better", centered: c = !1, sparklineData: l, sparklineColor: u, className: d, ...f }) {
|
|
5692
|
+
let { ref: p, width: m, height: h } = on();
|
|
5693
|
+
if (r === "loading") return /* @__PURE__ */ Y(_n, {
|
|
5610
5694
|
className: d,
|
|
5611
5695
|
...f
|
|
5612
5696
|
});
|
|
5613
|
-
let g = r === "empty" ? "—" : t, _ = r === "empty" ? void 0 : o, v = r === "empty" ? void 0 : l, y = _ ?
|
|
5697
|
+
let g = r === "empty" ? "—" : t, _ = r === "empty" ? void 0 : o, v = r === "empty" ? void 0 : l, y = _ ? cn(_.direction, s) : void 0, b = !u && y ? sn[y] : void 0, x = u ?? (y ? void 0 : "var(--chart-1)"), S = v != null && v.length >= 2 && h >= ln && !c, C = c || !S, w = fn(h), T = pn(h), E = mn(h), D = n && h > 50, O = !!(_ && y && (S || h > 40));
|
|
5614
5698
|
if (C) {
|
|
5615
|
-
let t =
|
|
5699
|
+
let t = un(m, h), r = dn(t);
|
|
5616
5700
|
return /* @__PURE__ */ X("div", {
|
|
5617
5701
|
ref: p,
|
|
5618
5702
|
className: e("flex h-full flex-col items-center justify-center gap-1 text-center", d),
|
|
@@ -5628,7 +5712,7 @@ function _n({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
|
|
|
5628
5712
|
style: { fontSize: r },
|
|
5629
5713
|
children: n
|
|
5630
5714
|
}),
|
|
5631
|
-
O && _ && y && /* @__PURE__ */ Y(
|
|
5715
|
+
O && _ && y && /* @__PURE__ */ Y(gn, {
|
|
5632
5716
|
trend: _,
|
|
5633
5717
|
sentiment: y,
|
|
5634
5718
|
trendClass: E
|
|
@@ -5652,7 +5736,7 @@ function _n({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
|
|
|
5652
5736
|
}),
|
|
5653
5737
|
O && _ && y && /* @__PURE__ */ X("span", {
|
|
5654
5738
|
className: "flex shrink-0 items-center gap-1",
|
|
5655
|
-
children: [/* @__PURE__ */ Y(
|
|
5739
|
+
children: [/* @__PURE__ */ Y(gn, {
|
|
5656
5740
|
trend: _,
|
|
5657
5741
|
sentiment: y,
|
|
5658
5742
|
trendClass: E
|
|
@@ -5672,7 +5756,7 @@ function _n({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
|
|
|
5672
5756
|
]
|
|
5673
5757
|
}), /* @__PURE__ */ Y("div", {
|
|
5674
5758
|
className: "min-h-0 flex-1 pt-1",
|
|
5675
|
-
children: /* @__PURE__ */ Y(
|
|
5759
|
+
children: /* @__PURE__ */ Y(hn, {
|
|
5676
5760
|
data: v,
|
|
5677
5761
|
color: x,
|
|
5678
5762
|
colorClass: b
|
|
@@ -5682,49 +5766,49 @@ function _n({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
|
|
|
5682
5766
|
}
|
|
5683
5767
|
//#endregion
|
|
5684
5768
|
//#region src/charts/MetricGroup/MetricGroup.tsx
|
|
5685
|
-
function
|
|
5769
|
+
function yn(e) {
|
|
5686
5770
|
return "category" in e && "metrics" in e;
|
|
5687
5771
|
}
|
|
5688
|
-
var
|
|
5772
|
+
var bn = {
|
|
5689
5773
|
positive: "text-success",
|
|
5690
5774
|
negative: "text-destructive",
|
|
5691
5775
|
neutral: "text-muted-foreground"
|
|
5692
5776
|
};
|
|
5693
|
-
function
|
|
5777
|
+
function xn(e) {
|
|
5694
5778
|
let t = 0;
|
|
5695
|
-
for (let n of e) t +=
|
|
5779
|
+
for (let n of e) t += yn(n) ? n.metrics.length : 1;
|
|
5696
5780
|
return t;
|
|
5697
5781
|
}
|
|
5698
|
-
function
|
|
5699
|
-
return
|
|
5782
|
+
function Sn(e) {
|
|
5783
|
+
return yn(e) ? e.metrics.length : 1;
|
|
5700
5784
|
}
|
|
5701
|
-
var
|
|
5785
|
+
var Cn = [
|
|
5702
5786
|
"xs",
|
|
5703
5787
|
"sm",
|
|
5704
5788
|
"md",
|
|
5705
5789
|
"lg"
|
|
5706
5790
|
];
|
|
5707
|
-
function
|
|
5791
|
+
function wn(e, t, n) {
|
|
5708
5792
|
let r = e / Math.max(n, 1), i = r < 40 ? "xs" : r < 70 ? "sm" : r < 110 ? "md" : "lg", a = t < 25 ? "xs" : t < 40 ? "sm" : t < 60 ? "md" : "lg";
|
|
5709
|
-
return
|
|
5793
|
+
return Cn[Math.min(Cn.indexOf(i), Cn.indexOf(a))];
|
|
5710
5794
|
}
|
|
5711
|
-
var
|
|
5795
|
+
var Tn = {
|
|
5712
5796
|
xs: 40,
|
|
5713
5797
|
sm: 55,
|
|
5714
5798
|
md: 75,
|
|
5715
5799
|
lg: 100
|
|
5716
|
-
},
|
|
5717
|
-
function
|
|
5718
|
-
if (e <
|
|
5719
|
-
let r =
|
|
5800
|
+
}, En = 40, Dn = 80;
|
|
5801
|
+
function On(e, t, n) {
|
|
5802
|
+
if (e < Dn) return 0;
|
|
5803
|
+
let r = Tn[n], i = 0, a = 0;
|
|
5720
5804
|
for (let n = 0; n < t.length; n++) {
|
|
5721
|
-
let o = r *
|
|
5805
|
+
let o = r * Sn(t[n]), s = t.length - (n + 1) > 0 ? En : 0;
|
|
5722
5806
|
if (a + o + s > e) break;
|
|
5723
5807
|
a += o, i++;
|
|
5724
5808
|
}
|
|
5725
5809
|
return i;
|
|
5726
5810
|
}
|
|
5727
|
-
var
|
|
5811
|
+
var kn = {
|
|
5728
5812
|
value: {
|
|
5729
5813
|
xs: "text-xs font-bold leading-tight",
|
|
5730
5814
|
sm: "text-base font-semibold",
|
|
@@ -5762,31 +5846,31 @@ var On = {
|
|
|
5762
5846
|
lg: "px-5"
|
|
5763
5847
|
}
|
|
5764
5848
|
};
|
|
5765
|
-
function
|
|
5849
|
+
function An({ trend: t, sentiment: n, size: r }) {
|
|
5766
5850
|
let i = t.direction === "down" ? Q : pt, a = r === "xs" || r === "sm";
|
|
5767
5851
|
return a && t.direction === "neutral" ? null : /* @__PURE__ */ X("span", {
|
|
5768
|
-
className: e("inline-flex items-center gap-px font-medium",
|
|
5769
|
-
children: [t.direction !== "neutral" && /* @__PURE__ */ Y(i, { className:
|
|
5852
|
+
className: e("inline-flex items-center gap-px font-medium", kn.trend[r], bn[n]),
|
|
5853
|
+
children: [t.direction !== "neutral" && /* @__PURE__ */ Y(i, { className: kn.trendIcon[r] }), !a && (t.isNew ? "New" : `${t.value}%`)]
|
|
5770
5854
|
});
|
|
5771
5855
|
}
|
|
5772
|
-
function
|
|
5773
|
-
let i = t.trend ?
|
|
5856
|
+
function jn({ item: t, size: n, labelVisible: r }) {
|
|
5857
|
+
let i = t.trend ? cn(t.trend.direction, t.trendSentiment ?? "higher-is-better") : void 0, a = r && t.label, o = /* @__PURE__ */ X("div", {
|
|
5774
5858
|
className: "flex w-full min-w-0 flex-col",
|
|
5775
5859
|
children: [/* @__PURE__ */ X("div", {
|
|
5776
5860
|
className: "flex items-baseline justify-between gap-1",
|
|
5777
5861
|
children: [/* @__PURE__ */ Y("span", {
|
|
5778
|
-
className: e("truncate tracking-tight text-foreground",
|
|
5862
|
+
className: e("truncate tracking-tight text-foreground", kn.value[n]),
|
|
5779
5863
|
children: t.value
|
|
5780
5864
|
}), t.trend && i && !(t.trend.direction === "neutral" && (n === "xs" || n === "sm")) && /* @__PURE__ */ Y("span", {
|
|
5781
5865
|
className: "shrink-0",
|
|
5782
|
-
children: /* @__PURE__ */ Y(
|
|
5866
|
+
children: /* @__PURE__ */ Y(An, {
|
|
5783
5867
|
trend: t.trend,
|
|
5784
5868
|
sentiment: i,
|
|
5785
5869
|
size: n
|
|
5786
5870
|
})
|
|
5787
5871
|
})]
|
|
5788
5872
|
}), a && /* @__PURE__ */ Y("span", {
|
|
5789
|
-
className: e("truncate text-muted-foreground",
|
|
5873
|
+
className: e("truncate text-muted-foreground", kn.label[n]),
|
|
5790
5874
|
children: t.label
|
|
5791
5875
|
})]
|
|
5792
5876
|
});
|
|
@@ -5801,7 +5885,7 @@ function An({ item: t, size: n, labelVisible: r }) {
|
|
|
5801
5885
|
children: o
|
|
5802
5886
|
});
|
|
5803
5887
|
}
|
|
5804
|
-
function
|
|
5888
|
+
function Mn({ count: t, size: n }) {
|
|
5805
5889
|
let r = `${t} more ${t === 1 ? "metric" : "metrics"} hidden`;
|
|
5806
5890
|
return /* @__PURE__ */ X(se, { children: [/* @__PURE__ */ Y(ue, {
|
|
5807
5891
|
asChild: !0,
|
|
@@ -5813,7 +5897,7 @@ function jn({ count: t, size: n }) {
|
|
|
5813
5897
|
})
|
|
5814
5898
|
}), /* @__PURE__ */ Y(ce, { children: r })] });
|
|
5815
5899
|
}
|
|
5816
|
-
function
|
|
5900
|
+
function Nn({ count: t, className: n, ...r }) {
|
|
5817
5901
|
return /* @__PURE__ */ Y("div", {
|
|
5818
5902
|
role: "img",
|
|
5819
5903
|
"aria-busy": "true",
|
|
@@ -5826,14 +5910,14 @@ function Mn({ count: t, className: n, ...r }) {
|
|
|
5826
5910
|
}, t))
|
|
5827
5911
|
});
|
|
5828
5912
|
}
|
|
5829
|
-
function
|
|
5830
|
-
let { ref: o, width: s, height: c } =
|
|
5831
|
-
if (n === "loading") return /* @__PURE__ */ Y(
|
|
5832
|
-
count: t.length > 0 ?
|
|
5913
|
+
function Pn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
|
|
5914
|
+
let { ref: o, width: s, height: c } = on();
|
|
5915
|
+
if (n === "loading") return /* @__PURE__ */ Y(Nn, {
|
|
5916
|
+
count: t.length > 0 ? xn(t) : r ?? 5,
|
|
5833
5917
|
className: i,
|
|
5834
5918
|
...a
|
|
5835
5919
|
});
|
|
5836
|
-
let l = n === "empty" ? t.map((e) =>
|
|
5920
|
+
let l = n === "empty" ? t.map((e) => yn(e) ? {
|
|
5837
5921
|
...e,
|
|
5838
5922
|
metrics: e.metrics.map((e) => ({
|
|
5839
5923
|
...e,
|
|
@@ -5844,7 +5928,7 @@ function Nn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
|
|
|
5844
5928
|
...e,
|
|
5845
5929
|
value: "—",
|
|
5846
5930
|
trend: void 0
|
|
5847
|
-
}) : t, u =
|
|
5931
|
+
}) : t, u = xn(l), d = s > 0 ? wn(s, c, u) : "md", f = c >= 50, p = s > 0 ? On(s, l, d) : l.length, m = l.slice(0, p), h = l.length - p, g = p === 0;
|
|
5848
5932
|
return /* @__PURE__ */ Y(le, {
|
|
5849
5933
|
delayDuration: 300,
|
|
5850
5934
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -5854,21 +5938,21 @@ function Nn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
|
|
|
5854
5938
|
className: e("flex h-full items-center overflow-hidden", g ? "justify-center" : "divide-x divide-border/30 dark:divide-white/[0.06]", i),
|
|
5855
5939
|
...a,
|
|
5856
5940
|
children: [s > 0 && !g && m.map((t) => {
|
|
5857
|
-
let n =
|
|
5941
|
+
let n = yn(t) ? t.category : `${t.value}-${t.label ?? ""}`;
|
|
5858
5942
|
return /* @__PURE__ */ Y("div", {
|
|
5859
|
-
style: { flex:
|
|
5860
|
-
className: e("flex min-w-0 flex-col justify-center overflow-x-hidden",
|
|
5861
|
-
children:
|
|
5862
|
-
className: e("mb-0.5 font-medium tracking-wider text-muted-foreground uppercase",
|
|
5943
|
+
style: { flex: Sn(t) },
|
|
5944
|
+
className: e("flex min-w-0 flex-col justify-center overflow-x-hidden", kn.cellPadding[d]),
|
|
5945
|
+
children: yn(t) ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("span", {
|
|
5946
|
+
className: e("mb-0.5 font-medium tracking-wider text-muted-foreground uppercase", kn.category[d]),
|
|
5863
5947
|
children: t.category
|
|
5864
5948
|
}), /* @__PURE__ */ Y("div", {
|
|
5865
5949
|
className: "flex w-full min-w-0 items-stretch gap-3",
|
|
5866
|
-
children: t.metrics.map((e) => /* @__PURE__ */ Y(
|
|
5950
|
+
children: t.metrics.map((e) => /* @__PURE__ */ Y(jn, {
|
|
5867
5951
|
item: e,
|
|
5868
5952
|
size: d,
|
|
5869
5953
|
labelVisible: f
|
|
5870
5954
|
}, `${e.value}-${e.label ?? ""}`))
|
|
5871
|
-
})] }) : /* @__PURE__ */ Y(
|
|
5955
|
+
})] }) : /* @__PURE__ */ Y(jn, {
|
|
5872
5956
|
item: t,
|
|
5873
5957
|
size: d,
|
|
5874
5958
|
labelVisible: f
|
|
@@ -5876,7 +5960,7 @@ function Nn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
|
|
|
5876
5960
|
}, n);
|
|
5877
5961
|
}), s > 0 && h > 0 && /* @__PURE__ */ Y("div", {
|
|
5878
5962
|
className: e("flex shrink-0 items-center", g ? "" : "px-2"),
|
|
5879
|
-
children: /* @__PURE__ */ Y(
|
|
5963
|
+
children: /* @__PURE__ */ Y(Mn, {
|
|
5880
5964
|
count: h,
|
|
5881
5965
|
size: d
|
|
5882
5966
|
})
|
|
@@ -5886,7 +5970,7 @@ function Nn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
|
|
|
5886
5970
|
}
|
|
5887
5971
|
//#endregion
|
|
5888
5972
|
//#region src/charts/LineChart/LineChart.tsx
|
|
5889
|
-
function
|
|
5973
|
+
function Fn({ data: e, dataKeys: t, state: n, curveType: r = "monotone", showDots: a = !1, showGrid: o = !0, showCategoryAxis: s = !0, showValueAxis: l = !0, connectNulls: u = !1, valueTickFormatter: f, categoryTickFormatter: p, animated: h = !0, onPointHover: _, onPointLeave: v, ariaLabel: y, margin: b, className: x, children: S, ...C }) {
|
|
5890
5974
|
let { config: w } = i(), T = t ?? Ke(e, Object.keys(w));
|
|
5891
5975
|
return n === "loading" ? /* @__PURE__ */ Y(d, {
|
|
5892
5976
|
ariaLabel: y,
|
|
@@ -5921,7 +6005,7 @@ function Pn({ data: e, dataKeys: t, state: n, curveType: r = "monotone", showDot
|
|
|
5921
6005
|
}
|
|
5922
6006
|
//#endregion
|
|
5923
6007
|
//#region src/charts/AreaChart/AreaChart.tsx
|
|
5924
|
-
function
|
|
6008
|
+
function In({ data: e, dataKeys: t, state: n, curveType: r = "monotone", stacked: a = !0, gradient: o = !0, fillOpacity: s = .2, showDots: l = !1, showGrid: u = !0, showCategoryAxis: d = !0, showValueAxis: f = !0, connectNulls: p = !1, animated: h = !0, ariaLabel: _, margin: v, valueTickFormatter: y, categoryTickFormatter: b, onPointHover: x, onPointLeave: S, className: w, children: T, ...E }) {
|
|
5925
6009
|
let { config: D } = i(), O = t ?? Ke(e, Object.keys(D)), k = a ? "default" : void 0;
|
|
5926
6010
|
return n === "loading" ? /* @__PURE__ */ Y(C, {
|
|
5927
6011
|
ariaLabel: _,
|
|
@@ -5957,7 +6041,7 @@ function Fn({ data: e, dataKeys: t, state: n, curveType: r = "monotone", stacked
|
|
|
5957
6041
|
]
|
|
5958
6042
|
});
|
|
5959
6043
|
}
|
|
5960
|
-
function
|
|
6044
|
+
function Ln(e) {
|
|
5961
6045
|
if (e === 0) return "0ns";
|
|
5962
6046
|
if (e < 1e3) return `${Math.round(e)}ns`;
|
|
5963
6047
|
let t = e / 1e3;
|
|
@@ -5969,7 +6053,7 @@ function In(e) {
|
|
|
5969
6053
|
let i = Math.floor(r / 60), a = r % 60;
|
|
5970
6054
|
return `${i}m ${Math.round(a)}s`;
|
|
5971
6055
|
}
|
|
5972
|
-
function
|
|
6056
|
+
function Rn(e) {
|
|
5973
6057
|
let t = 0;
|
|
5974
6058
|
for (let n of e) {
|
|
5975
6059
|
let e = n.startOffsetNs + n.durationNs;
|
|
@@ -5977,7 +6061,7 @@ function Ln(e) {
|
|
|
5977
6061
|
}
|
|
5978
6062
|
return t > 0 ? t : 1;
|
|
5979
6063
|
}
|
|
5980
|
-
function
|
|
6064
|
+
function zn(e, t, n, r) {
|
|
5981
6065
|
if (r <= 0 || n <= 0) return {
|
|
5982
6066
|
x: 0,
|
|
5983
6067
|
width: 0
|
|
@@ -5988,18 +6072,18 @@ function Rn(e, t, n, r) {
|
|
|
5988
6072
|
width: a
|
|
5989
6073
|
};
|
|
5990
6074
|
}
|
|
5991
|
-
function
|
|
6075
|
+
function Bn(e, t) {
|
|
5992
6076
|
if (t === 0 || e === 0) return "0%";
|
|
5993
6077
|
let n = e / t * 100;
|
|
5994
6078
|
return n < .1 ? "<0.1%" : n >= 100 ? "100%" : `${n < 1 ? n.toFixed(1) : Math.round(n)}%`;
|
|
5995
6079
|
}
|
|
5996
|
-
var
|
|
5997
|
-
function
|
|
6080
|
+
var Vn = 6, Hn = 80;
|
|
6081
|
+
function Un(e) {
|
|
5998
6082
|
if (e <= 0) return 0;
|
|
5999
|
-
let t = Math.floor(e /
|
|
6000
|
-
return Math.max(2, Math.min(t,
|
|
6083
|
+
let t = Math.floor(e / Hn) + 1;
|
|
6084
|
+
return Math.max(2, Math.min(t, Vn));
|
|
6001
6085
|
}
|
|
6002
|
-
function
|
|
6086
|
+
function Wn(e, t = 5) {
|
|
6003
6087
|
if (e <= 0) return [0];
|
|
6004
6088
|
if (t <= 1) return [0, e];
|
|
6005
6089
|
let n = e / (t - 1);
|
|
@@ -6007,13 +6091,13 @@ function Un(e, t = 5) {
|
|
|
6007
6091
|
}
|
|
6008
6092
|
//#endregion
|
|
6009
6093
|
//#region src/charts/TraceWaterfall/TraceWaterfall.tsx
|
|
6010
|
-
var
|
|
6094
|
+
var Gn = 280, Kn = .45, qn = 36, Jn = 20, Yn = 20, Xn = 4, $ = 12, Zn = 48, Qn = 32, $n = 3, er = {
|
|
6011
6095
|
internal: "INTERNAL",
|
|
6012
6096
|
server: "SERVER",
|
|
6013
6097
|
client: "CLIENT",
|
|
6014
6098
|
producer: "PRODUCER",
|
|
6015
6099
|
consumer: "CONSUMER"
|
|
6016
|
-
},
|
|
6100
|
+
}, tr = [
|
|
6017
6101
|
"bg-chart-1",
|
|
6018
6102
|
"bg-chart-2",
|
|
6019
6103
|
"bg-chart-3",
|
|
@@ -6023,21 +6107,21 @@ var Wn = 280, Gn = .45, Kn = 36, qn = 20, Jn = 20, Yn = 4, $ = 12, Xn = 48, Zn =
|
|
|
6023
6107
|
"bg-chart-7",
|
|
6024
6108
|
"bg-chart-8"
|
|
6025
6109
|
];
|
|
6026
|
-
function
|
|
6110
|
+
function nr(e) {
|
|
6027
6111
|
let t = /* @__PURE__ */ new Map(), n = 0;
|
|
6028
|
-
for (let r of e) t.has(r.serviceName) || (t.set(r.serviceName,
|
|
6112
|
+
for (let r of e) t.has(r.serviceName) || (t.set(r.serviceName, tr[n % tr.length]), n++);
|
|
6029
6113
|
return t;
|
|
6030
6114
|
}
|
|
6031
|
-
var
|
|
6115
|
+
var rr = { error: "bg-destructive" }, ir = {
|
|
6032
6116
|
ok: "success",
|
|
6033
6117
|
error: "destructive",
|
|
6034
6118
|
unset: "secondary"
|
|
6035
|
-
},
|
|
6119
|
+
}, ar = {
|
|
6036
6120
|
ok: "OK",
|
|
6037
6121
|
error: "Error",
|
|
6038
6122
|
unset: "Unset"
|
|
6039
6123
|
};
|
|
6040
|
-
function
|
|
6124
|
+
function or({ icon: e, label: t, children: n }) {
|
|
6041
6125
|
return /* @__PURE__ */ X("div", {
|
|
6042
6126
|
className: "flex items-center justify-between gap-4",
|
|
6043
6127
|
children: [/* @__PURE__ */ X("div", {
|
|
@@ -6049,7 +6133,7 @@ function ar({ icon: e, label: t, children: n }) {
|
|
|
6049
6133
|
})]
|
|
6050
6134
|
});
|
|
6051
6135
|
}
|
|
6052
|
-
function
|
|
6136
|
+
function sr({ span: t, serviceColor: n, traceDurationNs: r }) {
|
|
6053
6137
|
return /* @__PURE__ */ X(J, { children: [
|
|
6054
6138
|
/* @__PURE__ */ X("div", {
|
|
6055
6139
|
className: "space-y-1 px-2.5 pt-2 pb-1.5",
|
|
@@ -6062,13 +6146,13 @@ function or({ span: t, serviceColor: n, traceDurationNs: r }) {
|
|
|
6062
6146
|
}), /* @__PURE__ */ X("div", {
|
|
6063
6147
|
className: "flex items-center gap-1.5 pl-[14px]",
|
|
6064
6148
|
children: [/* @__PURE__ */ Y(j, {
|
|
6065
|
-
variant:
|
|
6149
|
+
variant: ir[t.status],
|
|
6066
6150
|
className: "h-4 text-[9px]",
|
|
6067
|
-
children:
|
|
6151
|
+
children: ar[t.status]
|
|
6068
6152
|
}), /* @__PURE__ */ Y(j, {
|
|
6069
6153
|
variant: "outline",
|
|
6070
6154
|
className: "h-4 text-[9px]",
|
|
6071
|
-
children:
|
|
6155
|
+
children: er[t.kind]
|
|
6072
6156
|
})]
|
|
6073
6157
|
})]
|
|
6074
6158
|
}),
|
|
@@ -6076,25 +6160,25 @@ function or({ span: t, serviceColor: n, traceDurationNs: r }) {
|
|
|
6076
6160
|
/* @__PURE__ */ X("div", {
|
|
6077
6161
|
className: "space-y-1 px-2.5 py-1.5 text-[11px]",
|
|
6078
6162
|
children: [
|
|
6079
|
-
/* @__PURE__ */ Y(
|
|
6163
|
+
/* @__PURE__ */ Y(or, {
|
|
6080
6164
|
icon: _t,
|
|
6081
6165
|
label: "Service",
|
|
6082
6166
|
children: t.serviceName
|
|
6083
6167
|
}),
|
|
6084
|
-
/* @__PURE__ */ Y(
|
|
6168
|
+
/* @__PURE__ */ Y(or, {
|
|
6085
6169
|
icon: ht,
|
|
6086
6170
|
label: "Duration",
|
|
6087
6171
|
children: /* @__PURE__ */ Y("span", {
|
|
6088
6172
|
className: "font-mono tabular-nums",
|
|
6089
|
-
children:
|
|
6173
|
+
children: Ln(t.durationNs)
|
|
6090
6174
|
})
|
|
6091
6175
|
}),
|
|
6092
|
-
/* @__PURE__ */ Y(
|
|
6176
|
+
/* @__PURE__ */ Y(or, {
|
|
6093
6177
|
icon: dt,
|
|
6094
6178
|
label: "% of trace",
|
|
6095
6179
|
children: /* @__PURE__ */ Y("span", {
|
|
6096
6180
|
className: "font-mono tabular-nums",
|
|
6097
|
-
children:
|
|
6181
|
+
children: Bn(t.durationNs, r)
|
|
6098
6182
|
})
|
|
6099
6183
|
})
|
|
6100
6184
|
]
|
|
@@ -6108,7 +6192,7 @@ function or({ span: t, serviceColor: n, traceDurationNs: r }) {
|
|
|
6108
6192
|
})
|
|
6109
6193
|
] });
|
|
6110
6194
|
}
|
|
6111
|
-
function
|
|
6195
|
+
function cr({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, children: i }) {
|
|
6112
6196
|
return /* @__PURE__ */ X(H, {
|
|
6113
6197
|
openDelay: 250,
|
|
6114
6198
|
closeDelay: 0,
|
|
@@ -6120,7 +6204,7 @@ function sr({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, ch
|
|
|
6120
6204
|
align: "start",
|
|
6121
6205
|
sideOffset: 4,
|
|
6122
6206
|
className: "w-56 p-0",
|
|
6123
|
-
children: r ? r(e) : /* @__PURE__ */ Y(
|
|
6207
|
+
children: r ? r(e) : /* @__PURE__ */ Y(sr, {
|
|
6124
6208
|
span: e,
|
|
6125
6209
|
serviceColor: t,
|
|
6126
6210
|
traceDurationNs: n
|
|
@@ -6128,13 +6212,13 @@ function sr({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, ch
|
|
|
6128
6212
|
})]
|
|
6129
6213
|
});
|
|
6130
6214
|
}
|
|
6131
|
-
function
|
|
6215
|
+
function lr({ depth: e }) {
|
|
6132
6216
|
return e === 0 ? null : /* @__PURE__ */ Y("span", {
|
|
6133
6217
|
className: "pointer-events-none relative shrink-0",
|
|
6134
|
-
style: { width: e *
|
|
6218
|
+
style: { width: e * Jn },
|
|
6135
6219
|
"aria-hidden": "true",
|
|
6136
6220
|
children: Array.from({ length: e }, (t, n) => {
|
|
6137
|
-
let r = n === e - 1, i = n *
|
|
6221
|
+
let r = n === e - 1, i = n * Jn + Jn / 2;
|
|
6138
6222
|
return r ? /* @__PURE__ */ Y("span", {
|
|
6139
6223
|
className: "absolute top-0 border-l border-border/30",
|
|
6140
6224
|
style: {
|
|
@@ -6143,7 +6227,7 @@ function cr({ depth: e }) {
|
|
|
6143
6227
|
},
|
|
6144
6228
|
children: /* @__PURE__ */ Y("span", {
|
|
6145
6229
|
className: "absolute bottom-0 left-0 border-b border-border/30",
|
|
6146
|
-
style: { width:
|
|
6230
|
+
style: { width: Jn / 2 - 2 }
|
|
6147
6231
|
})
|
|
6148
6232
|
}, n) : /* @__PURE__ */ Y("span", {
|
|
6149
6233
|
className: "absolute top-0 h-full border-l border-border/30",
|
|
@@ -6152,12 +6236,12 @@ function cr({ depth: e }) {
|
|
|
6152
6236
|
})
|
|
6153
6237
|
});
|
|
6154
6238
|
}
|
|
6155
|
-
function
|
|
6239
|
+
function ur(e) {
|
|
6156
6240
|
let t = /* @__PURE__ */ new Set(), n = new Set(e.map((e) => e.spanId));
|
|
6157
6241
|
for (let r of e) r.parentSpanId && n.has(r.parentSpanId) && t.add(r.parentSpanId);
|
|
6158
6242
|
return t;
|
|
6159
6243
|
}
|
|
6160
|
-
function
|
|
6244
|
+
function dr(e, t) {
|
|
6161
6245
|
if (t.size === 0) return e;
|
|
6162
6246
|
let n = /* @__PURE__ */ new Set();
|
|
6163
6247
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -6169,7 +6253,7 @@ function ur(e, t) {
|
|
|
6169
6253
|
}
|
|
6170
6254
|
return e.filter((e) => !n.has(e.spanId));
|
|
6171
6255
|
}
|
|
6172
|
-
function
|
|
6256
|
+
function fr(e) {
|
|
6173
6257
|
let t = /* @__PURE__ */ new Map(), n = [];
|
|
6174
6258
|
for (let r = e.length - 1; r >= 0; r--) {
|
|
6175
6259
|
let i = e[r].depth;
|
|
@@ -6179,11 +6263,11 @@ function dr(e) {
|
|
|
6179
6263
|
}
|
|
6180
6264
|
return t;
|
|
6181
6265
|
}
|
|
6182
|
-
function
|
|
6183
|
-
let { x: h, width: g } =
|
|
6266
|
+
function pr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, serviceColor: a, selected: o, hasChildren: s, collapsed: c, collapsedCount: l, onSelect: u, onToggle: d, onHover: f, onLeave: p, renderTooltip: m }) {
|
|
6267
|
+
let { x: h, width: g } = zn(t.startOffsetNs, t.durationNs, n, i), _ = t.status === "error" ? rr.error : a, v = Ln(t.durationNs), y = g >= 56, b = !y;
|
|
6184
6268
|
return /* @__PURE__ */ X("div", {
|
|
6185
6269
|
className: e("group flex w-full cursor-pointer transition-colors", o ? "bg-accent/50" : "hover:bg-muted/30"),
|
|
6186
|
-
style: { height:
|
|
6270
|
+
style: { height: qn },
|
|
6187
6271
|
onClick: () => u?.(t),
|
|
6188
6272
|
onKeyDown: (e) => {
|
|
6189
6273
|
e.key === "Enter" || e.key === " " ? (e.preventDefault(), u?.(t)) : (e.key === "ArrowRight" && s && c || e.key === "ArrowLeft" && s && !c) && (e.preventDefault(), d?.(t.spanId));
|
|
@@ -6198,7 +6282,7 @@ function fr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
|
|
|
6198
6282
|
className: e("w-[3px] shrink-0 transition-colors", o ? "bg-primary" : "bg-transparent"),
|
|
6199
6283
|
"aria-hidden": "true"
|
|
6200
6284
|
}),
|
|
6201
|
-
/* @__PURE__ */ Y(
|
|
6285
|
+
/* @__PURE__ */ Y(cr, {
|
|
6202
6286
|
span: t,
|
|
6203
6287
|
serviceColor: a,
|
|
6204
6288
|
traceDurationNs: n,
|
|
@@ -6207,7 +6291,7 @@ function fr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
|
|
|
6207
6291
|
className: "flex shrink-0 items-center gap-1 overflow-hidden border-r border-border/30 px-1.5",
|
|
6208
6292
|
style: { width: r },
|
|
6209
6293
|
children: [
|
|
6210
|
-
/* @__PURE__ */ Y(
|
|
6294
|
+
/* @__PURE__ */ Y(lr, { depth: t.depth }),
|
|
6211
6295
|
s ? /* @__PURE__ */ Y("button", {
|
|
6212
6296
|
type: "button",
|
|
6213
6297
|
tabIndex: -1,
|
|
@@ -6248,7 +6332,7 @@ function fr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
|
|
|
6248
6332
|
className: "relative flex-1 overflow-hidden",
|
|
6249
6333
|
style: {
|
|
6250
6334
|
paddingLeft: $,
|
|
6251
|
-
paddingRight:
|
|
6335
|
+
paddingRight: Zn
|
|
6252
6336
|
},
|
|
6253
6337
|
"aria-label": `${t.name}: ${v}`,
|
|
6254
6338
|
children: [
|
|
@@ -6257,8 +6341,8 @@ function fr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
|
|
|
6257
6341
|
style: {
|
|
6258
6342
|
left: $ + h,
|
|
6259
6343
|
width: Math.max(g, 3),
|
|
6260
|
-
height:
|
|
6261
|
-
borderRadius:
|
|
6344
|
+
height: Yn,
|
|
6345
|
+
borderRadius: Xn
|
|
6262
6346
|
}
|
|
6263
6347
|
}),
|
|
6264
6348
|
y && /* @__PURE__ */ Y("span", {
|
|
@@ -6279,14 +6363,14 @@ function fr({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
|
|
|
6279
6363
|
]
|
|
6280
6364
|
});
|
|
6281
6365
|
}
|
|
6282
|
-
function
|
|
6283
|
-
let s =
|
|
6366
|
+
function mr({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible: r, isAllCollapsed: i, onExpandAll: a, onCollapseAll: o }) {
|
|
6367
|
+
let s = Wn(e, Un(n)), c = ve().domain([0, e]).range([0, n]);
|
|
6284
6368
|
return /* @__PURE__ */ X("div", {
|
|
6285
6369
|
className: "flex shrink-0 items-end border-b border-border bg-muted/30",
|
|
6286
|
-
style: { height:
|
|
6370
|
+
style: { height: Qn },
|
|
6287
6371
|
children: [/* @__PURE__ */ X("div", {
|
|
6288
6372
|
className: "flex shrink-0 items-center justify-between border-r border-border/30 px-3 pb-2",
|
|
6289
|
-
style: { width: t +
|
|
6373
|
+
style: { width: t + $n },
|
|
6290
6374
|
children: [/* @__PURE__ */ Y("span", {
|
|
6291
6375
|
className: "truncate text-[11px] font-semibold tracking-wider text-muted-foreground uppercase",
|
|
6292
6376
|
children: "Service & Operation"
|
|
@@ -6301,7 +6385,7 @@ function pr({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible:
|
|
|
6301
6385
|
className: "relative flex-1 pb-2",
|
|
6302
6386
|
style: {
|
|
6303
6387
|
paddingLeft: $,
|
|
6304
|
-
paddingRight:
|
|
6388
|
+
paddingRight: Zn
|
|
6305
6389
|
},
|
|
6306
6390
|
children: s.map((e, t) => {
|
|
6307
6391
|
let n = t === 0, r = t === s.length - 1;
|
|
@@ -6311,18 +6395,18 @@ function pr({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible:
|
|
|
6311
6395
|
left: $ + c(e),
|
|
6312
6396
|
transform: n ? "none" : r ? "translateX(-100%)" : "translateX(-50%)"
|
|
6313
6397
|
},
|
|
6314
|
-
children:
|
|
6398
|
+
children: Ln(e)
|
|
6315
6399
|
}, e);
|
|
6316
6400
|
})
|
|
6317
6401
|
})]
|
|
6318
6402
|
});
|
|
6319
6403
|
}
|
|
6320
|
-
function
|
|
6321
|
-
let i =
|
|
6404
|
+
function hr({ traceDurationNs: e, labelWidth: t, usableWidth: n, rowCount: r }) {
|
|
6405
|
+
let i = Wn(e, Un(n)), a = ve().domain([0, e]).range([0, n]), o = r * qn;
|
|
6322
6406
|
return /* @__PURE__ */ Y("svg", {
|
|
6323
6407
|
className: "pointer-events-none absolute top-0",
|
|
6324
6408
|
style: {
|
|
6325
|
-
left: t +
|
|
6409
|
+
left: t + $n + $,
|
|
6326
6410
|
width: n,
|
|
6327
6411
|
height: o
|
|
6328
6412
|
},
|
|
@@ -6338,7 +6422,7 @@ function mr({ traceDurationNs: e, labelWidth: t, usableWidth: n, rowCount: r })
|
|
|
6338
6422
|
}, e))
|
|
6339
6423
|
});
|
|
6340
6424
|
}
|
|
6341
|
-
var
|
|
6425
|
+
var gr = [
|
|
6342
6426
|
{
|
|
6343
6427
|
indent: 0,
|
|
6344
6428
|
labelPct: 60,
|
|
@@ -6370,7 +6454,7 @@ var hr = [
|
|
|
6370
6454
|
barPct: 65
|
|
6371
6455
|
}
|
|
6372
6456
|
];
|
|
6373
|
-
function
|
|
6457
|
+
function _r({ ariaLabel: t, className: n, ...r }) {
|
|
6374
6458
|
return /* @__PURE__ */ X("div", {
|
|
6375
6459
|
role: "img",
|
|
6376
6460
|
"aria-busy": "true",
|
|
@@ -6379,13 +6463,13 @@ function gr({ ariaLabel: t, className: n, ...r }) {
|
|
|
6379
6463
|
...r,
|
|
6380
6464
|
children: [/* @__PURE__ */ Y("div", {
|
|
6381
6465
|
className: "flex shrink-0 items-center border-b border-border bg-muted/30 px-3",
|
|
6382
|
-
style: { height:
|
|
6466
|
+
style: { height: Qn },
|
|
6383
6467
|
children: /* @__PURE__ */ Y(b, { className: "h-3 w-1/3 max-w-32" })
|
|
6384
6468
|
}), /* @__PURE__ */ Y("div", {
|
|
6385
6469
|
className: "flex-1",
|
|
6386
|
-
children:
|
|
6470
|
+
children: gr.map((e, t) => /* @__PURE__ */ X("div", {
|
|
6387
6471
|
className: "flex items-center gap-2 px-2",
|
|
6388
|
-
style: { height:
|
|
6472
|
+
style: { height: qn },
|
|
6389
6473
|
children: [/* @__PURE__ */ X("div", {
|
|
6390
6474
|
className: "flex shrink-0 items-center gap-1.5",
|
|
6391
6475
|
style: { paddingLeft: e.indent * 12 },
|
|
@@ -6403,7 +6487,7 @@ function gr({ ariaLabel: t, className: n, ...r }) {
|
|
|
6403
6487
|
className: "rounded-sm",
|
|
6404
6488
|
style: {
|
|
6405
6489
|
width: `${e.barPct}%`,
|
|
6406
|
-
height:
|
|
6490
|
+
height: Yn
|
|
6407
6491
|
}
|
|
6408
6492
|
})
|
|
6409
6493
|
})]
|
|
@@ -6411,14 +6495,14 @@ function gr({ ariaLabel: t, className: n, ...r }) {
|
|
|
6411
6495
|
})]
|
|
6412
6496
|
});
|
|
6413
6497
|
}
|
|
6414
|
-
function
|
|
6498
|
+
function vr({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHover: a, onSpanLeave: o, defaultCollapsed: s = !1, renderTooltip: c, ariaLabel: l = "Trace waterfall timeline", className: u, ...d }) {
|
|
6415
6499
|
let f = E(n, t.length), [p, m] = U.useState({
|
|
6416
|
-
labelWidth:
|
|
6500
|
+
labelWidth: Gn,
|
|
6417
6501
|
timelineWidth: 0
|
|
6418
|
-
}), h = U.useRef(null), g = U.useMemo(() =>
|
|
6502
|
+
}), h = U.useRef(null), g = U.useMemo(() => ur(t), [t]), [_, v] = U.useState(() => s ? new Set(ur(t)) : /* @__PURE__ */ new Set()), y = U.useCallback((e) => {
|
|
6419
6503
|
if (h.current &&= (h.current.disconnect(), null), e) {
|
|
6420
6504
|
let t = new ResizeObserver(([e]) => {
|
|
6421
|
-
let t = Math.round(e.contentRect.width), n = Math.min(
|
|
6505
|
+
let t = Math.round(e.contentRect.width), n = Math.min(Gn, Math.round(t * Kn)), r = t - n - $n - $ - Zn;
|
|
6422
6506
|
m({
|
|
6423
6507
|
labelWidth: n,
|
|
6424
6508
|
timelineWidth: Math.max(r, 0)
|
|
@@ -6426,13 +6510,13 @@ function _r({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
|
|
|
6426
6510
|
});
|
|
6427
6511
|
t.observe(e), h.current = t;
|
|
6428
6512
|
}
|
|
6429
|
-
}, []), b = U.useMemo(() =>
|
|
6513
|
+
}, []), b = U.useMemo(() => Rn(t), [t]), S = U.useMemo(() => nr(t), [t]), C = U.useMemo(() => fr(t), [t]), w = U.useMemo(() => dr(t, _), [t, _]), T = U.useCallback((e) => {
|
|
6430
6514
|
v((t) => {
|
|
6431
6515
|
let n = new Set(t);
|
|
6432
6516
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
6433
6517
|
});
|
|
6434
6518
|
}, []), D = U.useCallback(() => v(/* @__PURE__ */ new Set()), []), O = U.useCallback(() => v(new Set(g)), [g]), k = _.size > 0;
|
|
6435
|
-
return f === "loading" ? /* @__PURE__ */ Y(
|
|
6519
|
+
return f === "loading" ? /* @__PURE__ */ Y(_r, {
|
|
6436
6520
|
ariaLabel: l,
|
|
6437
6521
|
className: u,
|
|
6438
6522
|
...d
|
|
@@ -6446,7 +6530,7 @@ function _r({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
|
|
|
6446
6530
|
role: "treegrid",
|
|
6447
6531
|
"aria-label": l,
|
|
6448
6532
|
...d,
|
|
6449
|
-
children: [/* @__PURE__ */ Y(
|
|
6533
|
+
children: [/* @__PURE__ */ Y(mr, {
|
|
6450
6534
|
traceDurationNs: b,
|
|
6451
6535
|
labelWidth: p.labelWidth,
|
|
6452
6536
|
usableWidth: p.timelineWidth,
|
|
@@ -6458,17 +6542,17 @@ function _r({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
|
|
|
6458
6542
|
className: "min-h-0 flex-1",
|
|
6459
6543
|
children: /* @__PURE__ */ X("div", {
|
|
6460
6544
|
className: "relative",
|
|
6461
|
-
children: [/* @__PURE__ */ Y(
|
|
6545
|
+
children: [/* @__PURE__ */ Y(hr, {
|
|
6462
6546
|
traceDurationNs: b,
|
|
6463
6547
|
labelWidth: p.labelWidth,
|
|
6464
6548
|
usableWidth: p.timelineWidth,
|
|
6465
6549
|
rowCount: w.length
|
|
6466
|
-
}), w.map((e) => /* @__PURE__ */ Y(
|
|
6550
|
+
}), w.map((e) => /* @__PURE__ */ Y(pr, {
|
|
6467
6551
|
span: e,
|
|
6468
6552
|
traceDurationNs: b,
|
|
6469
6553
|
labelWidth: p.labelWidth,
|
|
6470
6554
|
usableWidth: p.timelineWidth,
|
|
6471
|
-
serviceColor: S.get(e.serviceName) ??
|
|
6555
|
+
serviceColor: S.get(e.serviceName) ?? tr[0],
|
|
6472
6556
|
selected: e.spanId === r,
|
|
6473
6557
|
hasChildren: g.has(e.spanId),
|
|
6474
6558
|
collapsed: _.has(e.spanId),
|
|
@@ -6485,27 +6569,27 @@ function _r({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
|
|
|
6485
6569
|
}
|
|
6486
6570
|
//#endregion
|
|
6487
6571
|
//#region src/charts/BreakdownChart/BarMeter.tsx
|
|
6488
|
-
var
|
|
6572
|
+
var yr = {
|
|
6489
6573
|
positive: "text-success",
|
|
6490
6574
|
negative: "text-destructive",
|
|
6491
6575
|
neutral: "text-muted-foreground"
|
|
6492
6576
|
};
|
|
6493
|
-
function
|
|
6577
|
+
function br({ trend: t, sentiment: n }) {
|
|
6494
6578
|
let r = t.direction === "down" ? Q : pt;
|
|
6495
6579
|
return /* @__PURE__ */ X("span", {
|
|
6496
|
-
className: e("inline-flex items-center gap-0.5 text-xs font-medium",
|
|
6580
|
+
className: e("inline-flex items-center gap-0.5 text-xs font-medium", yr[n]),
|
|
6497
6581
|
children: [t.direction !== "neutral" && /* @__PURE__ */ Y(r, { className: "size-3 stroke-[2.5]" }), t.isNew ? "New" : `${t.value}%`]
|
|
6498
6582
|
});
|
|
6499
6583
|
}
|
|
6500
|
-
function
|
|
6584
|
+
function xr({ rank: e }) {
|
|
6501
6585
|
return /* @__PURE__ */ Y("span", {
|
|
6502
6586
|
"aria-hidden": "true",
|
|
6503
6587
|
className: "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-md bg-muted px-1 text-[11px] font-semibold text-muted-foreground tabular-nums",
|
|
6504
6588
|
children: e
|
|
6505
6589
|
});
|
|
6506
6590
|
}
|
|
6507
|
-
function
|
|
6508
|
-
let v = Math.max(0, Math.min(1, r)), y = l === void 0 ? void 0 : Math.max(0, Math.min(1, l)), b = p ? `0 1px 8px -1px color-mix(in oklab, ${i} 55%, transparent)` : void 0, x = s ?
|
|
6591
|
+
function Sr({ label: t, formattedValue: n, ratio: r, color: i, detail: a, icon: o, trend: s, trendSentiment: c = "higher-is-better", threshold: l, rank: u, compact: d = !1, animated: f = !0, highlighted: p = !1, dimmed: m = !1, interactive: h = !1, className: g, ..._ }) {
|
|
6592
|
+
let v = Math.max(0, Math.min(1, r)), y = l === void 0 ? void 0 : Math.max(0, Math.min(1, l)), b = p ? `0 1px 8px -1px color-mix(in oklab, ${i} 55%, transparent)` : void 0, x = s ? cn(s.direction, c) : void 0;
|
|
6509
6593
|
return /* @__PURE__ */ X("div", {
|
|
6510
6594
|
"data-slot": "bar-meter",
|
|
6511
6595
|
role: h ? "button" : void 0,
|
|
@@ -6521,7 +6605,7 @@ function xr({ label: t, formattedValue: n, ratio: r, color: i, detail: a, icon:
|
|
|
6521
6605
|
children: [/* @__PURE__ */ X("span", {
|
|
6522
6606
|
className: "flex min-w-0 items-center gap-2",
|
|
6523
6607
|
children: [
|
|
6524
|
-
u !== void 0 && /* @__PURE__ */ Y(
|
|
6608
|
+
u !== void 0 && /* @__PURE__ */ Y(xr, { rank: u }),
|
|
6525
6609
|
o && /* @__PURE__ */ Y(o, { className: e("size-4 shrink-0 transition-colors", p ? "text-foreground" : "text-muted-foreground") }),
|
|
6526
6610
|
/* @__PURE__ */ Y("span", {
|
|
6527
6611
|
className: e("truncate text-sm transition-colors", p ? "font-semibold text-foreground" : "font-medium text-foreground"),
|
|
@@ -6530,7 +6614,7 @@ function xr({ label: t, formattedValue: n, ratio: r, color: i, detail: a, icon:
|
|
|
6530
6614
|
]
|
|
6531
6615
|
}), /* @__PURE__ */ X("span", {
|
|
6532
6616
|
className: "flex shrink-0 items-center gap-2",
|
|
6533
|
-
children: [s && x && /* @__PURE__ */ Y(
|
|
6617
|
+
children: [s && x && /* @__PURE__ */ Y(br, {
|
|
6534
6618
|
trend: s,
|
|
6535
6619
|
sentiment: x
|
|
6536
6620
|
}), /* @__PURE__ */ Y("span", {
|
|
@@ -6568,9 +6652,9 @@ function xr({ label: t, formattedValue: n, ratio: r, color: i, detail: a, icon:
|
|
|
6568
6652
|
}
|
|
6569
6653
|
//#endregion
|
|
6570
6654
|
//#region src/charts/BreakdownChart/BreakdownContext.tsx
|
|
6571
|
-
var
|
|
6572
|
-
function
|
|
6573
|
-
return U.useContext(
|
|
6655
|
+
var Cr = U.createContext(null);
|
|
6656
|
+
function wr() {
|
|
6657
|
+
return U.useContext(Cr) || {
|
|
6574
6658
|
tooltip: null,
|
|
6575
6659
|
legend: null,
|
|
6576
6660
|
summary: null,
|
|
@@ -6579,7 +6663,7 @@ function Cr() {
|
|
|
6579
6663
|
setSummary: () => void 0
|
|
6580
6664
|
};
|
|
6581
6665
|
}
|
|
6582
|
-
function
|
|
6666
|
+
function Tr({ children: e }) {
|
|
6583
6667
|
let [t, n] = U.useState(null), [r, i] = U.useState(null), [a, o] = U.useState(null), s = U.useMemo(() => ({
|
|
6584
6668
|
tooltip: t,
|
|
6585
6669
|
legend: r,
|
|
@@ -6592,21 +6676,21 @@ function wr({ children: e }) {
|
|
|
6592
6676
|
r,
|
|
6593
6677
|
a
|
|
6594
6678
|
]);
|
|
6595
|
-
return /* @__PURE__ */ Y(
|
|
6679
|
+
return /* @__PURE__ */ Y(Cr.Provider, {
|
|
6596
6680
|
value: s,
|
|
6597
6681
|
children: e
|
|
6598
6682
|
});
|
|
6599
6683
|
}
|
|
6600
6684
|
//#endregion
|
|
6601
6685
|
//#region src/charts/BreakdownChart/BreakdownTooltip.tsx
|
|
6602
|
-
function
|
|
6603
|
-
let { setTooltip: t } =
|
|
6686
|
+
function Er({ content: e }) {
|
|
6687
|
+
let { setTooltip: t } = wr();
|
|
6604
6688
|
return U.useLayoutEffect(() => (t({ content: typeof e == "function" ? e : (t, n) => U.cloneElement(e, {
|
|
6605
6689
|
item: t,
|
|
6606
6690
|
meta: n
|
|
6607
6691
|
}) }), () => t(null)), [e, t]), null;
|
|
6608
6692
|
}
|
|
6609
|
-
function
|
|
6693
|
+
function Dr({ pos: e, containerRef: t, children: n }) {
|
|
6610
6694
|
let r = U.useRef(null), [i, a] = U.useState({
|
|
6611
6695
|
x: 0,
|
|
6612
6696
|
y: 0,
|
|
@@ -6648,10 +6732,10 @@ function Er({ pos: e, containerRef: t, children: n }) {
|
|
|
6648
6732
|
children: n
|
|
6649
6733
|
}), document.body);
|
|
6650
6734
|
}
|
|
6651
|
-
function
|
|
6735
|
+
function Or(e) {
|
|
6652
6736
|
return typeof e == "number" ? e.toLocaleString() : e;
|
|
6653
6737
|
}
|
|
6654
|
-
function
|
|
6738
|
+
function kr({ item: t, meta: n, label: r, items: i, hideLabel: a, hideIndicator: o = !1, indicator: s = "dot", valueFormatter: c = Or, showTotal: l = !1, totalLabel: u = "Total", className: d, ...f }) {
|
|
6655
6739
|
let p = i === void 0 && t !== void 0 && n !== void 0, m = r ?? t?.label, h = i ?? (p ? [{
|
|
6656
6740
|
name: n.formattedValue,
|
|
6657
6741
|
value: `${(n.ratio * 100).toFixed(1)}%`,
|
|
@@ -6705,7 +6789,7 @@ function Or({ item: t, meta: n, label: r, items: i, hideLabel: a, hideIndicator:
|
|
|
6705
6789
|
}
|
|
6706
6790
|
//#endregion
|
|
6707
6791
|
//#region src/charts/BreakdownChart/BreakdownChart.tsx
|
|
6708
|
-
function
|
|
6792
|
+
function Ar(e) {
|
|
6709
6793
|
let [t, n] = U.useState(!e);
|
|
6710
6794
|
return U.useEffect(() => {
|
|
6711
6795
|
if (!e) return;
|
|
@@ -6713,7 +6797,7 @@ function kr(e) {
|
|
|
6713
6797
|
return () => cancelAnimationFrame(t);
|
|
6714
6798
|
}, [e]), t;
|
|
6715
6799
|
}
|
|
6716
|
-
var
|
|
6800
|
+
var jr = [
|
|
6717
6801
|
"var(--chart-1)",
|
|
6718
6802
|
"var(--chart-2)",
|
|
6719
6803
|
"var(--chart-3)",
|
|
@@ -6725,10 +6809,10 @@ var Ar = [
|
|
|
6725
6809
|
"var(--chart-9)",
|
|
6726
6810
|
"var(--chart-10)"
|
|
6727
6811
|
];
|
|
6728
|
-
function jr(e, t) {
|
|
6729
|
-
return e.color ?? Ar[t % Ar.length];
|
|
6730
|
-
}
|
|
6731
6812
|
function Mr(e, t) {
|
|
6813
|
+
return e.color ?? jr[t % jr.length];
|
|
6814
|
+
}
|
|
6815
|
+
function Nr(e, t) {
|
|
6732
6816
|
switch (t) {
|
|
6733
6817
|
case "total": {
|
|
6734
6818
|
let t = e.reduce((e, t) => e + t.value, 0);
|
|
@@ -6742,7 +6826,7 @@ function Mr(e, t) {
|
|
|
6742
6826
|
default: return t;
|
|
6743
6827
|
}
|
|
6744
6828
|
}
|
|
6745
|
-
var
|
|
6829
|
+
var Pr = [
|
|
6746
6830
|
.7,
|
|
6747
6831
|
.45,
|
|
6748
6832
|
.25,
|
|
@@ -6750,7 +6834,7 @@ var Nr = [
|
|
|
6750
6834
|
.35,
|
|
6751
6835
|
.2
|
|
6752
6836
|
];
|
|
6753
|
-
function
|
|
6837
|
+
function Fr({ rows: t = 3, compact: n = !1, className: r, ...i }) {
|
|
6754
6838
|
return /* @__PURE__ */ Y("div", {
|
|
6755
6839
|
role: "img",
|
|
6756
6840
|
"aria-busy": "true",
|
|
@@ -6766,15 +6850,15 @@ function Pr({ rows: t = 3, compact: n = !1, className: r, ...i }) {
|
|
|
6766
6850
|
}),
|
|
6767
6851
|
/* @__PURE__ */ Y(b, {
|
|
6768
6852
|
className: "h-2 rounded-full",
|
|
6769
|
-
style: { width: `${
|
|
6853
|
+
style: { width: `${Pr[r % Pr.length] * 100}%` }
|
|
6770
6854
|
}),
|
|
6771
6855
|
/* @__PURE__ */ Y(b, { className: "h-3 w-20" })
|
|
6772
6856
|
]
|
|
6773
6857
|
}, r))
|
|
6774
6858
|
});
|
|
6775
6859
|
}
|
|
6776
|
-
var
|
|
6777
|
-
function
|
|
6860
|
+
var Ir = 12, Lr = -12;
|
|
6861
|
+
function Rr({ items: t, formatValue: n, animated: r = !0, mounted: i, hoveredKey: a, highlightOnHover: o, interactive: s, legendSlot: c, onSegmentHover: l, onSegmentClick: u }) {
|
|
6778
6862
|
let d = t.reduce((e, t) => e + t.value, 0);
|
|
6779
6863
|
return /* @__PURE__ */ X("div", {
|
|
6780
6864
|
className: "flex flex-col gap-3",
|
|
@@ -6789,7 +6873,7 @@ function Lr({ items: t, formatValue: n, animated: r = !0, mounted: i, hoveredKey
|
|
|
6789
6873
|
className: e("h-full ease-out", r ? "transition-[width,opacity] duration-700" : "transition-opacity duration-200", f === 0 && "rounded-l-full", f === t.length - 1 && "rounded-r-full", h && "opacity-55", m && o && "opacity-100", s && "cursor-pointer"),
|
|
6790
6874
|
style: {
|
|
6791
6875
|
width: i ? `${p}%` : "0%",
|
|
6792
|
-
backgroundColor:
|
|
6876
|
+
backgroundColor: Mr(c, f)
|
|
6793
6877
|
},
|
|
6794
6878
|
onMouseEnter: () => l(c),
|
|
6795
6879
|
onMouseLeave: () => l(null),
|
|
@@ -6807,7 +6891,7 @@ function Lr({ items: t, formatValue: n, animated: r = !0, mounted: i, hoveredKey
|
|
|
6807
6891
|
children: [
|
|
6808
6892
|
/* @__PURE__ */ Y("span", {
|
|
6809
6893
|
className: "inline-block size-2.5 shrink-0 rounded-full",
|
|
6810
|
-
style: { backgroundColor:
|
|
6894
|
+
style: { backgroundColor: Mr(e, t) },
|
|
6811
6895
|
"aria-hidden": "true"
|
|
6812
6896
|
}),
|
|
6813
6897
|
/* @__PURE__ */ Y("span", {
|
|
@@ -6823,10 +6907,10 @@ function Lr({ items: t, formatValue: n, animated: r = !0, mounted: i, hoveredKey
|
|
|
6823
6907
|
})]
|
|
6824
6908
|
});
|
|
6825
6909
|
}
|
|
6826
|
-
function
|
|
6910
|
+
function zr(e, { pitch: t, gap: n }) {
|
|
6827
6911
|
return Math.max(0, Math.floor((e + n) / t));
|
|
6828
6912
|
}
|
|
6829
|
-
function
|
|
6913
|
+
function Br(e, t) {
|
|
6830
6914
|
let n = e.querySelectorAll("[data-slot=\"bar-meter\"]");
|
|
6831
6915
|
if (n.length >= 2) {
|
|
6832
6916
|
let e = n[1].offsetTop - n[0].offsetTop;
|
|
@@ -6843,12 +6927,12 @@ function zr(e, t) {
|
|
|
6843
6927
|
gap: i
|
|
6844
6928
|
};
|
|
6845
6929
|
}
|
|
6846
|
-
function
|
|
6930
|
+
function Vr(e) {
|
|
6847
6931
|
let [t, n] = U.useState(void 0), r = U.useRef(null), i = U.useCallback(() => {
|
|
6848
6932
|
let t = e.current;
|
|
6849
6933
|
if (!t) return;
|
|
6850
|
-
r.current =
|
|
6851
|
-
let i = r.current, a = t.clientHeight, o = i && a > 0 ?
|
|
6934
|
+
r.current = Br(t, r.current);
|
|
6935
|
+
let i = r.current, a = t.clientHeight, o = i && a > 0 ? zr(a, i) : void 0;
|
|
6852
6936
|
n((e) => e === o ? e : o);
|
|
6853
6937
|
}, [e]);
|
|
6854
6938
|
return U.useEffect(() => {
|
|
@@ -6861,7 +6945,7 @@ function Br(e) {
|
|
|
6861
6945
|
remeasure: i
|
|
6862
6946
|
};
|
|
6863
6947
|
}
|
|
6864
|
-
function
|
|
6948
|
+
function Hr(e, t, n) {
|
|
6865
6949
|
let r = t === void 0 || Number.isNaN(t) ? void 0 : Math.max(0, Math.floor(t)), i = r ?? n, [a, o] = U.useState(!1), [s, c] = U.useState(r);
|
|
6866
6950
|
Object.is(r, s) || (c(r), a && o(!1));
|
|
6867
6951
|
let l = U.useCallback(() => o((e) => !e), []);
|
|
@@ -6879,21 +6963,21 @@ function Vr(e, t, n) {
|
|
|
6879
6963
|
toggle: l
|
|
6880
6964
|
};
|
|
6881
6965
|
}
|
|
6882
|
-
function
|
|
6883
|
-
return /* @__PURE__ */ X(
|
|
6966
|
+
function Ur({ children: e, ...t }) {
|
|
6967
|
+
return /* @__PURE__ */ X(Tr, { children: [e, /* @__PURE__ */ Y(Wr, { ...t })] });
|
|
6884
6968
|
}
|
|
6885
|
-
function
|
|
6886
|
-
let { tooltip: b, legend: S, summary: C } =
|
|
6969
|
+
function Wr({ items: t, variant: n = "list", ratioMode: r = "total", formatValue: i, trendSentiment: a = "higher-is-better", sortByValue: o, showRank: s = !1, summary: c, maxItems: l, animated: u = !0, compact: d = !1, highlightOnHover: f = !0, state: p, skeletonRows: m = 3, ariaLabel: h = "Breakdown chart", onItemClick: g, onItemHover: _, className: v, ...y }) {
|
|
6970
|
+
let { tooltip: b, legend: S, summary: C } = wr(), w = p ?? (t.length === 0 ? "empty" : "ready"), [T, E] = U.useState(null), D = g !== void 0, O = Ar(u), k = U.useRef(null), [A, j] = U.useState(null), M = U.useMemo(() => o ? [...t].sort((e, t) => o === "asc" ? e.value - t.value : t.value - e.value) : t, [t, o]), N = U.useMemo(() => Nr(M, r), [M, r]), P = U.useCallback((e) => {
|
|
6887
6971
|
E(e?.key ?? null), e || j(null), _?.(e);
|
|
6888
6972
|
}, [_]), F = U.useCallback((e) => {
|
|
6889
6973
|
if (!b || !k.current) return;
|
|
6890
6974
|
let t = k.current.getBoundingClientRect();
|
|
6891
6975
|
j({
|
|
6892
|
-
x: e.clientX - t.left +
|
|
6893
|
-
y: e.clientY - t.top +
|
|
6976
|
+
x: e.clientX - t.left + Ir,
|
|
6977
|
+
y: e.clientY - t.top + Lr
|
|
6894
6978
|
});
|
|
6895
6979
|
}, [b]);
|
|
6896
|
-
if (w === "loading") return /* @__PURE__ */ Y(
|
|
6980
|
+
if (w === "loading") return /* @__PURE__ */ Y(Fr, {
|
|
6897
6981
|
rows: m,
|
|
6898
6982
|
compact: d,
|
|
6899
6983
|
className: v,
|
|
@@ -6905,11 +6989,11 @@ function Ur({ items: t, variant: n = "list", ratioMode: r = "total", formatValue
|
|
|
6905
6989
|
children: /* @__PURE__ */ Y(x, { ariaLabel: h })
|
|
6906
6990
|
});
|
|
6907
6991
|
let I = T ? M.findIndex((e) => e.key === T) : -1, L = I >= 0 ? M[I] : null, R = L ? {
|
|
6908
|
-
color:
|
|
6992
|
+
color: Mr(L, I),
|
|
6909
6993
|
index: I,
|
|
6910
6994
|
ratio: N[I],
|
|
6911
6995
|
formattedValue: i ? i(L.value) : String(L.value)
|
|
6912
|
-
} : null, z = b && L && R && A ? /* @__PURE__ */ Y(
|
|
6996
|
+
} : null, z = b && L && R && A ? /* @__PURE__ */ Y(Dr, {
|
|
6913
6997
|
pos: A,
|
|
6914
6998
|
containerRef: k,
|
|
6915
6999
|
children: b.content(L, R)
|
|
@@ -6921,7 +7005,7 @@ function Ur({ items: t, variant: n = "list", ratioMode: r = "total", formatValue
|
|
|
6921
7005
|
onMouseMove: F,
|
|
6922
7006
|
...y,
|
|
6923
7007
|
ref: k,
|
|
6924
|
-
children: [/* @__PURE__ */ Y(
|
|
7008
|
+
children: [/* @__PURE__ */ Y(Rr, {
|
|
6925
7009
|
items: M,
|
|
6926
7010
|
formatValue: i,
|
|
6927
7011
|
animated: u,
|
|
@@ -6933,7 +7017,7 @@ function Ur({ items: t, variant: n = "list", ratioMode: r = "total", formatValue
|
|
|
6933
7017
|
onSegmentHover: P,
|
|
6934
7018
|
onSegmentClick: g
|
|
6935
7019
|
}), z]
|
|
6936
|
-
}) : /* @__PURE__ */ Y(
|
|
7020
|
+
}) : /* @__PURE__ */ Y(Gr, {
|
|
6937
7021
|
containerRef: k,
|
|
6938
7022
|
items: M,
|
|
6939
7023
|
ratios: N,
|
|
@@ -6958,8 +7042,8 @@ function Ur({ items: t, variant: n = "list", ratioMode: r = "total", formatValue
|
|
|
6958
7042
|
...y
|
|
6959
7043
|
});
|
|
6960
7044
|
}
|
|
6961
|
-
function
|
|
6962
|
-
let S = U.useRef(null), { fitCount: C, remeasure: w } =
|
|
7045
|
+
function Gr({ containerRef: t, items: n, ratios: r, formatValue: i, trendSentiment: a = "higher-is-better", showRank: o = !1, summary: s, summarySlot: c, maxItems: l, animated: u = !0, compact: d = !1, highlightOnHover: f, mounted: p, ariaLabel: m = "Breakdown chart", hoveredKey: h, interactive: g, onItemHover: _, onItemClick: v, tooltipPortal: y, className: b, ...x }) {
|
|
7046
|
+
let S = U.useRef(null), { fitCount: C, remeasure: w } = Vr(S), { visibleItems: T, hiddenCount: E, expanded: D, collapsible: O, toggle: k } = Hr(n, l, C);
|
|
6963
7047
|
U.useLayoutEffect(w, [
|
|
6964
7048
|
w,
|
|
6965
7049
|
n,
|
|
@@ -6995,11 +7079,11 @@ function Wr({ containerRef: t, items: n, ratios: r, formatValue: i, trendSentime
|
|
|
6995
7079
|
},
|
|
6996
7080
|
children: /* @__PURE__ */ Y("div", {
|
|
6997
7081
|
className: e("flex flex-col", M),
|
|
6998
|
-
children: T.map((e, t) => /* @__PURE__ */ Y(
|
|
7082
|
+
children: T.map((e, t) => /* @__PURE__ */ Y(Sr, {
|
|
6999
7083
|
label: e.label,
|
|
7000
7084
|
formattedValue: i ? i(e.value) : String(e.value),
|
|
7001
7085
|
ratio: p ? r[t] : 0,
|
|
7002
|
-
color:
|
|
7086
|
+
color: Mr(e, t),
|
|
7003
7087
|
detail: e.detail,
|
|
7004
7088
|
icon: e.icon,
|
|
7005
7089
|
trend: e.trend,
|
|
@@ -7043,11 +7127,11 @@ function Wr({ containerRef: t, items: n, ratios: r, formatValue: i, trendSentime
|
|
|
7043
7127
|
}
|
|
7044
7128
|
//#endregion
|
|
7045
7129
|
//#region src/charts/BreakdownChart/BreakdownLegend.tsx
|
|
7046
|
-
function
|
|
7047
|
-
let { setLegend: t } =
|
|
7130
|
+
function Kr({ children: e }) {
|
|
7131
|
+
let { setLegend: t } = wr();
|
|
7048
7132
|
return U.useLayoutEffect(() => (t(e), () => t(null)), [e, t]), null;
|
|
7049
7133
|
}
|
|
7050
|
-
function
|
|
7134
|
+
function qr({ items: t, colors: n, formatValue: r, className: i, ...a }) {
|
|
7051
7135
|
return /* @__PURE__ */ Y("div", {
|
|
7052
7136
|
className: e("flex flex-wrap items-center gap-x-4 gap-y-1", i),
|
|
7053
7137
|
...a,
|
|
@@ -7073,13 +7157,13 @@ function Kr({ items: t, colors: n, formatValue: r, className: i, ...a }) {
|
|
|
7073
7157
|
}
|
|
7074
7158
|
//#endregion
|
|
7075
7159
|
//#region src/charts/BreakdownChart/BreakdownSummary.tsx
|
|
7076
|
-
function
|
|
7077
|
-
let { setSummary: t } =
|
|
7160
|
+
function Jr({ children: e }) {
|
|
7161
|
+
let { setSummary: t } = wr();
|
|
7078
7162
|
return U.useLayoutEffect(() => (t(e), () => t(null)), [e, t]), null;
|
|
7079
7163
|
}
|
|
7080
7164
|
//#endregion
|
|
7081
7165
|
//#region src/charts/FilterCombobox/DataTypeIcon.tsx
|
|
7082
|
-
function
|
|
7166
|
+
function Yr({ icon: t, tooltipContent: n, colorClass: r }) {
|
|
7083
7167
|
return /* @__PURE__ */ X(se, { children: [/* @__PURE__ */ Y(ue, {
|
|
7084
7168
|
asChild: !0,
|
|
7085
7169
|
children: /* @__PURE__ */ Y("span", {
|
|
@@ -7093,10 +7177,10 @@ function Jr({ icon: t, tooltipContent: n, colorClass: r }) {
|
|
|
7093
7177
|
}
|
|
7094
7178
|
//#endregion
|
|
7095
7179
|
//#region src/charts/FilterCombobox/DataTypeIcons.tsx
|
|
7096
|
-
function
|
|
7180
|
+
function Xr({ dataTypes: e }) {
|
|
7097
7181
|
return e.length === 0 ? null : /* @__PURE__ */ Y("span", {
|
|
7098
7182
|
className: "ml-2 flex shrink-0 items-center",
|
|
7099
|
-
children: e.map((e) => /* @__PURE__ */ Y(
|
|
7183
|
+
children: e.map((e) => /* @__PURE__ */ Y(Yr, {
|
|
7100
7184
|
icon: e.icon,
|
|
7101
7185
|
tooltipContent: e.tooltipContent,
|
|
7102
7186
|
colorClass: e.colorClass
|
|
@@ -7105,19 +7189,19 @@ function Yr({ dataTypes: e }) {
|
|
|
7105
7189
|
}
|
|
7106
7190
|
//#endregion
|
|
7107
7191
|
//#region src/charts/FilterCombobox/filter-combobox-options.ts
|
|
7108
|
-
function
|
|
7192
|
+
function Zr(e, t) {
|
|
7109
7193
|
return `${e}-${t}`;
|
|
7110
7194
|
}
|
|
7111
|
-
function
|
|
7195
|
+
function Qr(e) {
|
|
7112
7196
|
return e;
|
|
7113
7197
|
}
|
|
7114
|
-
function
|
|
7198
|
+
function $r(e, t) {
|
|
7115
7199
|
return `${e}-option-${t}`;
|
|
7116
7200
|
}
|
|
7117
|
-
function
|
|
7201
|
+
function ei(e, t, n, r) {
|
|
7118
7202
|
if (!e) return t.map((e) => ({
|
|
7119
7203
|
item: e,
|
|
7120
|
-
optionValue:
|
|
7204
|
+
optionValue: Qr(e.id)
|
|
7121
7205
|
}));
|
|
7122
7206
|
let i = [];
|
|
7123
7207
|
for (let e of n) {
|
|
@@ -7125,30 +7209,30 @@ function $r(e, t, n, r) {
|
|
|
7125
7209
|
let n = t.filter((t) => t.scopes.includes(e.id));
|
|
7126
7210
|
for (let t of n) i.push({
|
|
7127
7211
|
item: t,
|
|
7128
|
-
optionValue:
|
|
7212
|
+
optionValue: Zr(e.id, t.id)
|
|
7129
7213
|
});
|
|
7130
7214
|
}
|
|
7131
7215
|
return i;
|
|
7132
7216
|
}
|
|
7133
|
-
function
|
|
7217
|
+
function ti(e, t, n) {
|
|
7134
7218
|
if (e.length === 0) return;
|
|
7135
7219
|
let r = t ? e.findIndex((e) => e.optionValue === t) : -1;
|
|
7136
7220
|
return r === -1 ? n === "next" ? e[0].optionValue : e[e.length - 1].optionValue : n === "next" ? e[r < e.length - 1 ? r + 1 : 0].optionValue : e[r > 0 ? r - 1 : e.length - 1].optionValue;
|
|
7137
7221
|
}
|
|
7138
|
-
function
|
|
7222
|
+
function ni(e, t) {
|
|
7139
7223
|
if (t) return e.some((e) => e.optionValue === t) ? t : void 0;
|
|
7140
7224
|
}
|
|
7141
7225
|
//#endregion
|
|
7142
7226
|
//#region src/charts/FilterCombobox/resolve-item-data-types.ts
|
|
7143
|
-
function
|
|
7227
|
+
function ri(e) {
|
|
7144
7228
|
return e.dataTypeIds ?? [];
|
|
7145
7229
|
}
|
|
7146
|
-
function
|
|
7147
|
-
return Array.from(new Set(
|
|
7230
|
+
function ii(e, t) {
|
|
7231
|
+
return Array.from(new Set(ri(e))).map((e) => t.find((t) => t.id === e)).filter((e) => e !== void 0);
|
|
7148
7232
|
}
|
|
7149
7233
|
//#endregion
|
|
7150
7234
|
//#region src/charts/FilterCombobox/FilterGroupedList.tsx
|
|
7151
|
-
function
|
|
7235
|
+
function ai({ scopes: t, dataTypes: n, items: r, expandedScopes: i, onToggleScope: a, onSelect: o, onHighlightOption: s }) {
|
|
7152
7236
|
return /* @__PURE__ */ Y(J, { children: t.map((t) => {
|
|
7153
7237
|
let c = r.filter((e) => e.scopes.includes(t.id));
|
|
7154
7238
|
if (c.length === 0) return null;
|
|
@@ -7179,7 +7263,7 @@ function ii({ scopes: t, dataTypes: n, items: r, expandedScopes: i, onToggleScop
|
|
|
7179
7263
|
}), /* @__PURE__ */ Y(R, { children: /* @__PURE__ */ Y(B, {
|
|
7180
7264
|
className: "mt-1 ml-3 pl-1",
|
|
7181
7265
|
children: (i[t.id] ?? !0) && c.map((e) => {
|
|
7182
|
-
let r =
|
|
7266
|
+
let r = ii(e, n), i = Zr(t.id, e.id);
|
|
7183
7267
|
return /* @__PURE__ */ X(V, {
|
|
7184
7268
|
"data-filter-option-value": i,
|
|
7185
7269
|
value: i,
|
|
@@ -7189,7 +7273,7 @@ function ii({ scopes: t, dataTypes: n, items: r, expandedScopes: i, onToggleScop
|
|
|
7189
7273
|
children: [/* @__PURE__ */ Y("span", {
|
|
7190
7274
|
className: "min-w-0 flex-1 truncate font-medium text-foreground",
|
|
7191
7275
|
children: e.name
|
|
7192
|
-
}), /* @__PURE__ */ Y(
|
|
7276
|
+
}), /* @__PURE__ */ Y(Xr, { dataTypes: r })]
|
|
7193
7277
|
}, `${t.id}-${e.id}`);
|
|
7194
7278
|
})
|
|
7195
7279
|
}) })]
|
|
@@ -7198,12 +7282,12 @@ function ii({ scopes: t, dataTypes: n, items: r, expandedScopes: i, onToggleScop
|
|
|
7198
7282
|
}
|
|
7199
7283
|
//#endregion
|
|
7200
7284
|
//#region src/charts/FilterCombobox/HighlightMatch.tsx
|
|
7201
|
-
function
|
|
7285
|
+
function oi(e) {
|
|
7202
7286
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7203
7287
|
}
|
|
7204
|
-
function
|
|
7288
|
+
function si(e, t) {
|
|
7205
7289
|
if (!t.trim()) return [e];
|
|
7206
|
-
let n =
|
|
7290
|
+
let n = oi(t);
|
|
7207
7291
|
return e.split(RegExp(`(${n})`, "gi")).map((e, n) => e.toLowerCase() === t.toLowerCase() ? /* @__PURE__ */ Y("mark", {
|
|
7208
7292
|
className: "rounded-sm bg-warning/10 text-warning-foreground",
|
|
7209
7293
|
children: e
|
|
@@ -7211,12 +7295,12 @@ function oi(e, t) {
|
|
|
7211
7295
|
}
|
|
7212
7296
|
//#endregion
|
|
7213
7297
|
//#region src/charts/FilterCombobox/FilterSearchList.tsx
|
|
7214
|
-
function
|
|
7298
|
+
function ci({ scopes: t, dataTypes: n, items: r, searchQuery: i, onSelect: a, onHighlightOption: o }) {
|
|
7215
7299
|
return /* @__PURE__ */ Y(B, {
|
|
7216
7300
|
heading: `Results (${r.length})`,
|
|
7217
7301
|
className: "mt-1",
|
|
7218
7302
|
children: r.map((r) => {
|
|
7219
|
-
let s =
|
|
7303
|
+
let s = ii(r, n), c = Qr(r.id);
|
|
7220
7304
|
return /* @__PURE__ */ X(V, {
|
|
7221
7305
|
"data-filter-option-value": c,
|
|
7222
7306
|
value: c,
|
|
@@ -7227,7 +7311,7 @@ function si({ scopes: t, dataTypes: n, items: r, searchQuery: i, onSelect: a, on
|
|
|
7227
7311
|
className: "flex min-w-0 flex-1 flex-col gap-1.5 overflow-hidden",
|
|
7228
7312
|
children: [/* @__PURE__ */ Y("span", {
|
|
7229
7313
|
className: "truncate text-sm font-medium text-foreground",
|
|
7230
|
-
children:
|
|
7314
|
+
children: si(r.name, i)
|
|
7231
7315
|
}), /* @__PURE__ */ Y("div", {
|
|
7232
7316
|
className: "flex flex-wrap items-center gap-1.5",
|
|
7233
7317
|
children: r.scopes.map((n) => {
|
|
@@ -7241,14 +7325,14 @@ function si({ scopes: t, dataTypes: n, items: r, searchQuery: i, onSelect: a, on
|
|
|
7241
7325
|
}, n);
|
|
7242
7326
|
})
|
|
7243
7327
|
})]
|
|
7244
|
-
}), /* @__PURE__ */ Y(
|
|
7328
|
+
}), /* @__PURE__ */ Y(Xr, { dataTypes: s })]
|
|
7245
7329
|
}, r.id);
|
|
7246
7330
|
})
|
|
7247
7331
|
});
|
|
7248
7332
|
}
|
|
7249
7333
|
//#endregion
|
|
7250
7334
|
//#region src/charts/FilterCombobox/use-filter-combobox.ts
|
|
7251
|
-
function
|
|
7335
|
+
function li({ items: e, scopes: t, onSelect: n, value: r, onValueChange: i, open: a, onOpenChange: o }) {
|
|
7252
7336
|
let s = K(), c = _e(null), l = _e(null), u = _e(null), d = _e(!1), f = a !== void 0, p = r !== void 0, [m, h] = q(!1), [g, _] = q(null), [v, y] = q(""), [b, x] = q(void 0), S = f ? a : m, C = p ? r : g, w = G((e) => {
|
|
7253
7337
|
f ? o?.(e) : h(e);
|
|
7254
7338
|
}, [f, o]), T = G((e) => {
|
|
@@ -7261,15 +7345,15 @@ function ci({ items: e, scopes: t, onSelect: n, value: r, onValueChange: i, open
|
|
|
7261
7345
|
}, []), k = ge(() => {
|
|
7262
7346
|
let t = v.trim().toLowerCase();
|
|
7263
7347
|
return t ? e.filter((e) => e.name.toLowerCase().includes(t) || e.id.toLowerCase().includes(t)) : e;
|
|
7264
|
-
}, [e, v]), A = v.trim() === "", j = ge(() =>
|
|
7348
|
+
}, [e, v]), A = v.trim() === "", j = ge(() => ei(A, k, t, E), [
|
|
7265
7349
|
A,
|
|
7266
7350
|
k,
|
|
7267
7351
|
t,
|
|
7268
7352
|
E
|
|
7269
|
-
]), M = ge(() =>
|
|
7353
|
+
]), M = ge(() => ni(j, b), [j, b]), N = M ? $r(s, M) : void 0, P = G(() => {
|
|
7270
7354
|
x(void 0);
|
|
7271
7355
|
}, []), F = G((e) => {
|
|
7272
|
-
x((t) =>
|
|
7356
|
+
x((t) => ti(j, t, e));
|
|
7273
7357
|
}, [j]), I = G((e) => {
|
|
7274
7358
|
d.current = !1, u.current = e, T(e), y(e.name), P(), w(!1), n(e);
|
|
7275
7359
|
}, [
|
|
@@ -7339,7 +7423,7 @@ function ci({ items: e, scopes: t, onSelect: n, value: r, onValueChange: i, open
|
|
|
7339
7423
|
}
|
|
7340
7424
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
7341
7425
|
}, [P, w]), me(() => {
|
|
7342
|
-
!S || !M || document.getElementById(
|
|
7426
|
+
!S || !M || document.getElementById($r(s, M))?.scrollIntoView({ block: "nearest" });
|
|
7343
7427
|
}, [
|
|
7344
7428
|
M,
|
|
7345
7429
|
S,
|
|
@@ -7352,7 +7436,7 @@ function ci({ items: e, scopes: t, onSelect: n, value: r, onValueChange: i, open
|
|
|
7352
7436
|
for (let e of t) {
|
|
7353
7437
|
if (!(e instanceof HTMLElement)) continue;
|
|
7354
7438
|
let t = e.getAttribute("data-filter-option-value");
|
|
7355
|
-
t && (e.id =
|
|
7439
|
+
t && (e.id = $r(s, t));
|
|
7356
7440
|
}
|
|
7357
7441
|
}, [
|
|
7358
7442
|
S,
|
|
@@ -7386,8 +7470,8 @@ function ci({ items: e, scopes: t, onSelect: n, value: r, onValueChange: i, open
|
|
|
7386
7470
|
}
|
|
7387
7471
|
//#endregion
|
|
7388
7472
|
//#region src/charts/FilterCombobox/FilterCombobox.tsx
|
|
7389
|
-
function
|
|
7390
|
-
let { listboxId: f, containerRef: p, inputRef: m, isOpen: h, isIdle: g, inputValue: _, highlightedOptionValue: v, activeDescendantId: y, expandedScopes: b, filteredItems: x, toggleScope: S, handleSelect: C, handleClear: w, handleInputChange: T, handleClick: E, handleHighlightOption: D, handleFocus: O, handleKeyDown: k } =
|
|
7473
|
+
function ui({ scopes: e, dataTypes: t, items: n, onSelect: r, placeholder: i = "Search a property...", emptyMessage: a = "No results found.", listLabel: o = "Filter options", inputId: s, value: c, onValueChange: l, open: u, onOpenChange: d }) {
|
|
7474
|
+
let { listboxId: f, containerRef: p, inputRef: m, isOpen: h, isIdle: g, inputValue: _, highlightedOptionValue: v, activeDescendantId: y, expandedScopes: b, filteredItems: x, toggleScope: S, handleSelect: C, handleClear: w, handleInputChange: T, handleClick: E, handleHighlightOption: D, handleFocus: O, handleKeyDown: k } = li({
|
|
7391
7475
|
items: n,
|
|
7392
7476
|
scopes: e,
|
|
7393
7477
|
onSelect: r,
|
|
@@ -7450,7 +7534,7 @@ function li({ scopes: e, dataTypes: t, items: n, onSelect: r, placeholder: i = "
|
|
|
7450
7534
|
className: "text-xs",
|
|
7451
7535
|
children: a
|
|
7452
7536
|
})]
|
|
7453
|
-
}) }), g ? /* @__PURE__ */ Y(
|
|
7537
|
+
}) }), g ? /* @__PURE__ */ Y(ai, {
|
|
7454
7538
|
scopes: e,
|
|
7455
7539
|
dataTypes: t,
|
|
7456
7540
|
items: x,
|
|
@@ -7458,7 +7542,7 @@ function li({ scopes: e, dataTypes: t, items: n, onSelect: r, placeholder: i = "
|
|
|
7458
7542
|
onToggleScope: S,
|
|
7459
7543
|
onSelect: C,
|
|
7460
7544
|
onHighlightOption: D
|
|
7461
|
-
}) : /* @__PURE__ */ Y(
|
|
7545
|
+
}) : /* @__PURE__ */ Y(ci, {
|
|
7462
7546
|
scopes: e,
|
|
7463
7547
|
dataTypes: t,
|
|
7464
7548
|
items: x,
|
|
@@ -7473,4 +7557,4 @@ function li({ scopes: e, dataTypes: t, items: n, onSelect: r, placeholder: i = "
|
|
|
7473
7557
|
});
|
|
7474
7558
|
}
|
|
7475
7559
|
//#endregion
|
|
7476
|
-
export {
|
|
7560
|
+
export { In as AreaChart, Ge as AreaSeries, Je as BarChart, Sr as BarMeter, Ue as BarSeries, Ur as BreakdownChart, Fr as BreakdownChartSkeleton, Kr as BreakdownLegend, qr as BreakdownLegendContent, Jr as BreakdownSummary, Er as BreakdownTooltip, kr as BreakdownTooltipContent, a as CHART_THEMES, g as CartesianChart, m as CategoryAxis, m as XAxis, Re as ChartBrush, De as ChartCard, O as ChartContainer, Le as ChartLegend, Ie as ChartLegendContent, s as ChartStyle, Pe as ChartTooltip, Ne as ChartTooltipContent, _ as DEFAULT_MARGIN, $e as DoughnutChart, ui as FilterCombobox, A as Grid, Fn as LineChart, Ve as LineSeries, vn as Metric, Pn as MetricGroup, D as ReferenceLine, vr as TraceWaterfall, c as ValueAxis, c as YAxis, Wn as buildTimeAxisTicks, e as cn, t as compactTick, zn as computeBarGeometry, Rn as computeTraceDurationNs, Ln as formatDurationNs, Bn as formatTracePercent, cn as resolveSentiment, i as useChartConfig };
|