@databrainhq/plugin 0.17.9-beta.44 → 0.17.9-beta.45
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/{Accordion-Cy-5tB2k.mjs → Accordion-D1u8sDwc.mjs} +1 -1
- package/dist/{CardChartSlot-M8R3rwEo.mjs → CardChartSlot-Iil3U2hW.mjs} +5 -5
- package/dist/{Chart-DI9Q8DYD.mjs → Chart-Ce6XX0KR.mjs} +9 -9
- package/dist/{ChartTypePanel-BBssCpRp.mjs → ChartTypePanel-BEQ0Dc4Y.mjs} +8 -8
- package/dist/{CreateGlobalFilter-a_WfOG2W.mjs → CreateGlobalFilter-BszG2P_m.mjs} +2 -2
- package/dist/{CreateMetricV2-BkXcFrH_.mjs → CreateMetricV2-DBUSNKCk.mjs} +12 -12
- package/dist/{HorizontalStackTable-BhoPbnKc.mjs → HorizontalStackTable-DP3w1LEb.mjs} +3 -3
- package/dist/{ManageMetricsV2-BocEVzO8.mjs → ManageMetricsV2-C6f6Sotz.mjs} +3 -3
- package/dist/{MetricCardV2-iJxepSOH.mjs → MetricCardV2-isE1PWzF.mjs} +6 -6
- package/dist/{NoDataFound-WonH_a0N.mjs → NoDataFound-HB5b9-PV.mjs} +1 -1
- package/dist/{Panel-DRV42pAI.mjs → Panel-C85h8mca.mjs} +1 -1
- package/dist/{PivotTableV2-Dihz35k0.mjs → PivotTableV2-DAHtkLEE.mjs} +2 -2
- package/dist/{PivotTableV3-C5WGgIum.mjs → PivotTableV3-CDtigE8O.mjs} +4 -4
- package/dist/{Portal-Cp67-BDB.mjs → Portal-CuibzRKR.mjs} +2 -2
- package/dist/{RadioButton-BnqOjYK0.mjs → RadioButton-DiMHXeUA.mjs} +1 -1
- package/dist/{ScheduleEmail-DZbdud7C.mjs → ScheduleEmail-DT_0hRkJ.mjs} +6 -6
- package/dist/{SearchMetricData-C8O7Y7CG.mjs → SearchMetricData-DjpmW0XE.mjs} +15 -14
- package/dist/{SortPanel-m7jYuXyi.mjs → SortPanel-DmdsOFRO.mjs} +8 -8
- package/dist/{Table-CckCtD2_.mjs → Table-P2qb56Is.mjs} +4 -4
- package/dist/{TagInputField-CvJbfwSa.mjs → TagInputField-CY9xaxFq.mjs} +4 -4
- package/dist/{TextAreaField-cCGBjB3y.mjs → TextAreaField-BU3BY4z4.mjs} +2 -2
- package/dist/{TimeSeriesSettings-C7aIRx2i.mjs → TimeSeriesSettings-BkTKK2M0.mjs} +2 -2
- package/dist/{cardQueryError-DwznQSq9.mjs → cardQueryError-DM2vJw24.mjs} +9 -9
- package/dist/{charts-kg5_u0Op.mjs → charts-BzunXCJW.mjs} +882 -729
- package/dist/{conditionalFormatting-CS3fx5pm.mjs → conditionalFormatting-D5m1lPxK.mjs} +1 -1
- package/dist/{createGlobalFilter.module-DDGfJPdK.mjs → createGlobalFilter.module-C8-8pim3.mjs} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.mjs +1 -1
- package/dist/{echarts-C9zFEHXn.mjs → echarts-DxJVaxVa.mjs} +2 -2
- package/dist/{metric.mutation-BSjxRaPw.mjs → metric.mutation-Df77huPD.mjs} +1 -1
- package/dist/{permissions-R19Ru6hK.mjs → permissions-Nyp3Lgeh.mjs} +5 -5
- package/dist/{pluginV3Request-D_QKmnO_.mjs → pluginV3Request-Did94D7U.mjs} +1 -1
- package/dist/{renderer-IXdlfK64.mjs → renderer-Bzvr_6cP.mjs} +1 -1
- package/dist/{timeseries-DJvfDNcM.mjs → timeseries-Dfu3sDsr.mjs} +1 -1
- package/dist/{toTasteAppearance-y_fBMeqX.mjs → toTasteAppearance-Cf4_ozsS.mjs} +3 -3
- package/dist/{useGuesTokenUsageLog-Bqm0Oiv4.mjs → useGuesTokenUsageLog-CijLKr0J.mjs} +1 -1
- package/dist/{usePublishArchivedMetrics-B-SePnEf.mjs → usePublishArchivedMetrics-B9mfNTG4.mjs} +2 -2
- package/dist/{useQuery-BqW8Qb29.mjs → useQuery-D5CGZYoM.mjs} +1 -1
- package/dist/webcomponents.es.js +26 -26
- package/dist/webcomponents.umd.js +248 -248
- package/package.json +1 -1
|
@@ -2,8 +2,8 @@ import "react";
|
|
|
2
2
|
import "react-dom";
|
|
3
3
|
import "react-dom/client";
|
|
4
4
|
import { r as e } from "./rolldown-runtime-C1JUX4Ur.mjs";
|
|
5
|
-
import { $ as t, A as n, B as r, C as i, D as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, U as y, V as b, W as x, X as S, Z as C, _ as w, a as T, b as E, c as D, d as O, f as ee, g as k, h as A, j, k as M, l as N, m as
|
|
6
|
-
import { a as
|
|
5
|
+
import { $ as t, A as n, B as r, C as i, D as a, F as o, G as s, H as c, J as l, K as u, L as d, M as f, N as p, O as m, P as h, Q as g, R as _, S as v, U as y, V as b, W as x, X as S, Z as C, _ as w, a as T, b as E, c as D, d as O, f as ee, g as k, h as A, j, k as M, l as N, m as P, n as te, o as ne, p as F, r as re, s as I, t as ie, u as ae, v as oe, w as L, y as se } from "./option-B1zeYJnm.mjs";
|
|
6
|
+
import { a as ce, c as R, i as z, n as le, o as ue, r as de, s as fe } from "./contrast-EppiiunY.mjs";
|
|
7
7
|
import { i as B, r as pe, t as me } from "./rendererRegistry-CYIIExVw.mjs";
|
|
8
8
|
import { Ar as he, Xr as ge, f as _e, h as ve } from "./echarts-CrmHGsP0.mjs";
|
|
9
9
|
import { t as ye } from "./loading-state-C-J1F-xq.mjs";
|
|
@@ -497,8 +497,8 @@ var Z = [], pt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet
|
|
|
497
497
|
linearGauge: ["bar", "scatter"]
|
|
498
498
|
}, dn = (e, t, n) => [
|
|
499
499
|
"base",
|
|
500
|
-
...n ? un[n] : e ? mn(e) : Object.keys(rn),
|
|
501
|
-
...!e && !n || e === "radial" ? ["polar"] : [],
|
|
500
|
+
...e === "rose" ? ["bar"] : n ? un[n] : e ? mn(e) : Object.keys(rn),
|
|
501
|
+
...!e && !n || e === "radial" || e === "rose" ? ["polar"] : [],
|
|
502
502
|
t
|
|
503
503
|
], fn = (e, t, n) => dn(e, t, n).every((e) => sn.has(e)), pn = async (e, t, n) => {
|
|
504
504
|
await ln(), await Promise.all(dn(e, t, n).map(cn));
|
|
@@ -515,14 +515,14 @@ function mn(e) {
|
|
|
515
515
|
case "row":
|
|
516
516
|
case "horizontalStack":
|
|
517
517
|
case "progressBarV2":
|
|
518
|
-
case "radial":
|
|
518
|
+
case "radial":
|
|
519
|
+
case "rose": return ["bar"];
|
|
519
520
|
case "linearGauge":
|
|
520
521
|
case "linearGaugeV2": return ["bar", "scatter"];
|
|
521
522
|
case "combo":
|
|
522
523
|
case "bullet": return ["bar", "line"];
|
|
523
524
|
case "pie":
|
|
524
|
-
case "doughnut":
|
|
525
|
-
case "rose": return ["pie"];
|
|
525
|
+
case "doughnut": return ["pie"];
|
|
526
526
|
case "radar": return ["radar"];
|
|
527
527
|
case "scatter":
|
|
528
528
|
case "bubble": return ["scatter"];
|
|
@@ -862,7 +862,7 @@ function In(e, t) {
|
|
|
862
862
|
let a = typeof e == "number" && typeof n == "number" ? e - n : String(e).localeCompare(String(n));
|
|
863
863
|
return a === 0 ? t - i : a < 0 ? -r : r;
|
|
864
864
|
}
|
|
865
|
-
let s = n === "category" ?
|
|
865
|
+
let s = n === "category" ? se(e.categories[t], e.categories[i]) : (a[t] ?? 0) - (a[i] ?? 0);
|
|
866
866
|
return s === 0 ? t - i : s < 0 ? -r : r;
|
|
867
867
|
}), s.every((e, t) => e === t) ? null : s;
|
|
868
868
|
}
|
|
@@ -1298,22 +1298,32 @@ function br(e, t) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
return yr.set(e, t), t;
|
|
1300
1300
|
}
|
|
1301
|
+
var xr = "Other";
|
|
1302
|
+
function Sr(e) {
|
|
1303
|
+
if (e.length <= 12) return [...e];
|
|
1304
|
+
let t = [...e].sort((e, t) => t.value - e.value || e.colorIndex - t.colorIndex).slice(0, 11), n = new Set(t.map((e) => e.colorIndex)), r = e.filter((e) => !n.has(e.colorIndex)), i = t.some((e) => e.name === "Other") ? "Other categories" : xr;
|
|
1305
|
+
return [...t, {
|
|
1306
|
+
name: i,
|
|
1307
|
+
value: r.reduce((e, t) => e + t.value, 0),
|
|
1308
|
+
colorIndex: 11
|
|
1309
|
+
}];
|
|
1310
|
+
}
|
|
1301
1311
|
//#endregion
|
|
1302
1312
|
//#region ../core/src/charts/customChartRegistry.ts
|
|
1303
|
-
var
|
|
1304
|
-
let t =
|
|
1313
|
+
var Cr = /* @__PURE__ */ new Map(), wr = (e) => e.startsWith("custom:"), Tr = (e) => wr(e) && Cr.has(e), Er = /* @__PURE__ */ new Map(), Dr = /* @__PURE__ */ new Set(), Or = (e) => Dr.has(e), kr = (e) => {
|
|
1314
|
+
let t = Er.get(e);
|
|
1305
1315
|
if (t) return t;
|
|
1306
|
-
let n =
|
|
1316
|
+
let n = Cr.get(e);
|
|
1307
1317
|
if (!n) return Promise.reject(/* @__PURE__ */ Error(`Chart type is not registered: ${e}`));
|
|
1308
1318
|
let r = ln().then(() => {
|
|
1309
1319
|
for (let [e, t] of Object.entries(n.shapes ?? {})) he(e, t);
|
|
1310
|
-
ve(e, n.renderItem),
|
|
1320
|
+
ve(e, n.renderItem), Dr.add(e);
|
|
1311
1321
|
}).catch((t) => {
|
|
1312
|
-
throw
|
|
1322
|
+
throw Er.delete(e), t;
|
|
1313
1323
|
});
|
|
1314
|
-
return
|
|
1315
|
-
},
|
|
1316
|
-
let { type: t } = e.props, n =
|
|
1324
|
+
return Er.set(e, r), r;
|
|
1325
|
+
}, Ar = (e) => {
|
|
1326
|
+
let { type: t } = e.props, n = wr(t) ? Cr.get(t) : void 0;
|
|
1317
1327
|
if (!n) throw Error(`Chart type is not registered: ${t}`);
|
|
1318
1328
|
let r = n.buildOption(e);
|
|
1319
1329
|
return {
|
|
@@ -1324,11 +1334,11 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1324
1334
|
renderItem: t
|
|
1325
1335
|
}))
|
|
1326
1336
|
};
|
|
1327
|
-
},
|
|
1337
|
+
}, jr = (e, t, n) => {
|
|
1328
1338
|
let [r, i] = q(0), a = U(() => i((e) => e + 1), []), [o, s] = q({ key: "" }), c = `${e ?? "*"}:${t}:${n ?? ""}:${r}`;
|
|
1329
1339
|
return W(() => {
|
|
1330
1340
|
let r = !1, i = ft(t);
|
|
1331
|
-
if (fn(e, i, n) && (!e || !
|
|
1341
|
+
if (fn(e, i, n) && (!e || !wr(e) || Or(e))) {
|
|
1332
1342
|
s({
|
|
1333
1343
|
key: c,
|
|
1334
1344
|
renderer: i,
|
|
@@ -1337,7 +1347,7 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1337
1347
|
return;
|
|
1338
1348
|
}
|
|
1339
1349
|
return (async () => {
|
|
1340
|
-
await pn(e, i, n), e &&
|
|
1350
|
+
await pn(e, i, n), e && wr(e) && await kr(e);
|
|
1341
1351
|
})().then(() => {
|
|
1342
1352
|
r || s({
|
|
1343
1353
|
key: c,
|
|
@@ -1364,7 +1374,7 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1364
1374
|
readyRenderer: o.requestedRenderer === t ? o.renderer : void 0,
|
|
1365
1375
|
retry: a
|
|
1366
1376
|
};
|
|
1367
|
-
},
|
|
1377
|
+
}, Mr = {
|
|
1368
1378
|
position: "absolute",
|
|
1369
1379
|
width: 1,
|
|
1370
1380
|
height: 1,
|
|
@@ -1375,7 +1385,7 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1375
1385
|
clipPath: "inset(50%)",
|
|
1376
1386
|
whiteSpace: "nowrap",
|
|
1377
1387
|
border: 0
|
|
1378
|
-
},
|
|
1388
|
+
}, Nr = (e, t, n = !1) => ({
|
|
1379
1389
|
height: "100%",
|
|
1380
1390
|
minHeight: e,
|
|
1381
1391
|
flex: "1 1 auto",
|
|
@@ -1383,11 +1393,11 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1383
1393
|
display: "flex",
|
|
1384
1394
|
flexDirection: "column"
|
|
1385
1395
|
} : null
|
|
1386
|
-
}),
|
|
1396
|
+
}), Pr = (e) => ({
|
|
1387
1397
|
height: "100%",
|
|
1388
1398
|
minHeight: e,
|
|
1389
1399
|
flex: "1 1 auto"
|
|
1390
|
-
}),
|
|
1400
|
+
}), Fr = {
|
|
1391
1401
|
margin: 0,
|
|
1392
1402
|
flex: "0 0 auto",
|
|
1393
1403
|
fontSize: 13,
|
|
@@ -1400,73 +1410,75 @@ var xr = /* @__PURE__ */ new Map(), Sr = (e) => e.startsWith("custom:"), Cr = (e
|
|
|
1400
1410
|
overflowWrap: "anywhere",
|
|
1401
1411
|
overflow: "hidden",
|
|
1402
1412
|
paddingBottom: 10
|
|
1403
|
-
},
|
|
1413
|
+
}, Ir = {
|
|
1404
1414
|
fontSize: 13,
|
|
1405
1415
|
color: "var(--muted-foreground, #52525b)",
|
|
1406
1416
|
textAlign: "center",
|
|
1407
1417
|
padding: "0 16px"
|
|
1408
|
-
},
|
|
1418
|
+
}, Lr = ({ rootRef: e, className: t, minHeight: n, hostSized: r = !1, answer: i, answerLineId: a, busy: o, hostProps: s, children: c }) => /* @__PURE__ */ Y("div", {
|
|
1409
1419
|
ref: e,
|
|
1410
1420
|
className: V("dbn-chart relative w-full", t),
|
|
1411
1421
|
"aria-busy": o,
|
|
1412
|
-
style:
|
|
1422
|
+
style: Nr(n, i, r),
|
|
1413
1423
|
children: [
|
|
1414
1424
|
i ? /* @__PURE__ */ J("p", {
|
|
1415
1425
|
id: a,
|
|
1416
1426
|
"data-dbn-chart-answer-line": "",
|
|
1417
1427
|
title: i,
|
|
1418
|
-
style:
|
|
1428
|
+
style: Fr,
|
|
1419
1429
|
children: i
|
|
1420
1430
|
}) : null,
|
|
1421
1431
|
/* @__PURE__ */ J("div", {
|
|
1422
1432
|
...s,
|
|
1423
|
-
style:
|
|
1433
|
+
style: Pr(n)
|
|
1424
1434
|
}),
|
|
1425
1435
|
c
|
|
1426
1436
|
]
|
|
1427
|
-
}),
|
|
1428
|
-
style:
|
|
1437
|
+
}), Rr = ({ children: e }) => /* @__PURE__ */ J("span", {
|
|
1438
|
+
style: Ir,
|
|
1429
1439
|
children: e
|
|
1430
|
-
}),
|
|
1431
|
-
let
|
|
1432
|
-
columns:
|
|
1440
|
+
}), zr = (e) => typeof e == "object" && e && !Array.isArray(e) ? e : void 0, Br = (e) => Array.isArray(e) ? e.map(Br).join(", ") : e == null ? re : typeof e == "object" ? JSON.stringify(e) : String(e), Vr = (e, t, n, r) => {
|
|
1441
|
+
let i = [e.xAxis, e.yAxis].flatMap((e) => Array.isArray(e) ? e : [e]).map(zr).find((e) => Array.isArray(e?.data))?.data, a = (Array.isArray(e.series) ? e.series : e.series ? [e.series] : []).map(zr), o = d(n, {
|
|
1442
|
+
columns: a.flatMap((e) => typeof e?.name == "string" ? [e.name] : []),
|
|
1433
1443
|
fallback: t
|
|
1434
1444
|
});
|
|
1435
|
-
return
|
|
1436
|
-
let
|
|
1445
|
+
return a.flatMap((e, t) => !e || !Array.isArray(e.data) ? [] : e.data.flatMap((n, a) => {
|
|
1446
|
+
let s = zr(n), c = s && "value" in s ? s.value : n, l = s && "dbnRaw" in s ? s.dbnRaw : c;
|
|
1447
|
+
if (r === "rose" && l == null) return [];
|
|
1448
|
+
let u = Br(s?.dbnSeriesName ?? e.name ?? `Series ${t + 1}`);
|
|
1437
1449
|
return {
|
|
1438
|
-
series:
|
|
1439
|
-
category:
|
|
1440
|
-
value: (typeof
|
|
1441
|
-
rawValue:
|
|
1450
|
+
series: u,
|
|
1451
|
+
category: Br(s?.dbnCategory ?? s?.name ?? i?.[a] ?? a + 1),
|
|
1452
|
+
value: (typeof l == "number" || l == null) && o ? o(l, u) : Br(l),
|
|
1453
|
+
rawValue: l,
|
|
1442
1454
|
seriesIndex: t,
|
|
1443
|
-
dataIndex:
|
|
1455
|
+
dataIndex: a
|
|
1444
1456
|
};
|
|
1445
1457
|
})).slice(0, 200);
|
|
1446
|
-
},
|
|
1447
|
-
for (
|
|
1448
|
-
let e =
|
|
1458
|
+
}, Hr = (e) => e ? String(e).replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").toLowerCase() : "data", Ur = "The chart could not load. Reload the chart to try again.", Wr = /* @__PURE__ */ new WeakMap(), Gr = 24, Kr = /* @__PURE__ */ new Map(), qr = (e, t) => {
|
|
1459
|
+
for (Kr.delete(e), Kr.set(e, t); Kr.size > Gr;) {
|
|
1460
|
+
let e = Kr.entries().next().value;
|
|
1449
1461
|
if (!e) break;
|
|
1450
|
-
|
|
1462
|
+
Kr.delete(e[0]), e[1]();
|
|
1451
1463
|
}
|
|
1452
|
-
},
|
|
1453
|
-
|
|
1464
|
+
}, Jr = (e) => {
|
|
1465
|
+
Kr.delete(e);
|
|
1454
1466
|
};
|
|
1455
|
-
function
|
|
1467
|
+
function Yr(e, t, n) {
|
|
1456
1468
|
if (e && n) {
|
|
1457
|
-
let t =
|
|
1469
|
+
let t = Wr.get(e);
|
|
1458
1470
|
if (t) return t;
|
|
1459
1471
|
}
|
|
1460
1472
|
let r = ke(e, t);
|
|
1461
|
-
return e &&
|
|
1473
|
+
return e && Wr.set(e, r), r;
|
|
1462
1474
|
}
|
|
1463
|
-
var
|
|
1464
|
-
function
|
|
1475
|
+
var Xr = 192, Zr = (e, t) => typeof e == "number" && Number.isFinite(e) && e >= 0 ? e : t ? S(t, Xr) : Xr, Qr = (e) => typeof e == "number" && Number.isFinite(e) && e >= 0;
|
|
1476
|
+
function $r() {
|
|
1465
1477
|
if (typeof window > "u") return 1;
|
|
1466
1478
|
let e = window.devicePixelRatio;
|
|
1467
1479
|
return Number.isFinite(e) && e > 0 ? e : 1;
|
|
1468
1480
|
}
|
|
1469
|
-
var
|
|
1481
|
+
var ei = ({ chartProps: e, selection: t, className: n, ariaLabel: r, answerLine: i, chartType: a, minHeight: o, emptyState: s, isEmpty: c = !1 }) => {
|
|
1470
1482
|
let l = Pe(), [u, d] = q(null), [f, p] = q("loading"), [m, h] = q(), g = K(null), _ = K(e.onDataPointClick);
|
|
1471
1483
|
Fe(() => {
|
|
1472
1484
|
_.current = e.onDataPointClick;
|
|
@@ -1475,7 +1487,7 @@ var Qr = ({ chartProps: e, selection: t, className: n, ariaLabel: r, answerLine:
|
|
|
1475
1487
|
Fe(() => {
|
|
1476
1488
|
y.current = v;
|
|
1477
1489
|
}, [v]);
|
|
1478
|
-
let b = U((e) => _.current?.(e), []), x = r?.trim() || `${
|
|
1490
|
+
let b = U((e) => _.current?.(e), []), x = r?.trim() || `${Hr(a)} chart`, S = Zr(o, a), C = i?.trim() ? i.trim() : void 0;
|
|
1479
1491
|
return W(() => {
|
|
1480
1492
|
if (!u) return;
|
|
1481
1493
|
let e = !1;
|
|
@@ -1510,10 +1522,10 @@ var Qr = ({ chartProps: e, selection: t, className: n, ariaLabel: r, answerLine:
|
|
|
1510
1522
|
t
|
|
1511
1523
|
]), W(() => {
|
|
1512
1524
|
f === "ready" && g.current?.update(v);
|
|
1513
|
-
}, [v, f]), /* @__PURE__ */ Y(
|
|
1525
|
+
}, [v, f]), /* @__PURE__ */ Y(Lr, {
|
|
1514
1526
|
className: n,
|
|
1515
1527
|
minHeight: S,
|
|
1516
|
-
hostSized:
|
|
1528
|
+
hostSized: Qr(o),
|
|
1517
1529
|
answer: C,
|
|
1518
1530
|
answerLineId: l,
|
|
1519
1531
|
busy: f === "loading",
|
|
@@ -1529,16 +1541,16 @@ var Qr = ({ chartProps: e, selection: t, className: n, ariaLabel: r, answerLine:
|
|
|
1529
1541
|
children: f === "error" ? /* @__PURE__ */ J(De, {
|
|
1530
1542
|
state: "error",
|
|
1531
1543
|
chartType: a,
|
|
1532
|
-
message:
|
|
1544
|
+
message: Ur,
|
|
1533
1545
|
detail: m
|
|
1534
1546
|
}) : /* @__PURE__ */ J(ye, { label: "Loading chart" })
|
|
1535
1547
|
}), c && f === "ready" ? /* @__PURE__ */ J("div", {
|
|
1536
1548
|
className: "absolute inset-0 flex items-center justify-center",
|
|
1537
|
-
children: s ?? /* @__PURE__ */ J(
|
|
1549
|
+
children: s ?? /* @__PURE__ */ J(Rr, { children: C ?? "No data" })
|
|
1538
1550
|
}) : null]
|
|
1539
1551
|
});
|
|
1540
1552
|
};
|
|
1541
|
-
function
|
|
1553
|
+
function ti(e, t) {
|
|
1542
1554
|
if (!t) return;
|
|
1543
1555
|
let n = Object.entries(t).map(([t, n]) => {
|
|
1544
1556
|
let r = (t) => {
|
|
@@ -1555,41 +1567,41 @@ function $r(e, t) {
|
|
|
1555
1567
|
});
|
|
1556
1568
|
};
|
|
1557
1569
|
}
|
|
1558
|
-
function
|
|
1570
|
+
function ni(e) {
|
|
1559
1571
|
return e ? Object.keys(e).sort().join("|") : "";
|
|
1560
1572
|
}
|
|
1561
|
-
var
|
|
1573
|
+
var ri = /* @__PURE__ */ new Set(), ii = null, ai = null, oi = null, si = null, ci = [
|
|
1562
1574
|
"color-scheme",
|
|
1563
1575
|
"class",
|
|
1564
1576
|
"data-theme",
|
|
1565
1577
|
"data-dbn-ui",
|
|
1566
1578
|
"style"
|
|
1567
|
-
],
|
|
1568
|
-
function
|
|
1579
|
+
], li = /* @__PURE__ */ new Map();
|
|
1580
|
+
function ui(e) {
|
|
1569
1581
|
if (!e || typeof ShadowRoot != "function") return null;
|
|
1570
1582
|
let t = e.getRootNode?.();
|
|
1571
1583
|
return t instanceof ShadowRoot ? t : null;
|
|
1572
1584
|
}
|
|
1573
|
-
function
|
|
1574
|
-
let t =
|
|
1585
|
+
function di(e) {
|
|
1586
|
+
let t = ui(e);
|
|
1575
1587
|
if (!t || typeof MutationObserver != "function") return null;
|
|
1576
|
-
let n =
|
|
1588
|
+
let n = li.get(t);
|
|
1577
1589
|
if (n) return n.count += 1, t;
|
|
1578
|
-
let r = new MutationObserver(
|
|
1590
|
+
let r = new MutationObserver(vi);
|
|
1579
1591
|
return r.observe(t.host, {
|
|
1580
1592
|
attributes: !0,
|
|
1581
|
-
attributeFilter: [...
|
|
1582
|
-
}), r.observe(t, { childList: !0 }),
|
|
1593
|
+
attributeFilter: [...ci]
|
|
1594
|
+
}), r.observe(t, { childList: !0 }), li.set(t, {
|
|
1583
1595
|
observer: r,
|
|
1584
1596
|
count: 1
|
|
1585
1597
|
}), t;
|
|
1586
1598
|
}
|
|
1587
|
-
function
|
|
1599
|
+
function fi(e) {
|
|
1588
1600
|
if (!e) return;
|
|
1589
|
-
let t =
|
|
1590
|
-
t && (--t.count, !(t.count > 0) && (t.observer.disconnect(),
|
|
1601
|
+
let t = li.get(e);
|
|
1602
|
+
t && (--t.count, !(t.count > 0) && (t.observer.disconnect(), li.delete(e)));
|
|
1591
1603
|
}
|
|
1592
|
-
function
|
|
1604
|
+
function pi() {
|
|
1593
1605
|
if (typeof document > "u") return "";
|
|
1594
1606
|
let e = document.documentElement;
|
|
1595
1607
|
if (!e) return "";
|
|
@@ -1597,55 +1609,55 @@ function di() {
|
|
|
1597
1609
|
e.getAttribute("class") ?? "",
|
|
1598
1610
|
e.getAttribute("data-theme") ?? "",
|
|
1599
1611
|
e.getAttribute("style") ?? "",
|
|
1600
|
-
|
|
1612
|
+
ai?.matches ? "dark" : "light"
|
|
1601
1613
|
];
|
|
1602
|
-
for (let e of
|
|
1603
|
-
for (let n of
|
|
1614
|
+
for (let e of li.keys()) {
|
|
1615
|
+
for (let n of ci) t.push(e.host.getAttribute(n) ?? "");
|
|
1604
1616
|
t.push(String(e.childElementCount));
|
|
1605
1617
|
}
|
|
1606
1618
|
return t.join("\0");
|
|
1607
1619
|
}
|
|
1608
|
-
var
|
|
1609
|
-
|
|
1610
|
-
},
|
|
1611
|
-
let n = Math.min(e.length, t +
|
|
1620
|
+
var mi = 4, hi = null, gi = () => {
|
|
1621
|
+
hi !== null && (typeof cancelAnimationFrame == "function" && cancelAnimationFrame(hi), hi = null);
|
|
1622
|
+
}, _i = (e, t) => {
|
|
1623
|
+
let n = Math.min(e.length, t + mi);
|
|
1612
1624
|
for (let r = t; r < n; r += 1) {
|
|
1613
1625
|
let t = e[r];
|
|
1614
|
-
|
|
1626
|
+
ri.has(t) && t();
|
|
1615
1627
|
}
|
|
1616
1628
|
if (n >= e.length) {
|
|
1617
|
-
|
|
1629
|
+
hi = null;
|
|
1618
1630
|
return;
|
|
1619
1631
|
}
|
|
1620
1632
|
if (typeof requestAnimationFrame != "function") {
|
|
1621
|
-
|
|
1633
|
+
_i(e, n);
|
|
1622
1634
|
return;
|
|
1623
1635
|
}
|
|
1624
|
-
|
|
1625
|
-
|
|
1636
|
+
hi = requestAnimationFrame(() => {
|
|
1637
|
+
hi = null, _i(e, n);
|
|
1626
1638
|
});
|
|
1627
|
-
},
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
let e =
|
|
1631
|
-
(
|
|
1639
|
+
}, vi = () => {
|
|
1640
|
+
oi && clearTimeout(oi), oi = setTimeout(() => {
|
|
1641
|
+
oi = null;
|
|
1642
|
+
let e = pi();
|
|
1643
|
+
(si === null || e !== si) && (si = e, H(), gi(), _i(Array.from(ri), 0));
|
|
1632
1644
|
}, 120);
|
|
1633
1645
|
};
|
|
1634
|
-
function
|
|
1635
|
-
|
|
1636
|
-
let n =
|
|
1637
|
-
return !
|
|
1646
|
+
function yi(e, t) {
|
|
1647
|
+
ri.add(e);
|
|
1648
|
+
let n = di(t);
|
|
1649
|
+
return !ii && typeof MutationObserver == "function" && typeof document < "u" ? (ii = new MutationObserver(vi), ii.observe(document.documentElement, {
|
|
1638
1650
|
attributes: !0,
|
|
1639
1651
|
attributeFilter: [
|
|
1640
1652
|
"class",
|
|
1641
1653
|
"data-theme",
|
|
1642
1654
|
"style"
|
|
1643
1655
|
]
|
|
1644
|
-
}),
|
|
1645
|
-
|
|
1656
|
+
}), ai = typeof matchMedia == "function" ? matchMedia("(prefers-color-scheme: dark)") : null, ai?.addEventListener?.("change", vi), si = pi()) : n && (si = pi()), () => {
|
|
1657
|
+
ri.delete(e), fi(n), !(ri.size > 0) && (oi &&= (clearTimeout(oi), null), gi(), ii?.disconnect(), ii = null, ai?.removeEventListener?.("change", vi), ai = null, si = null);
|
|
1646
1658
|
};
|
|
1647
1659
|
}
|
|
1648
|
-
function
|
|
1660
|
+
function bi(e, t) {
|
|
1649
1661
|
if (!ut() || typeof window > "u") return () => {};
|
|
1650
1662
|
window.__dbnCharts || (window.__dbnCharts = []);
|
|
1651
1663
|
let n = window.__dbnCharts, r = {
|
|
@@ -1661,60 +1673,60 @@ function vi(e, t) {
|
|
|
1661
1673
|
e >= 0 && n.splice(e, 1);
|
|
1662
1674
|
};
|
|
1663
1675
|
}
|
|
1664
|
-
var
|
|
1665
|
-
function
|
|
1676
|
+
var xi = 20;
|
|
1677
|
+
function Si(e, t, n) {
|
|
1666
1678
|
if (!e || !ut() || typeof window > "u") return;
|
|
1667
1679
|
let r = window.__dbnCharts?.find((t) => t.host === e);
|
|
1668
1680
|
if (!r) return;
|
|
1669
1681
|
let i = r.timings[t];
|
|
1670
|
-
i.push(n), i.length >
|
|
1682
|
+
i.push(n), i.length > xi && i.shift();
|
|
1671
1683
|
}
|
|
1672
|
-
var
|
|
1673
|
-
|
|
1674
|
-
let e = Array.from(
|
|
1675
|
-
|
|
1684
|
+
var Ci = () => typeof performance < "u" && typeof performance.now == "function" ? performance.now() : 0, wi = 32, Ti = 16, Ei = 1200, Di = (e) => e === "auto" || e === "scroll" || e === "overlay", Oi = 2, ki = 320, Ai = 1, ji = /* @__PURE__ */ new Set(), Mi = null, Ni = () => {
|
|
1685
|
+
Mi = null;
|
|
1686
|
+
let e = Array.from(ji);
|
|
1687
|
+
ji.clear();
|
|
1676
1688
|
for (let t of e) t.prime();
|
|
1677
1689
|
for (let t of e) t.ready();
|
|
1678
|
-
},
|
|
1679
|
-
setTimeout(
|
|
1680
|
-
}) :
|
|
1681
|
-
|
|
1682
|
-
}),
|
|
1683
|
-
|
|
1684
|
-
let e = Array.from(
|
|
1690
|
+
}, Pi = (e) => (ji.add(e), Mi === null && typeof requestAnimationFrame == "function" ? Mi = requestAnimationFrame(() => {
|
|
1691
|
+
setTimeout(Ni, 0);
|
|
1692
|
+
}) : Mi === null && (Mi = -1, setTimeout(Ni, 0)), () => {
|
|
1693
|
+
ji.delete(e);
|
|
1694
|
+
}), Fi = /* @__PURE__ */ new Set(), Ii = !1, Li = null, Ri = () => Ii, zi = () => {
|
|
1695
|
+
Ii = !0;
|
|
1696
|
+
let e = Array.from(Fi);
|
|
1685
1697
|
Re(() => {
|
|
1686
|
-
|
|
1698
|
+
ji.size > 0 && Ni();
|
|
1687
1699
|
for (let t of e) t.unfreeze();
|
|
1688
1700
|
}), Re(() => {
|
|
1689
1701
|
for (let t of e) t.paint();
|
|
1690
1702
|
});
|
|
1691
|
-
},
|
|
1692
|
-
|
|
1693
|
-
for (let e of Array.from(
|
|
1694
|
-
},
|
|
1695
|
-
window.removeEventListener("beforeprint",
|
|
1703
|
+
}, Bi = () => {
|
|
1704
|
+
Ii = !1;
|
|
1705
|
+
for (let e of Array.from(Fi)) e.restore();
|
|
1706
|
+
}, Vi = (e) => (Fi.add(e), !Li && typeof window < "u" && (window.addEventListener("beforeprint", zi), window.addEventListener("afterprint", Bi), Li = () => {
|
|
1707
|
+
window.removeEventListener("beforeprint", zi), window.removeEventListener("afterprint", Bi);
|
|
1696
1708
|
}), () => {
|
|
1697
|
-
|
|
1698
|
-
}),
|
|
1699
|
-
function
|
|
1709
|
+
Fi.delete(e), !(Fi.size > 0) && (Li?.(), Li = null);
|
|
1710
|
+
}), Hi = 1200;
|
|
1711
|
+
function Ui(e, t) {
|
|
1700
1712
|
let n = (e, t) => Number.isFinite(e) && e > 0 ? Math.max(t, Math.floor(e / t) * t) : 0;
|
|
1701
1713
|
return {
|
|
1702
|
-
width: n(e,
|
|
1703
|
-
height: n(t,
|
|
1714
|
+
width: n(e, wi),
|
|
1715
|
+
height: n(t, Ti)
|
|
1704
1716
|
};
|
|
1705
1717
|
}
|
|
1706
|
-
function
|
|
1718
|
+
function Wi(e) {
|
|
1707
1719
|
return `${e.width}x${e.height}`;
|
|
1708
1720
|
}
|
|
1709
|
-
var
|
|
1710
|
-
function
|
|
1721
|
+
var Gi = (e, t) => typeof t == "function" ? `fn:${t.toString()}` : t;
|
|
1722
|
+
function Ki(e, t) {
|
|
1711
1723
|
try {
|
|
1712
|
-
return `${t}\u0000${JSON.stringify(e,
|
|
1724
|
+
return `${t}\u0000${JSON.stringify(e, Gi)}`;
|
|
1713
1725
|
} catch {
|
|
1714
1726
|
return `unserialisable:${Math.random()}`;
|
|
1715
1727
|
}
|
|
1716
1728
|
}
|
|
1717
|
-
var
|
|
1729
|
+
var qi = {
|
|
1718
1730
|
request: (e) => typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => e()) : setTimeout(e, 0),
|
|
1719
1731
|
cancel: (e) => {
|
|
1720
1732
|
if (typeof cancelAnimationFrame == "function") {
|
|
@@ -1724,56 +1736,67 @@ var Gi = {
|
|
|
1724
1736
|
clearTimeout(e);
|
|
1725
1737
|
}
|
|
1726
1738
|
};
|
|
1727
|
-
function
|
|
1739
|
+
function Ji(e, t = qi, n = !1) {
|
|
1728
1740
|
if (typeof e?.getZr != "function") return () => {};
|
|
1729
|
-
let
|
|
1730
|
-
if (!
|
|
1731
|
-
let
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1741
|
+
let r = e.getZr();
|
|
1742
|
+
if (!r || typeof r.on != "function") return () => {};
|
|
1743
|
+
let i = null, a = 0, o = 0, s = !1, c = () => {
|
|
1744
|
+
if (i = null, s && (s = !1, !e.isDisposed())) {
|
|
1745
|
+
if (n) {
|
|
1746
|
+
let t = r.findHover?.(a, o)?.target, n = e.convertFromPixel?.({ polarIndex: 0 }, [a, o]), i = Array.isArray(n) ? n[1] : null;
|
|
1747
|
+
t?.type === "sector" && typeof i == "number" && Number.isInteger(i) && i >= 0 && i < 12 ? e.dispatchAction({
|
|
1748
|
+
type: "showTip",
|
|
1749
|
+
seriesIndex: i,
|
|
1750
|
+
dataIndex: i
|
|
1751
|
+
}) : e.dispatchAction({ type: "hideTip" });
|
|
1752
|
+
return;
|
|
1753
|
+
}
|
|
1754
|
+
e.dispatchAction({
|
|
1755
|
+
type: "showTip",
|
|
1756
|
+
x: a,
|
|
1757
|
+
y: o
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
}, l = (n) => {
|
|
1738
1761
|
qt(e, !0);
|
|
1739
|
-
let
|
|
1740
|
-
if (!
|
|
1762
|
+
let r = gr();
|
|
1763
|
+
if (!r.mousemove) return;
|
|
1741
1764
|
let l = n, u = l?.offsetX ?? l?.zrX, d = l?.offsetY ?? l?.zrY;
|
|
1742
1765
|
if (typeof u == "number" && typeof d == "number") {
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1766
|
+
if (a = u, o = d, s = !0, !r.throttle) {
|
|
1767
|
+
i !== null && t.cancel(i), i = null, c();
|
|
1745
1768
|
return;
|
|
1746
1769
|
}
|
|
1747
|
-
|
|
1770
|
+
i === null && (i = t.request(c));
|
|
1748
1771
|
}
|
|
1749
|
-
},
|
|
1750
|
-
qt(e, !1),
|
|
1772
|
+
}, u = () => {
|
|
1773
|
+
qt(e, !1), s = !1, i !== null && (t.cancel(i), i = null), !e.isDisposed() && (e.dispatchAction({ type: "hideTip" }), e.dispatchAction({ type: "downplay" }), e.dispatchAction({
|
|
1751
1774
|
type: "updateAxisPointer",
|
|
1752
1775
|
currTrigger: "leave"
|
|
1753
1776
|
}));
|
|
1754
1777
|
};
|
|
1755
|
-
return
|
|
1756
|
-
qt(e, !1),
|
|
1778
|
+
return r.on("mousemove", l), r.on("globalout", u), () => {
|
|
1779
|
+
qt(e, !1), i !== null && (t.cancel(i), i = null), s = !1;
|
|
1757
1780
|
try {
|
|
1758
|
-
|
|
1781
|
+
r.off?.("mousemove", l), r.off?.("globalout", u);
|
|
1759
1782
|
} catch {}
|
|
1760
1783
|
};
|
|
1761
1784
|
}
|
|
1762
|
-
var
|
|
1763
|
-
let { isReady: S, error: w, readyRenderer: T, retry: E } =
|
|
1785
|
+
var Yi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, renderer: a = "canvas", family: o, className: s, ariaLabel: c, answerLine: d, chartType: f, minHeight: p, emptyState: m, isEmpty: h = !1, onDataPointClick: _, onEvents: v, valueFormatter: b }) => {
|
|
1786
|
+
let { isReady: S, error: w, readyRenderer: T, retry: E } = jr(f, a, o), D = K(null), O = K(null), ee = Pe(), k = Pe(), A = K(null), j = U(() => {
|
|
1764
1787
|
let e = A.current;
|
|
1765
1788
|
return e ? e.isDisposed?.() ? (A.current = null, null) : e : null;
|
|
1766
|
-
}, []), [M, N] = q([]), [
|
|
1789
|
+
}, []), [M, N] = q([]), [P, te] = q(!1), ne = K(""), F = K(-1), [re, I] = q(""), [ie, ae] = q(0), [oe, L] = q(!0), [se, ce] = q(!1), R = K(!1), z = K(!1), le = K(null), ue = K(!1), [de, fe] = q(0), B = K(!0), pe = K(!1), me = K(null), he = K(null), ge = K(null);
|
|
1767
1790
|
Fe(() => {
|
|
1768
|
-
B.current =
|
|
1769
|
-
}, [
|
|
1770
|
-
let ve =
|
|
1791
|
+
B.current = oe, pe.current = se;
|
|
1792
|
+
}, [oe, se]);
|
|
1793
|
+
let ve = se && !oe, H = Me.useCallback(() => pe.current && !B.current, []), ke = K(!1), Ae = _r(n, r, i), Ne = br(Ae, {
|
|
1771
1794
|
appearance: n,
|
|
1772
1795
|
adminTheme: r,
|
|
1773
1796
|
chartColors: i
|
|
1774
|
-
}), Le = Ie(x, y, () => !0), Re = G(() =>
|
|
1797
|
+
}), Le = Ie(x, y, () => !0), Re = G(() => Yr(D.current, Ne, H()), [
|
|
1775
1798
|
Ne,
|
|
1776
|
-
|
|
1799
|
+
ie,
|
|
1777
1800
|
H
|
|
1778
1801
|
]), ze = K({
|
|
1779
1802
|
width: 0,
|
|
@@ -1792,14 +1815,14 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1792
1815
|
width: e.width,
|
|
1793
1816
|
height: e.height
|
|
1794
1817
|
});
|
|
1795
|
-
let n = X.current, r =
|
|
1818
|
+
let n = X.current, r = Ui(n.width || t.clientWidth, n.height || t.clientHeight), i = Wi(r);
|
|
1796
1819
|
i !== He.current && (He.current = i, ze.current = r, Ve(i));
|
|
1797
1820
|
}, []), qe = K(Ne);
|
|
1798
1821
|
qe.current = Ne, W(() => {
|
|
1799
1822
|
let e = D.current;
|
|
1800
1823
|
if (!e) return;
|
|
1801
1824
|
if (typeof ResizeObserver != "function") {
|
|
1802
|
-
Oe(e, qe.current), Ke(),
|
|
1825
|
+
Oe(e, qe.current), Ke(), ae((e) => e + 1), Ge(!0);
|
|
1803
1826
|
return;
|
|
1804
1827
|
}
|
|
1805
1828
|
let t = !1, n = null, r = new ResizeObserver((r) => {
|
|
@@ -1807,15 +1830,15 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1807
1830
|
i && (Ke({
|
|
1808
1831
|
width: i.width,
|
|
1809
1832
|
height: i.height
|
|
1810
|
-
}), !t && (t = !0, n =
|
|
1833
|
+
}), !t && (t = !0, n = Pi({
|
|
1811
1834
|
prime: () => Oe(e, qe.current),
|
|
1812
1835
|
ready: () => {
|
|
1813
|
-
|
|
1836
|
+
ae((e) => e + 1), Ge(!0);
|
|
1814
1837
|
}
|
|
1815
1838
|
})));
|
|
1816
1839
|
});
|
|
1817
1840
|
return r.observe(e), ge.current = () => {
|
|
1818
|
-
t || (t = !0, Ke(), Oe(e, qe.current),
|
|
1841
|
+
t || (t = !0, Ke(), Oe(e, qe.current), ae((e) => e + 1), Ge(!0));
|
|
1819
1842
|
}, () => {
|
|
1820
1843
|
ge.current = null, r.disconnect(), n?.();
|
|
1821
1844
|
};
|
|
@@ -1828,27 +1851,27 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1828
1851
|
}
|
|
1829
1852
|
let t = null, n = null, r = (e) => {
|
|
1830
1853
|
if (e) {
|
|
1831
|
-
t &&= (clearTimeout(t), null), B.current || Oe(D.current, qe.current),
|
|
1854
|
+
t &&= (clearTimeout(t), null), B.current || Oe(D.current, qe.current), L(!0);
|
|
1832
1855
|
return;
|
|
1833
1856
|
}
|
|
1834
|
-
t ||
|
|
1835
|
-
t = null,
|
|
1836
|
-
},
|
|
1857
|
+
t || Ri() || (t = setTimeout(() => {
|
|
1858
|
+
t = null, L(!1);
|
|
1859
|
+
}, Hi));
|
|
1837
1860
|
}, i = (e, t) => {
|
|
1838
1861
|
let n = Math.round(t || 0);
|
|
1839
|
-
return e < 768 || typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches ? Math.max(
|
|
1862
|
+
return e < 768 || typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches ? Math.max(ki, Ai * n) : Math.max(Ei, Oi * n);
|
|
1840
1863
|
}, a = () => {
|
|
1841
1864
|
let t = e.ownerDocument, n = e;
|
|
1842
1865
|
for (; n;) {
|
|
1843
1866
|
let e = n.assignedSlot ?? n.parentElement ?? (n.getRootNode().host || null);
|
|
1844
1867
|
if (!e || e === t.body || e === t.documentElement) return !1;
|
|
1845
1868
|
let r = getComputedStyle(e);
|
|
1846
|
-
if (
|
|
1869
|
+
if (Di(r.overflowY) && e.scrollHeight > e.clientHeight + 1 || Di(r.overflowX) && e.scrollWidth > e.clientWidth + 1) return !0;
|
|
1847
1870
|
n = e;
|
|
1848
1871
|
}
|
|
1849
1872
|
return !1;
|
|
1850
|
-
}, o = (e) =>
|
|
1851
|
-
pe.current = !0,
|
|
1873
|
+
}, o = (e) => Di(getComputedStyle(e).overflowY), s = (t, a) => {
|
|
1874
|
+
pe.current = !0, ce(!0), Ri() || (B.current = !1, L(!1));
|
|
1852
1875
|
let o = !1;
|
|
1853
1876
|
n = new IntersectionObserver(([e]) => {
|
|
1854
1877
|
let t = !!e?.isIntersecting;
|
|
@@ -1857,11 +1880,11 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1857
1880
|
return;
|
|
1858
1881
|
}
|
|
1859
1882
|
if (o = !0, !a()) {
|
|
1860
|
-
n?.disconnect(), n = null, pe.current = !1, B.current = !0,
|
|
1883
|
+
n?.disconnect(), n = null, pe.current = !1, B.current = !0, ce(!1), L(!0);
|
|
1861
1884
|
return;
|
|
1862
1885
|
}
|
|
1863
|
-
let i = t ||
|
|
1864
|
-
B.current = i,
|
|
1886
|
+
let i = t || Ri();
|
|
1887
|
+
B.current = i, L(i);
|
|
1865
1888
|
}, {
|
|
1866
1889
|
root: t,
|
|
1867
1890
|
rootMargin: `${i(window.innerWidth, window.innerHeight)}px 0px`,
|
|
@@ -1870,7 +1893,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1870
1893
|
}, c = e.closest("[data-dashboard-scroll]");
|
|
1871
1894
|
return c ? s(c, () => o(c)) : s(null, () => !a()), me.current = {
|
|
1872
1895
|
unfreeze: () => {
|
|
1873
|
-
t &&= (clearTimeout(t), null), pe.current && !B.current && (B.current = !0,
|
|
1896
|
+
t &&= (clearTimeout(t), null), pe.current && !B.current && (B.current = !0, L(!0));
|
|
1874
1897
|
},
|
|
1875
1898
|
restore: () => {
|
|
1876
1899
|
n && (n.unobserve(e), n.observe(e));
|
|
@@ -1878,19 +1901,19 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1878
1901
|
}, () => {
|
|
1879
1902
|
me.current = null, t && clearTimeout(t), n?.disconnect(), n = null;
|
|
1880
1903
|
};
|
|
1881
|
-
}, []), W(() =>
|
|
1904
|
+
}, []), W(() => Vi({
|
|
1882
1905
|
unfreeze: () => {
|
|
1883
1906
|
ge.current?.(), me.current?.unfreeze();
|
|
1884
1907
|
},
|
|
1885
1908
|
paint: () => {
|
|
1886
|
-
he.current?.(), ke.current &&
|
|
1909
|
+
he.current?.(), ke.current && te(!0);
|
|
1887
1910
|
},
|
|
1888
1911
|
restore: () => me.current?.restore()
|
|
1889
1912
|
}), []);
|
|
1890
|
-
let Je = K(
|
|
1913
|
+
let Je = K(oe);
|
|
1891
1914
|
Fe(() => {
|
|
1892
|
-
!Je.current &&
|
|
1893
|
-
}, [
|
|
1915
|
+
!Je.current && oe && ae((e) => e + 1), Je.current = oe;
|
|
1916
|
+
}, [oe]);
|
|
1894
1917
|
let Ye = K(null), Xe = K(null), Ze = K(null), Qe = K(null), $e = K(!1), et = K(null), tt = K(null), nt = K(null), [rt, it] = q(null), at = Ie(t, l, l);
|
|
1895
1918
|
W(() => {
|
|
1896
1919
|
if (!(a !== "canvas" || ve || H())) return C();
|
|
@@ -1907,7 +1930,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1907
1930
|
let i = g({
|
|
1908
1931
|
cssWidth: n,
|
|
1909
1932
|
cssHeight: r,
|
|
1910
|
-
devicePixelRatio:
|
|
1933
|
+
devicePixelRatio: $r(),
|
|
1911
1934
|
liveCharts: at
|
|
1912
1935
|
});
|
|
1913
1936
|
i !== t && (nt.current = i, it(i));
|
|
@@ -1952,55 +1975,55 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
1952
1975
|
let { snapshot: n } = xe(e, () => t?.dispose());
|
|
1953
1976
|
A.current = null;
|
|
1954
1977
|
let r = n ?? et.current;
|
|
1955
|
-
return et.current = r, r ? (e.replaceChildren(r),
|
|
1978
|
+
return et.current = r, r ? (e.replaceChildren(r), qr(e, () => {
|
|
1956
1979
|
et.current === r && (Te(e), et.current = null);
|
|
1957
1980
|
})) : e.replaceChildren(), $e.current = ke.current, () => {
|
|
1958
|
-
|
|
1981
|
+
Jr(e), !B.current && (Te(e), tt.current = null, et.current = null);
|
|
1959
1982
|
};
|
|
1960
1983
|
}
|
|
1961
|
-
let t = u(X.current.width || e.clientWidth, X.current.height || e.clientHeight,
|
|
1984
|
+
let t = u(X.current.width || e.clientWidth, X.current.height || e.clientHeight, $r()), n = rt === t ? rt : t;
|
|
1962
1985
|
nt.current = n;
|
|
1963
1986
|
let r = ft(a);
|
|
1964
1987
|
if (r !== T) {
|
|
1965
1988
|
E();
|
|
1966
1989
|
return;
|
|
1967
1990
|
}
|
|
1968
|
-
let i =
|
|
1991
|
+
let i = Ci(), o = _e(e, void 0, {
|
|
1969
1992
|
renderer: r,
|
|
1970
1993
|
width: X.current.width || "auto",
|
|
1971
1994
|
height: X.current.height || "auto",
|
|
1972
1995
|
...r === "canvas" ? { devicePixelRatio: n } : {}
|
|
1973
1996
|
});
|
|
1974
1997
|
A.current = o;
|
|
1975
|
-
let s =
|
|
1976
|
-
|
|
1977
|
-
let l =
|
|
1998
|
+
let s = bi(e, o), c = hr(o);
|
|
1999
|
+
Si(e, "init", Ci() - i);
|
|
2000
|
+
let l = Ji(o, void 0, f === "rose"), d = et.current ?? Se(e);
|
|
1978
2001
|
if (et.current = null, d) {
|
|
1979
|
-
ke.current = !0,
|
|
2002
|
+
ke.current = !0, te(!0);
|
|
1980
2003
|
let t = o.getZr?.()?.painter?.getViewportRoot?.();
|
|
1981
2004
|
be(d, t) || (Te(e), tt.current = null);
|
|
1982
2005
|
}
|
|
1983
|
-
let
|
|
2006
|
+
let p = () => `${e.clientWidth}x${e.clientHeight}@${$r()}`, m = "", h = () => {
|
|
1984
2007
|
if (!o.isDisposed() && e.clientWidth > 0 && e.clientHeight > 0) {
|
|
1985
|
-
let t =
|
|
1986
|
-
if (t ===
|
|
2008
|
+
let t = p();
|
|
2009
|
+
if (t === m || (m = t, o.resize({
|
|
1987
2010
|
width: "auto",
|
|
1988
2011
|
height: "auto"
|
|
1989
2012
|
}), Ke(), r !== "canvas")) return;
|
|
1990
|
-
let n = u(e.clientWidth, e.clientHeight,
|
|
2013
|
+
let n = u(e.clientWidth, e.clientHeight, $r());
|
|
1991
2014
|
n !== nt.current && (nt.current = n, it(n));
|
|
1992
2015
|
}
|
|
1993
|
-
},
|
|
2016
|
+
}, g = () => {
|
|
1994
2017
|
if (R.current || z.current) {
|
|
1995
|
-
le.current =
|
|
2018
|
+
le.current = h;
|
|
1996
2019
|
return;
|
|
1997
2020
|
}
|
|
1998
|
-
m();
|
|
1999
|
-
}, g = new ResizeObserver(() => {
|
|
2000
2021
|
h();
|
|
2022
|
+
}, _ = new ResizeObserver(() => {
|
|
2023
|
+
g();
|
|
2001
2024
|
});
|
|
2002
|
-
return
|
|
2003
|
-
if (
|
|
2025
|
+
return _.observe(e), () => {
|
|
2026
|
+
if (_.disconnect(), Qe.current?.(), Qe.current = null, he.current = null, Ze.current = null, le.current === h && (le.current = null), s(), c(), l(), H()) {
|
|
2004
2027
|
let { snapshot: t } = xe(e, () => o.dispose());
|
|
2005
2028
|
et.current = t;
|
|
2006
2029
|
} else if (Ue.current) {
|
|
@@ -2017,12 +2040,12 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2017
2040
|
rt,
|
|
2018
2041
|
H,
|
|
2019
2042
|
E
|
|
2020
|
-
]), W(() =>
|
|
2021
|
-
je(D.current), !H() &&
|
|
2043
|
+
]), W(() => yi(() => {
|
|
2044
|
+
je(D.current), !H() && ae((e) => e + 1);
|
|
2022
2045
|
}, O.current), [H]), W(() => {
|
|
2023
2046
|
let t = j();
|
|
2024
2047
|
if (!t || !S || !We || H()) return;
|
|
2025
|
-
if ((R.current || z.current) && !
|
|
2048
|
+
if ((R.current || z.current) && !Ri()) {
|
|
2026
2049
|
ue.current = !0;
|
|
2027
2050
|
return;
|
|
2028
2051
|
}
|
|
@@ -2033,7 +2056,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2033
2056
|
chartType: f
|
|
2034
2057
|
}), r = n.series, i = Array.isArray(r) ? r.map((e, t) => String(e.id ?? `${String(e.type ?? "")}#${t}`)).join("|") : String(r?.id ?? r?.type ?? "single"), a = i !== Ye.current;
|
|
2035
2058
|
if (t.isDisposed()) return;
|
|
2036
|
-
let o =
|
|
2059
|
+
let o = Ki(n, `${Ae}\u0000${He.current}\u0000${f ?? ""}\u0000${Le ? "1" : "0"}`);
|
|
2037
2060
|
if (tt.current && tt.current !== o && (Te(D.current), tt.current = null), Xe.current === o || Ze.current === o) return;
|
|
2038
2061
|
Qe.current?.(), Qe.current = null, he.current = null, Ze.current = null;
|
|
2039
2062
|
let s = $t(O.current), c = s ? nn(s, o) : null;
|
|
@@ -2050,14 +2073,14 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2050
2073
|
animation: !1
|
|
2051
2074
|
} : n;
|
|
2052
2075
|
Xe.current = o, Ye.current = i;
|
|
2053
|
-
let c =
|
|
2076
|
+
let c = Ci();
|
|
2054
2077
|
t.setOption(s, {
|
|
2055
2078
|
notMerge: a,
|
|
2056
2079
|
lazyUpdate: !1
|
|
2057
|
-
}),
|
|
2058
|
-
let l =
|
|
2059
|
-
u !==
|
|
2060
|
-
}, u = O.current, d = u?.closest("[data-dashboard-scroll]") ?? null, p = !ke.current || $e.current, m =
|
|
2080
|
+
}), Si(D.current, "setOption", Ci() - c), Te(D.current), tt.current = null, ke.current = !0, te(!0);
|
|
2081
|
+
let l = Vr(n, b, Ne.appearance, f), u = JSON.stringify(l);
|
|
2082
|
+
u !== ne.current && (ne.current = u, F.current = -1, I(""), N(l));
|
|
2083
|
+
}, u = O.current, d = u?.closest("[data-dashboard-scroll]") ?? null, p = !ke.current || $e.current, m = Ri();
|
|
2061
2084
|
if (p && u && d && !m) {
|
|
2062
2085
|
let e = (e) => {
|
|
2063
2086
|
Qe.current = null, he.current = null, Ze.current = null, l(!e);
|
|
@@ -2095,11 +2118,11 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2095
2118
|
let e = j();
|
|
2096
2119
|
if (!e || !T || !st) return;
|
|
2097
2120
|
let t = (e) => {
|
|
2098
|
-
let t = e.value;
|
|
2121
|
+
let t = zr(e.data), n = t && "dbnRaw" in t ? t.dbnRaw : e.value;
|
|
2099
2122
|
ot.current?.({
|
|
2100
|
-
seriesName: e.seriesName ?? "",
|
|
2101
|
-
category: e.name ?? "",
|
|
2102
|
-
value: typeof
|
|
2123
|
+
seriesName: t && typeof t.dbnSeriesName == "string" ? t.dbnSeriesName : e.seriesName ?? "",
|
|
2124
|
+
category: t && typeof t.dbnCategory == "string" ? t.dbnCategory : e.name ?? "",
|
|
2125
|
+
value: typeof n == "number" ? n : null
|
|
2103
2126
|
});
|
|
2104
2127
|
};
|
|
2105
2128
|
e.on("click", t);
|
|
@@ -2133,7 +2156,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2133
2156
|
Fe(() => {
|
|
2134
2157
|
lt.current = v;
|
|
2135
2158
|
}, [v]);
|
|
2136
|
-
let ut =
|
|
2159
|
+
let ut = ni(v);
|
|
2137
2160
|
W(() => {
|
|
2138
2161
|
let e = j();
|
|
2139
2162
|
if (!e || !T || !ut) return;
|
|
@@ -2143,7 +2166,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2143
2166
|
lt.current?.[e]?.(...t);
|
|
2144
2167
|
};
|
|
2145
2168
|
});
|
|
2146
|
-
let n =
|
|
2169
|
+
let n = ti(e, t);
|
|
2147
2170
|
return () => {
|
|
2148
2171
|
e.isDisposed() || n?.();
|
|
2149
2172
|
};
|
|
@@ -2156,12 +2179,12 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2156
2179
|
rt,
|
|
2157
2180
|
j
|
|
2158
2181
|
]);
|
|
2159
|
-
let dt = d?.trim() ? d.trim() : void 0, Z =
|
|
2160
|
-
return /* @__PURE__ */ Y(
|
|
2182
|
+
let dt = d?.trim() ? d.trim() : void 0, Z = Zr(p, f), pt = c?.trim() || `${Hr(f)} chart`;
|
|
2183
|
+
return /* @__PURE__ */ Y(Lr, {
|
|
2161
2184
|
rootRef: O,
|
|
2162
2185
|
className: s,
|
|
2163
2186
|
minHeight: Z,
|
|
2164
|
-
hostSized:
|
|
2187
|
+
hostSized: Qr(p),
|
|
2165
2188
|
answer: dt,
|
|
2166
2189
|
answerLineId: ee,
|
|
2167
2190
|
busy: !S && !w,
|
|
@@ -2175,7 +2198,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2175
2198
|
onKeyDown: (e) => {
|
|
2176
2199
|
let t = M.length;
|
|
2177
2200
|
if (!t) return;
|
|
2178
|
-
let n =
|
|
2201
|
+
let n = F.current;
|
|
2179
2202
|
if (e.key === "Enter" || e.key === " ") {
|
|
2180
2203
|
let t = M[n];
|
|
2181
2204
|
if (!t) return;
|
|
@@ -2199,13 +2222,13 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2199
2222
|
else if (e.key === "Home") n = 0;
|
|
2200
2223
|
else if (e.key === "End") n = t - 1;
|
|
2201
2224
|
else if (e.key === "Escape") {
|
|
2202
|
-
e.preventDefault(), j()?.dispatchAction({ type: "downplay" }), j()?.dispatchAction({ type: "hideTip" }),
|
|
2225
|
+
e.preventDefault(), j()?.dispatchAction({ type: "downplay" }), j()?.dispatchAction({ type: "hideTip" }), F.current = -1, I("");
|
|
2203
2226
|
return;
|
|
2204
2227
|
} else return;
|
|
2205
2228
|
e.preventDefault();
|
|
2206
2229
|
let r = M[n];
|
|
2207
2230
|
if (!r) return;
|
|
2208
|
-
|
|
2231
|
+
F.current = n;
|
|
2209
2232
|
let i = j();
|
|
2210
2233
|
i?.dispatchAction({ type: "downplay" }), i?.dispatchAction({
|
|
2211
2234
|
type: "highlight",
|
|
@@ -2215,7 +2238,7 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2215
2238
|
type: "showTip",
|
|
2216
2239
|
seriesIndex: r.seriesIndex,
|
|
2217
2240
|
dataIndex: r.dataIndex
|
|
2218
|
-
}),
|
|
2241
|
+
}), I(`${r.series}, ${r.category}: ${r.value}`);
|
|
2219
2242
|
},
|
|
2220
2243
|
className: V("w-full focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)", h && "invisible")
|
|
2221
2244
|
},
|
|
@@ -2223,11 +2246,11 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2223
2246
|
/* @__PURE__ */ J("span", {
|
|
2224
2247
|
id: k,
|
|
2225
2248
|
role: "status",
|
|
2226
|
-
style:
|
|
2227
|
-
children:
|
|
2249
|
+
style: Mr,
|
|
2250
|
+
children: re || "Use the arrow keys to move through chart values. Press Enter or Space to activate a value. Press Escape to clear the data cursor."
|
|
2228
2251
|
}),
|
|
2229
2252
|
M.length ? /* @__PURE__ */ J("div", {
|
|
2230
|
-
style:
|
|
2253
|
+
style: Mr,
|
|
2231
2254
|
children: /* @__PURE__ */ Y("table", { children: [
|
|
2232
2255
|
/* @__PURE__ */ Y("caption", { children: [pt, " data"] }),
|
|
2233
2256
|
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", { children: [
|
|
@@ -2254,19 +2277,19 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2254
2277
|
] }, `${e.seriesIndex}:${e.dataIndex}`)) })
|
|
2255
2278
|
] })
|
|
2256
2279
|
}) : null,
|
|
2257
|
-
!S || !
|
|
2280
|
+
!S || !P ? /* @__PURE__ */ J("div", {
|
|
2258
2281
|
className: "absolute inset-0",
|
|
2259
2282
|
children: w ? /* @__PURE__ */ J(De, {
|
|
2260
2283
|
state: "error",
|
|
2261
2284
|
chartType: f,
|
|
2262
|
-
message:
|
|
2285
|
+
message: Ur,
|
|
2263
2286
|
detail: w,
|
|
2264
2287
|
onRetry: E
|
|
2265
2288
|
}) : /* @__PURE__ */ J(ye, { label: "Loading chart" })
|
|
2266
2289
|
}) : null,
|
|
2267
2290
|
h && S ? /* @__PURE__ */ J("div", {
|
|
2268
2291
|
className: "absolute inset-0 flex items-center justify-center",
|
|
2269
|
-
children: m ?? /* @__PURE__ */ J(
|
|
2292
|
+
children: m ?? /* @__PURE__ */ J(Rr, { children: dt ?? "No data" })
|
|
2270
2293
|
}) : null
|
|
2271
2294
|
]
|
|
2272
2295
|
});
|
|
@@ -2275,22 +2298,22 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2275
2298
|
...e,
|
|
2276
2299
|
minHeight: n.minHeight
|
|
2277
2300
|
} : e, i = n?.type ?? r.chartType, a = i ? pe(i) : { kind: "builtin" };
|
|
2278
|
-
return a.kind !== "builtin" && n ? /* @__PURE__ */ J(
|
|
2301
|
+
return a.kind !== "builtin" && n ? /* @__PURE__ */ J(ei, {
|
|
2279
2302
|
...r,
|
|
2280
2303
|
chartProps: n,
|
|
2281
2304
|
selection: a
|
|
2282
|
-
}) : /* @__PURE__ */ J(
|
|
2283
|
-
},
|
|
2284
|
-
let t =
|
|
2305
|
+
}) : /* @__PURE__ */ J(Yi, { ...r });
|
|
2306
|
+
}, Xi = (e) => `This tile uses a custom chart (${e}) that is not available here.`, Zi = "flex w-full min-h-20 items-center justify-center p-3 text-center text-sm text-muted-foreground", Qi = (e) => {
|
|
2307
|
+
let t = Tr(e.type), n = pe(e.type).kind !== "builtin", r = U((t, n) => Ar({
|
|
2285
2308
|
props: e,
|
|
2286
2309
|
theme: t,
|
|
2287
2310
|
layout: n
|
|
2288
2311
|
}), [e]);
|
|
2289
2312
|
if (!t && !n) return /* @__PURE__ */ J("div", {
|
|
2290
|
-
className: V(
|
|
2313
|
+
className: V(Zi, e.className),
|
|
2291
2314
|
role: "status",
|
|
2292
2315
|
"data-custom-chart-unavailable": e.type,
|
|
2293
|
-
children:
|
|
2316
|
+
children: Xi(e.type)
|
|
2294
2317
|
});
|
|
2295
2318
|
let i = t ? !e.data.categories.length || !e.data.series.length : !1;
|
|
2296
2319
|
return /* @__PURE__ */ J($, {
|
|
@@ -2303,8 +2326,8 @@ var qi = ({ buildOption: e, appearance: n, adminTheme: r, chartColors: i, render
|
|
|
2303
2326
|
};
|
|
2304
2327
|
//#endregion
|
|
2305
2328
|
//#region ../core/src/charts/types/LineChart.tsx
|
|
2306
|
-
function
|
|
2307
|
-
let a =
|
|
2329
|
+
function $i(e, t, n, r, i) {
|
|
2330
|
+
let a = oe(t, n, r);
|
|
2308
2331
|
return {
|
|
2309
2332
|
type: e,
|
|
2310
2333
|
pointCount: t,
|
|
@@ -2312,7 +2335,7 @@ function Zi(e, t, n, r, i) {
|
|
|
2312
2335
|
...i === !0 ? { applyDensity: !0 } : {}
|
|
2313
2336
|
};
|
|
2314
2337
|
}
|
|
2315
|
-
var
|
|
2338
|
+
var ea = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, renderer: a, family: o, valueFormatter: s, className: c, ariaLabel: l, answerLine: u, onDataPointClick: d, onEvents: f, applyDensity: p }) => {
|
|
2316
2339
|
let m = U((r, i) => {
|
|
2317
2340
|
let a = e === "stepped", o = w(n, r, {
|
|
2318
2341
|
type: e,
|
|
@@ -2320,7 +2343,7 @@ var Qi = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2320
2343
|
categoryCount: t.categories.length,
|
|
2321
2344
|
valueFormatter: s,
|
|
2322
2345
|
stacked: !1
|
|
2323
|
-
}), c = N(r, n?.chartLabel), l =
|
|
2346
|
+
}), c = N(r, n?.chartLabel), l = $i(e, t.categories.length, i, n?.horizontalAxis?.fontSize ?? r.text.fontSize, p), u = (e) => s ? s(e.value ?? null, e.seriesName) : String(e.value ?? "");
|
|
2324
2347
|
return {
|
|
2325
2348
|
...k(r, n, {
|
|
2326
2349
|
valueFormatter: s,
|
|
@@ -2329,19 +2352,19 @@ var Qi = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2329
2352
|
categoryCount: t.categories.length
|
|
2330
2353
|
}),
|
|
2331
2354
|
xAxis: {
|
|
2332
|
-
...
|
|
2355
|
+
...I(r, n?.horizontalAxis, "category", void 0, {
|
|
2333
2356
|
categories: t.categories,
|
|
2334
2357
|
orientation: "bottom",
|
|
2335
2358
|
layout: i
|
|
2336
2359
|
}),
|
|
2337
2360
|
data: t.categories
|
|
2338
2361
|
},
|
|
2339
|
-
yAxis:
|
|
2362
|
+
yAxis: I(r, n?.verticalAxis, "value", s, {
|
|
2340
2363
|
scale: o.valueScale,
|
|
2341
2364
|
includeValues: o.includeValues
|
|
2342
2365
|
}),
|
|
2343
2366
|
series: t.series.map((e, t) => {
|
|
2344
|
-
let i = e.color ?? r.palette[t % r.palette.length], s =
|
|
2367
|
+
let i = e.color ?? r.palette[t % r.palette.length], s = L(r, i, n?.chartMarkers?.show, l);
|
|
2345
2368
|
return {
|
|
2346
2369
|
name: e.name,
|
|
2347
2370
|
type: "line",
|
|
@@ -2353,7 +2376,7 @@ var Qi = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2353
2376
|
step: "end",
|
|
2354
2377
|
smooth: !1
|
|
2355
2378
|
} : {},
|
|
2356
|
-
...
|
|
2379
|
+
...ae(n?.chartLabelOverlap?.strategy, Ve),
|
|
2357
2380
|
label: c.show ? {
|
|
2358
2381
|
...c,
|
|
2359
2382
|
formatter: u
|
|
@@ -2384,8 +2407,8 @@ var Qi = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2384
2407
|
onDataPointClick: d,
|
|
2385
2408
|
onEvents: f
|
|
2386
2409
|
});
|
|
2387
|
-
},
|
|
2388
|
-
function
|
|
2410
|
+
}, ta = "total";
|
|
2411
|
+
function na(e, t) {
|
|
2389
2412
|
let n = Math.max(0, Math.min(1, t)), r = /^#([0-9a-fA-F]{3})$/, i = /^#([0-9a-fA-F]{6})$/, a = e;
|
|
2390
2413
|
if (r.test(a)) {
|
|
2391
2414
|
let [, e, t, n] = r.exec(a);
|
|
@@ -2397,7 +2420,7 @@ function ea(e, t) {
|
|
|
2397
2420
|
}
|
|
2398
2421
|
return n <= 0 ? "transparent" : e;
|
|
2399
2422
|
}
|
|
2400
|
-
var
|
|
2423
|
+
var ra = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, renderer: a, family: o, valueFormatter: s, className: c, ariaLabel: l, answerLine: u, onDataPointClick: d, onEvents: f, applyDensity: p }) => {
|
|
2401
2424
|
let m = U((r, i) => {
|
|
2402
2425
|
let a = e === "stackedArea", o = w(n, r, {
|
|
2403
2426
|
type: e,
|
|
@@ -2405,7 +2428,7 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2405
2428
|
categoryCount: t.categories.length,
|
|
2406
2429
|
valueFormatter: s,
|
|
2407
2430
|
stacked: a
|
|
2408
|
-
}), c = N(r, n?.chartLabel), l =
|
|
2431
|
+
}), c = N(r, n?.chartLabel), l = $i(e, t.categories.length, i, n?.horizontalAxis?.fontSize ?? r.text.fontSize, p), u = (e) => {
|
|
2409
2432
|
let t = e.data;
|
|
2410
2433
|
if (o.percentShare && typeof t == "object" && t && "dbnRaw" in t) {
|
|
2411
2434
|
let t = e.value;
|
|
@@ -2422,25 +2445,25 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2422
2445
|
percentShare: o.percentShare
|
|
2423
2446
|
}),
|
|
2424
2447
|
xAxis: {
|
|
2425
|
-
...
|
|
2448
|
+
...I(r, n?.horizontalAxis, "category", void 0, {
|
|
2426
2449
|
categories: t.categories,
|
|
2427
2450
|
orientation: "bottom",
|
|
2428
2451
|
layout: i
|
|
2429
2452
|
}),
|
|
2430
2453
|
data: t.categories
|
|
2431
2454
|
},
|
|
2432
|
-
yAxis:
|
|
2455
|
+
yAxis: I(r, n?.verticalAxis, "value", s, {
|
|
2433
2456
|
scale: o.valueScale,
|
|
2434
2457
|
percentAxis: o.percentAxis,
|
|
2435
2458
|
includeValues: o.includeValues
|
|
2436
2459
|
}),
|
|
2437
2460
|
series: t.series.map((e, t) => {
|
|
2438
|
-
let i = e.color ?? r.palette[t % r.palette.length], s = a ? e.stack ??
|
|
2461
|
+
let i = e.color ?? r.palette[t % r.palette.length], s = a ? e.stack ?? ta : e.stack, f = d ? { color: new ge(0, 0, 0, 1, [{
|
|
2439
2462
|
offset: 0,
|
|
2440
|
-
color:
|
|
2463
|
+
color: na(i, .32)
|
|
2441
2464
|
}, {
|
|
2442
2465
|
offset: 1,
|
|
2443
|
-
color:
|
|
2466
|
+
color: na(i, 0)
|
|
2444
2467
|
}]) } : {
|
|
2445
2468
|
color: i,
|
|
2446
2469
|
opacity: a ? .55 : .14
|
|
@@ -2452,9 +2475,9 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2452
2475
|
color: i,
|
|
2453
2476
|
...s ? { stack: s } : {},
|
|
2454
2477
|
...t === o.markLineSeriesIndex && o.markLine ? { markLine: o.markLine } : {},
|
|
2455
|
-
...
|
|
2478
|
+
...L(r, i, n?.chartMarkers?.show, l),
|
|
2456
2479
|
areaStyle: f,
|
|
2457
|
-
...
|
|
2480
|
+
...ae(n?.chartLabelOverlap?.strategy, Ve),
|
|
2458
2481
|
label: c.show ? {
|
|
2459
2482
|
...c,
|
|
2460
2483
|
formatter: u
|
|
@@ -2485,11 +2508,11 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2485
2508
|
onDataPointClick: d,
|
|
2486
2509
|
onEvents: f
|
|
2487
2510
|
});
|
|
2488
|
-
},
|
|
2511
|
+
}, ia = (e) => Math.min(255, Math.max(0, Math.round(e))), aa = (e, t, n) => `#${[
|
|
2489
2512
|
e,
|
|
2490
2513
|
t,
|
|
2491
2514
|
n
|
|
2492
|
-
].map((e) =>
|
|
2515
|
+
].map((e) => ia(e).toString(16).padStart(2, "0")).join("")}`, oa = (e, t, n) => {
|
|
2493
2516
|
let r = ue(e);
|
|
2494
2517
|
if (!r) return null;
|
|
2495
2518
|
let i = (t + 1) / (n + 1), a = t % 2 == 0, o = [
|
|
@@ -2497,17 +2520,17 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2497
2520
|
r.g,
|
|
2498
2521
|
r.b
|
|
2499
2522
|
].map((e) => a ? e + (255 - e) * i : e * (1 - i));
|
|
2500
|
-
return
|
|
2501
|
-
},
|
|
2523
|
+
return aa(o[0], o[1], o[2]);
|
|
2524
|
+
}, sa = (e, t) => {
|
|
2502
2525
|
if (!e.length || t <= 0) return [];
|
|
2503
2526
|
let n = Math.floor(t / e.length), r = n > 0 ? n + 2 : 5, i = [];
|
|
2504
2527
|
for (let n = 0; n < t; n += 1) if (n < e.length) i.push(e[n]);
|
|
2505
2528
|
else {
|
|
2506
2529
|
let t = e[(n - e.length) % e.length], a = Math.floor((n - e.length) / e.length) % r;
|
|
2507
|
-
i.push(
|
|
2530
|
+
i.push(oa(t, a, r) ?? t);
|
|
2508
2531
|
}
|
|
2509
2532
|
return i;
|
|
2510
|
-
},
|
|
2533
|
+
}, ca = "__dbn_stack__", la = 4, ua = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colorBy: a, mutedCategory: o, renderer: s, family: c, valueFormatter: l, className: u, ariaLabel: d, answerLine: f, onDataPointClick: p, onEvents: m }) => {
|
|
2511
2534
|
let h = Me.useCallback((r, i) => {
|
|
2512
2535
|
let s = e === "stack" || e === "horizontalStack", c = e === "row" || e === "horizontalStack", u = c && (i?.width ?? Infinity) < 240 && n?.chartLabel?.position == null, d = w(n, r, {
|
|
2513
2536
|
type: e,
|
|
@@ -2522,18 +2545,18 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2522
2545
|
return typeof t == "number" && Number.isFinite(t) ? `${Math.round(t)}%` : "";
|
|
2523
2546
|
}
|
|
2524
2547
|
return l ? l(e.value ?? null, e.seriesName) : String(e.value ?? "");
|
|
2525
|
-
}, m = f.show === !0 &&
|
|
2548
|
+
}, m = f.show === !0 && ce(f.position), h = t.series.map((e) => s ? e.stack ?? ca : void 0), g = /* @__PURE__ */ new Map();
|
|
2526
2549
|
h.forEach((e, t) => {
|
|
2527
2550
|
e !== void 0 && g.set(e, t);
|
|
2528
2551
|
});
|
|
2529
2552
|
let _ = c ? [
|
|
2530
2553
|
0,
|
|
2531
|
-
|
|
2532
|
-
|
|
2554
|
+
la,
|
|
2555
|
+
la,
|
|
2533
2556
|
0
|
|
2534
2557
|
] : [
|
|
2535
|
-
|
|
2536
|
-
|
|
2558
|
+
la,
|
|
2559
|
+
la,
|
|
2537
2560
|
0,
|
|
2538
2561
|
0
|
|
2539
2562
|
], v = [
|
|
@@ -2541,7 +2564,7 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2541
2564
|
0,
|
|
2542
2565
|
0,
|
|
2543
2566
|
0
|
|
2544
|
-
], y =
|
|
2567
|
+
], y = I(r, c ? n?.verticalAxis : n?.horizontalAxis, "category", void 0, {
|
|
2545
2568
|
categories: t.categories,
|
|
2546
2569
|
orientation: c ? "left" : "bottom",
|
|
2547
2570
|
layout: i
|
|
@@ -2561,11 +2584,11 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2561
2584
|
data: t.categories,
|
|
2562
2585
|
...c ? { inverse: !0 } : {},
|
|
2563
2586
|
...u ? { show: !1 } : {}
|
|
2564
|
-
}, C =
|
|
2587
|
+
}, C = I(r, c ? n?.horizontalAxis : n?.verticalAxis, "value", l, {
|
|
2565
2588
|
scale: d.valueScale,
|
|
2566
2589
|
percentAxis: d.percentAxis,
|
|
2567
2590
|
includeValues: d.includeValues
|
|
2568
|
-
}), E = a === "data" && !s, D = E ?
|
|
2591
|
+
}), E = a === "data" && !s, D = E ? sa(r.palette, t.categories.length) : [];
|
|
2569
2592
|
return {
|
|
2570
2593
|
...k(r, n, {
|
|
2571
2594
|
valueFormatter: l,
|
|
@@ -2608,7 +2631,7 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2608
2631
|
borderRadius: l ? _ : v,
|
|
2609
2632
|
...E ? { color: (e) => D[e.dataIndex ?? 0] ?? a } : {}
|
|
2610
2633
|
},
|
|
2611
|
-
...
|
|
2634
|
+
...ae(n?.chartLabelOverlap?.strategy, c ? Be : ze),
|
|
2612
2635
|
label: u && i === 0 ? {
|
|
2613
2636
|
show: !0,
|
|
2614
2637
|
position: "insideLeft",
|
|
@@ -2646,15 +2669,15 @@ var ta = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, rend
|
|
|
2646
2669
|
onDataPointClick: p,
|
|
2647
2670
|
onEvents: m
|
|
2648
2671
|
});
|
|
2649
|
-
},
|
|
2650
|
-
function
|
|
2672
|
+
}, da = 20, fa = 6, pa = 64;
|
|
2673
|
+
function ma(e) {
|
|
2651
2674
|
let t = 0, n = 0;
|
|
2652
2675
|
for (let r of e) r != null && Number.isFinite(r) && (t += r, n += 1);
|
|
2653
2676
|
return n ? t / n : null;
|
|
2654
2677
|
}
|
|
2655
|
-
var
|
|
2678
|
+
var ha = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
2656
2679
|
let f = U((n, r) => {
|
|
2657
|
-
let i = N(n, t?.chartLabel), a = (e) => o ? o(e.value ?? null, e.seriesName) : String(e.value ?? ""), s = t?.chartBubble?.percentageSize ??
|
|
2680
|
+
let i = N(n, t?.chartLabel), a = (e) => o ? o(e.value ?? null, e.seriesName) : String(e.value ?? ""), s = t?.chartBubble?.percentageSize ?? da;
|
|
2658
2681
|
return {
|
|
2659
2682
|
...k(n, t, {
|
|
2660
2683
|
valueFormatter: o,
|
|
@@ -2663,16 +2686,16 @@ var pa = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
2663
2686
|
legendNames: e.series.map((e) => e.name)
|
|
2664
2687
|
}),
|
|
2665
2688
|
xAxis: {
|
|
2666
|
-
...
|
|
2689
|
+
...I(n, t?.horizontalAxis, "category", void 0, {
|
|
2667
2690
|
categories: e.categories,
|
|
2668
2691
|
orientation: "bottom",
|
|
2669
2692
|
layout: r
|
|
2670
2693
|
}),
|
|
2671
2694
|
data: e.categories
|
|
2672
2695
|
},
|
|
2673
|
-
yAxis:
|
|
2696
|
+
yAxis: I(n, t?.verticalAxis, "value", o),
|
|
2674
2697
|
series: e.series.map((e, t) => {
|
|
2675
|
-
let r = e.color ?? n.palette[t % n.palette.length], o =
|
|
2698
|
+
let r = e.color ?? n.palette[t % n.palette.length], o = ma(e.data);
|
|
2676
2699
|
return {
|
|
2677
2700
|
name: e.name,
|
|
2678
2701
|
type: "scatter",
|
|
@@ -2681,9 +2704,9 @@ var pa = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
2681
2704
|
symbol: "circle",
|
|
2682
2705
|
symbolSize: (e) => {
|
|
2683
2706
|
let t = typeof e == "number" ? e : Number(e);
|
|
2684
|
-
if (o == null || o === 0 || !Number.isFinite(t)) return
|
|
2707
|
+
if (o == null || o === 0 || !Number.isFinite(t)) return fa;
|
|
2685
2708
|
let n = Math.abs(t / o) * s;
|
|
2686
|
-
return Number.isFinite(n) ? Math.min(
|
|
2709
|
+
return Number.isFinite(n) ? Math.min(pa, Math.max(fa, n)) : fa;
|
|
2687
2710
|
},
|
|
2688
2711
|
itemStyle: {
|
|
2689
2712
|
color: r,
|
|
@@ -2704,7 +2727,7 @@ var pa = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
2704
2727
|
...i,
|
|
2705
2728
|
formatter: a
|
|
2706
2729
|
} : i,
|
|
2707
|
-
...
|
|
2730
|
+
...ne({
|
|
2708
2731
|
pointCount: e.data?.length ?? 0,
|
|
2709
2732
|
perPointStyling: !0
|
|
2710
2733
|
}).series
|
|
@@ -2732,13 +2755,13 @@ var pa = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
2732
2755
|
onDataPointClick: u,
|
|
2733
2756
|
onEvents: d
|
|
2734
2757
|
});
|
|
2735
|
-
},
|
|
2736
|
-
function
|
|
2758
|
+
}, ga = 4, _a = 10;
|
|
2759
|
+
function va(e) {
|
|
2737
2760
|
let t = 0;
|
|
2738
2761
|
for (let n of e) n != null && (t = Math.max(t, Math.abs(n)));
|
|
2739
2762
|
return t;
|
|
2740
2763
|
}
|
|
2741
|
-
function
|
|
2764
|
+
function ya(e, t) {
|
|
2742
2765
|
let n = Math.max(0, Math.min(1, t)), r = /^#([0-9a-fA-F]{3})$/, i = /^#([0-9a-fA-F]{6})$/, a = e;
|
|
2743
2766
|
if (r.test(a)) {
|
|
2744
2767
|
let [, e, t, n] = r.exec(a);
|
|
@@ -2750,26 +2773,26 @@ function _a(e, t) {
|
|
|
2750
2773
|
}
|
|
2751
2774
|
return n <= 0 ? "transparent" : e;
|
|
2752
2775
|
}
|
|
2753
|
-
var
|
|
2776
|
+
var ba = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colorBy: a, renderer: o, family: s, valueFormatter: c, className: l, ariaLabel: u, answerLine: d, onDataPointClick: f, onEvents: p, applyDensity: m }) => {
|
|
2754
2777
|
let h = U((r, i) => {
|
|
2755
|
-
let o = N(r, n?.chartLabel), s = (e) => c ? c(e.value ?? null, e.seriesName) : String(e.value ?? ""), l = (e) => e.kind ?? "bar", u = t.series.filter((e) => l(e) === "bar"), d = t.series.filter((e) => l(e) !== "bar"), f = t.series.filter((e) => l(e) === "area"), p = Math.max(0, ...u.map((e) =>
|
|
2778
|
+
let o = N(r, n?.chartLabel), s = (e) => c ? c(e.value ?? null, e.seriesName) : String(e.value ?? ""), l = (e) => e.kind ?? "bar", u = t.series.filter((e) => l(e) === "bar"), d = t.series.filter((e) => l(e) !== "bar"), f = t.series.filter((e) => l(e) === "area"), p = Math.max(0, ...u.map((e) => va(e.data))), h = Math.max(0, ...d.map((e) => va(e.data))), g = u.length > 0 && d.length > 0 && p > 0 && h > 0 && Math.max(p, h) / Math.min(p, h) > _a, _ = g ? u : t.series, v = w(n, r, {
|
|
2756
2779
|
type: e,
|
|
2757
2780
|
series: _,
|
|
2758
2781
|
categoryCount: t.categories.length,
|
|
2759
2782
|
valueFormatter: c,
|
|
2760
2783
|
stacked: !1
|
|
2761
|
-
}), y = _[v.markLineSeriesIndex]?.name ?? _[0]?.name, b =
|
|
2784
|
+
}), y = _[v.markLineSeriesIndex]?.name ?? _[0]?.name, b = I(r, n?.verticalAxis, "value", c, {
|
|
2762
2785
|
scale: v.valueScale,
|
|
2763
2786
|
includeValues: v.includeValues
|
|
2764
2787
|
}), x = {
|
|
2765
|
-
...
|
|
2788
|
+
...I(r, n?.verticalAxis, "value", c),
|
|
2766
2789
|
position: "right",
|
|
2767
2790
|
splitLine: { show: !1 }
|
|
2768
2791
|
}, S = /* @__PURE__ */ new Map();
|
|
2769
2792
|
t.series.forEach((e, t) => {
|
|
2770
2793
|
l(e) === "bar" && e.stack && S.set(e.stack, t);
|
|
2771
2794
|
});
|
|
2772
|
-
let C =
|
|
2795
|
+
let C = $i(e, t.categories.length, i, n?.horizontalAxis?.fontSize ?? r.text.fontSize, m), E = a === "data", D = E ? sa(r.palette, t.categories.length) : [];
|
|
2773
2796
|
return {
|
|
2774
2797
|
...k(r, n, {
|
|
2775
2798
|
valueFormatter: c,
|
|
@@ -2780,7 +2803,7 @@ var va = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colo
|
|
|
2780
2803
|
categoryCount: t.categories.length
|
|
2781
2804
|
}),
|
|
2782
2805
|
xAxis: {
|
|
2783
|
-
...
|
|
2806
|
+
...I(r, n?.horizontalAxis, "category", void 0, {
|
|
2784
2807
|
categories: t.categories,
|
|
2785
2808
|
orientation: "bottom",
|
|
2786
2809
|
layout: i
|
|
@@ -2807,8 +2830,8 @@ var va = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colo
|
|
|
2807
2830
|
itemStyle: {
|
|
2808
2831
|
...a.itemStyle,
|
|
2809
2832
|
borderRadius: n ? [
|
|
2810
|
-
|
|
2811
|
-
|
|
2833
|
+
ga,
|
|
2834
|
+
ga,
|
|
2812
2835
|
0,
|
|
2813
2836
|
0
|
|
2814
2837
|
] : [
|
|
@@ -2856,10 +2879,10 @@ var va = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colo
|
|
|
2856
2879
|
};
|
|
2857
2880
|
let p = a === "area" && f.length === 1, m = a === "area" ? p ? { color: new ge(0, 0, 0, 1, [{
|
|
2858
2881
|
offset: 0,
|
|
2859
|
-
color:
|
|
2882
|
+
color: ya(c, .32)
|
|
2860
2883
|
}, {
|
|
2861
2884
|
offset: 1,
|
|
2862
|
-
color:
|
|
2885
|
+
color: ya(c, 0)
|
|
2863
2886
|
}]) } : {
|
|
2864
2887
|
color: c,
|
|
2865
2888
|
opacity: .14
|
|
@@ -2871,7 +2894,7 @@ var va = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colo
|
|
|
2871
2894
|
color: c,
|
|
2872
2895
|
yAxisIndex: u,
|
|
2873
2896
|
...e.name === y && v.markLine ? { markLine: v.markLine } : {},
|
|
2874
|
-
...
|
|
2897
|
+
...L(r, c, n?.chartMarkers?.show, C),
|
|
2875
2898
|
...m ? { areaStyle: m } : {},
|
|
2876
2899
|
label: d
|
|
2877
2900
|
};
|
|
@@ -2901,8 +2924,8 @@ var va = ({ type: e, data: t, appearance: n, adminTheme: r, chartColors: i, colo
|
|
|
2901
2924
|
onDataPointClick: f,
|
|
2902
2925
|
onEvents: p
|
|
2903
2926
|
});
|
|
2904
|
-
},
|
|
2905
|
-
function
|
|
2927
|
+
}, xa = 8;
|
|
2928
|
+
function Sa(e, t, n) {
|
|
2906
2929
|
let r = Array(e + 1);
|
|
2907
2930
|
r[0] = 0;
|
|
2908
2931
|
for (let i = 0; i < e; i += 1) {
|
|
@@ -2911,7 +2934,7 @@ function ba(e, t, n) {
|
|
|
2911
2934
|
}
|
|
2912
2935
|
return r;
|
|
2913
2936
|
}
|
|
2914
|
-
function
|
|
2937
|
+
function Ca(e, t) {
|
|
2915
2938
|
let n = 0, r = e.length - 1;
|
|
2916
2939
|
for (; n < r;) {
|
|
2917
2940
|
let i = Math.floor((n + r + 1) / 2);
|
|
@@ -2919,7 +2942,7 @@ function xa(e, t) {
|
|
|
2919
2942
|
}
|
|
2920
2943
|
return n;
|
|
2921
2944
|
}
|
|
2922
|
-
function
|
|
2945
|
+
function wa({ offsets: e, viewTop: t, viewBottom: n, overscan: r = xa }) {
|
|
2923
2946
|
let i = e.length - 1;
|
|
2924
2947
|
if (i <= 0) return {
|
|
2925
2948
|
start: 0,
|
|
@@ -2929,13 +2952,13 @@ function Sa({ offsets: e, viewTop: t, viewBottom: n, overscan: r = ya }) {
|
|
|
2929
2952
|
start: 0,
|
|
2930
2953
|
end: i
|
|
2931
2954
|
};
|
|
2932
|
-
let a =
|
|
2955
|
+
let a = Ca(e, t), o = Ca(e, n);
|
|
2933
2956
|
return {
|
|
2934
2957
|
start: Math.max(0, Math.min(i, a - r)),
|
|
2935
2958
|
end: Math.max(0, Math.min(i, o + 1 + r))
|
|
2936
2959
|
};
|
|
2937
2960
|
}
|
|
2938
|
-
function
|
|
2961
|
+
function Ta({ offsets: e, start: t, end: n, gap: r }) {
|
|
2939
2962
|
let i = e.length - 1;
|
|
2940
2963
|
return {
|
|
2941
2964
|
top: t > 0 ? Math.max(0, e[t] - r) : 0,
|
|
@@ -2944,7 +2967,7 @@ function Ca({ offsets: e, start: t, end: n, gap: r }) {
|
|
|
2944
2967
|
}
|
|
2945
2968
|
//#endregion
|
|
2946
2969
|
//#region ../core/src/charts/surfaceInk.ts
|
|
2947
|
-
var
|
|
2970
|
+
var Ea = {
|
|
2948
2971
|
light: {
|
|
2949
2972
|
"--text-primary": "#09090b",
|
|
2950
2973
|
"--text": "#09090b",
|
|
@@ -2967,8 +2990,8 @@ var wa = {
|
|
|
2967
2990
|
"--border-default": "rgba(255, 255, 255, 0.09)",
|
|
2968
2991
|
"--surface-hover": "#27272a"
|
|
2969
2992
|
}
|
|
2970
|
-
},
|
|
2971
|
-
function
|
|
2993
|
+
}, Da = [...Object.keys(Ea.light), "--surface-raised"];
|
|
2994
|
+
function Oa(e) {
|
|
2972
2995
|
let t = [];
|
|
2973
2996
|
for (let n = e; n; n = n.parentElement) {
|
|
2974
2997
|
let e = getComputedStyle(n).backgroundColor, r = ue(e);
|
|
@@ -2977,31 +3000,31 @@ function Ea(e) {
|
|
|
2977
3000
|
}
|
|
2978
3001
|
return t.length === 0 ? null : z(t[0], t.slice(1));
|
|
2979
3002
|
}
|
|
2980
|
-
function
|
|
3003
|
+
function ka(e, t) {
|
|
2981
3004
|
if (!t || !e) return null;
|
|
2982
3005
|
let n = de(e, t);
|
|
2983
3006
|
return n == null || n >= 4.5 ? null : (de("#ffffff", t) ?? 0) > (de("#000000", t) ?? 0) ? "dark" : "light";
|
|
2984
3007
|
}
|
|
2985
|
-
function
|
|
2986
|
-
for (let t of
|
|
2987
|
-
let t =
|
|
3008
|
+
function Aa(e) {
|
|
3009
|
+
for (let t of Da) e.style.removeProperty(t);
|
|
3010
|
+
let t = Oa(e), n = ka(getComputedStyle(e).getPropertyValue("--text-primary").trim(), t);
|
|
2988
3011
|
if (n && t) {
|
|
2989
|
-
for (let [t, r] of Object.entries(
|
|
3012
|
+
for (let [t, r] of Object.entries(Ea[n])) e.style.setProperty(t, r);
|
|
2990
3013
|
e.style.setProperty("--surface-raised", `rgb(${t.r}, ${t.g}, ${t.b})`);
|
|
2991
3014
|
}
|
|
2992
3015
|
}
|
|
2993
|
-
function
|
|
3016
|
+
function ja(e) {
|
|
2994
3017
|
let t = [];
|
|
2995
3018
|
for (let n = e; n && (t.push(n), n === e || ue(getComputedStyle(n).backgroundColor)?.a !== 1); n = n.parentElement);
|
|
2996
3019
|
return t;
|
|
2997
3020
|
}
|
|
2998
|
-
function
|
|
3021
|
+
function Ma(e) {
|
|
2999
3022
|
Fe(() => {
|
|
3000
3023
|
let t = e.current;
|
|
3001
3024
|
if (!t) return;
|
|
3002
|
-
|
|
3025
|
+
Aa(t);
|
|
3003
3026
|
let n = [], r = null, i = typeof MutationObserver == "function" ? new MutationObserver(() => s()) : null, a = () => {
|
|
3004
|
-
let e =
|
|
3027
|
+
let e = ja(t);
|
|
3005
3028
|
if (!(e.length === n.length && e.every((e, t) => e === n[t]))) {
|
|
3006
3029
|
n = e, i?.disconnect(), i?.observe(t, {
|
|
3007
3030
|
attributes: !0,
|
|
@@ -3013,31 +3036,31 @@ function Aa(e) {
|
|
|
3013
3036
|
});
|
|
3014
3037
|
}
|
|
3015
3038
|
}, o = () => {
|
|
3016
|
-
r = null,
|
|
3039
|
+
r = null, Aa(t), a();
|
|
3017
3040
|
}, s = () => {
|
|
3018
3041
|
r ??= typeof requestAnimationFrame == "function" ? requestAnimationFrame(o) : setTimeout(o, 16);
|
|
3019
3042
|
};
|
|
3020
3043
|
a();
|
|
3021
|
-
let c =
|
|
3044
|
+
let c = yi(s, t);
|
|
3022
3045
|
return () => {
|
|
3023
3046
|
c(), i?.disconnect(), r != null && (typeof cancelAnimationFrame == "function" ? cancelAnimationFrame(r) : clearTimeout(r));
|
|
3024
3047
|
};
|
|
3025
3048
|
}, [e]);
|
|
3026
3049
|
}
|
|
3027
|
-
var
|
|
3028
|
-
function
|
|
3029
|
-
let [n, r] = q(
|
|
3050
|
+
var Na = 12, Pa = 36, Fa = (e) => typeof e.checkVisibility != "function" || e.checkVisibility({ contentVisibilityAuto: !0 });
|
|
3051
|
+
function Ia({ rowCount: e, scrollElRef: t }) {
|
|
3052
|
+
let [n, r] = q(Pa), [i, a] = q({
|
|
3030
3053
|
viewTop: 0,
|
|
3031
3054
|
viewBottom: Infinity
|
|
3032
|
-
}), [o, s] = q(null), [c, l] = q(!1), u = K(null), d = K(!1), f = K(null), p = e > 1e3 && !c, m = K(/* @__PURE__ */ new Map()), [h, g] = q(() => /* @__PURE__ */ new Map()), _ = G(() =>
|
|
3055
|
+
}), [o, s] = q(null), [c, l] = q(!1), u = K(null), d = K(!1), f = K(null), p = e > 1e3 && !c, m = K(/* @__PURE__ */ new Map()), [h, g] = q(() => /* @__PURE__ */ new Map()), _ = G(() => Sa(e, (e) => h.get(e) ?? n, 0), [
|
|
3033
3056
|
e,
|
|
3034
3057
|
n,
|
|
3035
3058
|
h
|
|
3036
|
-
]), v = G(() => p ?
|
|
3059
|
+
]), v = G(() => p ? wa({
|
|
3037
3060
|
offsets: _,
|
|
3038
3061
|
viewTop: i.viewTop,
|
|
3039
3062
|
viewBottom: i.viewBottom,
|
|
3040
|
-
overscan:
|
|
3063
|
+
overscan: Na
|
|
3041
3064
|
}) : {
|
|
3042
3065
|
start: 0,
|
|
3043
3066
|
end: e
|
|
@@ -3055,7 +3078,7 @@ function Pa({ rowCount: e, scrollElRef: t }) {
|
|
|
3055
3078
|
o,
|
|
3056
3079
|
p,
|
|
3057
3080
|
e
|
|
3058
|
-
]), b = G(() => p ?
|
|
3081
|
+
]), b = G(() => p ? Ta({
|
|
3059
3082
|
offsets: _,
|
|
3060
3083
|
start: y.start,
|
|
3061
3084
|
end: y.end,
|
|
@@ -3078,7 +3101,7 @@ function Pa({ rowCount: e, scrollElRef: t }) {
|
|
|
3078
3101
|
}, []);
|
|
3079
3102
|
let x = U(() => {
|
|
3080
3103
|
let e = u.current, n = t.current;
|
|
3081
|
-
if (!e || !n || !
|
|
3104
|
+
if (!e || !n || !Fa(e)) return;
|
|
3082
3105
|
let r = e.getBoundingClientRect(), i = n.getBoundingClientRect().top - r.top, o = i + n.clientHeight;
|
|
3083
3106
|
a((e) => e.viewTop === i && e.viewBottom === o ? e : {
|
|
3084
3107
|
viewTop: i,
|
|
@@ -3088,7 +3111,7 @@ function Pa({ rowCount: e, scrollElRef: t }) {
|
|
|
3088
3111
|
let e = S.current;
|
|
3089
3112
|
if (!e.size) return;
|
|
3090
3113
|
let t = u.current;
|
|
3091
|
-
if (t && !
|
|
3114
|
+
if (t && !Fa(t)) return;
|
|
3092
3115
|
let n = !1;
|
|
3093
3116
|
e.forEach((e, t) => {
|
|
3094
3117
|
if (!e.isConnected) return;
|
|
@@ -3150,8 +3173,8 @@ function Pa({ rowCount: e, scrollElRef: t }) {
|
|
|
3150
3173
|
if (!r || n < 0 || n >= e) return;
|
|
3151
3174
|
Re(() => {
|
|
3152
3175
|
s({
|
|
3153
|
-
start: Math.max(0, n -
|
|
3154
|
-
end: Math.min(e, n + 1 +
|
|
3176
|
+
start: Math.max(0, n - Na),
|
|
3177
|
+
end: Math.min(e, n + 1 + Na)
|
|
3155
3178
|
});
|
|
3156
3179
|
});
|
|
3157
3180
|
let i = _[n];
|
|
@@ -3174,17 +3197,17 @@ function Pa({ rowCount: e, scrollElRef: t }) {
|
|
|
3174
3197
|
scrollToIndex: O
|
|
3175
3198
|
};
|
|
3176
3199
|
}
|
|
3177
|
-
var
|
|
3200
|
+
var La = (e) => a(e), Ra = ({ className: e, align: t = "left", children: n, ...r }) => /* @__PURE__ */ J("th", {
|
|
3178
3201
|
...r,
|
|
3179
3202
|
scope: "col",
|
|
3180
3203
|
className: V("sticky top-0 z-10 border-b border-border-default bg-surface-raised px-3 py-2 text-caption font-medium tracking-wide whitespace-nowrap text-text-secondary uppercase", t === "right" ? "text-right" : "text-left", e),
|
|
3181
3204
|
children: n
|
|
3182
|
-
}),
|
|
3205
|
+
}), za = ({ className: e, children: t, ...n }) => /* @__PURE__ */ J("th", {
|
|
3183
3206
|
...n,
|
|
3184
3207
|
scope: "row",
|
|
3185
3208
|
className: V("border-b border-border-subtle px-3 py-2 text-left text-body-sm font-medium whitespace-nowrap text-text-primary", e),
|
|
3186
3209
|
children: t
|
|
3187
|
-
}),
|
|
3210
|
+
}), Ba = ({ children: e, className: t, emphasis: n, onActivate: r }) => {
|
|
3188
3211
|
let i = !!r;
|
|
3189
3212
|
return /* @__PURE__ */ J("td", {
|
|
3190
3213
|
className: V("border-b border-border-subtle px-3 py-2 text-right text-body-sm text-text-primary tabular-nums", n && "font-medium", i && "cursor-pointer hover:bg-surface-hover", t),
|
|
@@ -3196,10 +3219,10 @@ var Fa = (e) => a(e), Ia = ({ className: e, align: t = "left", children: n, ...r
|
|
|
3196
3219
|
} : void 0,
|
|
3197
3220
|
children: e
|
|
3198
3221
|
});
|
|
3199
|
-
},
|
|
3222
|
+
}, Va = ({ label: e = "No data" }) => /* @__PURE__ */ J("div", {
|
|
3200
3223
|
className: "flex h-full min-h-16 w-full items-center justify-center text-body-sm text-text-secondary",
|
|
3201
3224
|
children: e
|
|
3202
|
-
}),
|
|
3225
|
+
}), Ha = ({ hostRef: e, fontFamily: t, letterSpacing: n, className: r, ariaLabel: i, children: a }) => /* @__PURE__ */ J("div", {
|
|
3203
3226
|
ref: e,
|
|
3204
3227
|
role: "region",
|
|
3205
3228
|
"aria-label": i ?? "Data table",
|
|
@@ -3216,10 +3239,10 @@ var Fa = (e) => a(e), Ia = ({ className: e, align: t = "left", children: n, ...r
|
|
|
3216
3239
|
},
|
|
3217
3240
|
children: a
|
|
3218
3241
|
});
|
|
3219
|
-
function
|
|
3220
|
-
|
|
3242
|
+
function Ua(e, t) {
|
|
3243
|
+
Ma(e);
|
|
3221
3244
|
let [n, r] = q(0);
|
|
3222
|
-
W(() => r((e) => e + 1), []), W(() =>
|
|
3245
|
+
W(() => r((e) => e + 1), []), W(() => yi(() => r((e) => e + 1), e.current), [e]);
|
|
3223
3246
|
let i = br(`${_r(t.appearance, t.adminTheme, t.chartColors)}|${+!!t.includeInk}`, {
|
|
3224
3247
|
appearance: t.appearance,
|
|
3225
3248
|
adminTheme: t.adminTheme,
|
|
@@ -3232,7 +3255,7 @@ function Va(e, t) {
|
|
|
3232
3255
|
n
|
|
3233
3256
|
]);
|
|
3234
3257
|
}
|
|
3235
|
-
function
|
|
3258
|
+
function Wa(e) {
|
|
3236
3259
|
let t = e.trim();
|
|
3237
3260
|
if (!t || /\s/.test(t) || !/^[A-Za-z][A-Za-z0-9]*([_-][A-Za-z0-9]+)*$/.test(t) || /[_-]\d+(?:[_-]|$)/.test(t)) return e;
|
|
3238
3261
|
if (!/[_-]/.test(t)) return t === t.toLowerCase() && /[a-z]/.test(t) ? t.charAt(0).toUpperCase() + t.slice(1) : e;
|
|
@@ -3244,15 +3267,15 @@ function Ha(e) {
|
|
|
3244
3267
|
return t === 0 || r ? n.charAt(0).toUpperCase() + n.slice(1) : n;
|
|
3245
3268
|
}).join(" ");
|
|
3246
3269
|
}
|
|
3247
|
-
function
|
|
3270
|
+
function Ga(e, t) {
|
|
3248
3271
|
return e == null || e === "" ? "-" : typeof e == "number" ? Number.isFinite(e) ? t(e) : "-" : typeof e == "object" ? JSON.stringify(e) : String(e);
|
|
3249
3272
|
}
|
|
3250
|
-
function
|
|
3273
|
+
function Ka(e) {
|
|
3251
3274
|
if (typeof e == "number" && Number.isFinite(e)) return String(e);
|
|
3252
3275
|
if (typeof e == "string" && e !== "") return e;
|
|
3253
3276
|
}
|
|
3254
|
-
var
|
|
3255
|
-
let c = typeof r?.click == "function" ? r.click : void 0, { range: l, spacerTop: u, spacerBottom: d, isWindowed: f, tbodyRef: p, measureRowRef: m } =
|
|
3277
|
+
var qa = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary", Ja = /* @__PURE__ */ new WeakMap(), Ya = 0, Xa = (e) => Ja.get(e) ?? (Ya += 1, Ja.set(e, Ya), Ya), Za = ({ columns: e, rows: t, ariaLabel: n, onEvents: r, fmt: i, appearance: a, scrollElRef: s }) => {
|
|
3278
|
+
let c = typeof r?.click == "function" ? r.click : void 0, { range: l, spacerTop: u, spacerBottom: d, isWindowed: f, tbodyRef: p, measureRowRef: m } = Ia({
|
|
3256
3279
|
rowCount: t.length,
|
|
3257
3280
|
scrollElRef: s
|
|
3258
3281
|
}), h = t.slice(l.start, l.end), g = e.length;
|
|
@@ -3264,9 +3287,9 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3264
3287
|
className: "sr-only",
|
|
3265
3288
|
children: n ?? "Chart data"
|
|
3266
3289
|
}),
|
|
3267
|
-
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ J("tr", { children: e.map((e) => /* @__PURE__ */ J(
|
|
3290
|
+
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ J("tr", { children: e.map((e) => /* @__PURE__ */ J(Ra, {
|
|
3268
3291
|
align: e.align === "right" ? "right" : "left",
|
|
3269
|
-
children:
|
|
3292
|
+
children: Wa(e.label)
|
|
3270
3293
|
}, e.key)) }) }),
|
|
3271
3294
|
/* @__PURE__ */ Y("tbody", {
|
|
3272
3295
|
ref: p,
|
|
@@ -3298,13 +3321,13 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3298
3321
|
children: e.map((e) => {
|
|
3299
3322
|
let n = t[e.key];
|
|
3300
3323
|
return /* @__PURE__ */ J("td", {
|
|
3301
|
-
className: V(
|
|
3302
|
-
title:
|
|
3324
|
+
className: V(qa, e.align === "right" || typeof n == "number" ? "text-right tabular-nums" : "text-left"),
|
|
3325
|
+
title: Ka(n),
|
|
3303
3326
|
onContextMenu: r?.contextmenu && typeof n == "string" ? () => r.contextmenu?.({ name: n }) : void 0,
|
|
3304
|
-
children:
|
|
3327
|
+
children: Ga(o(n, e.key, a), (t) => i(t, e.key))
|
|
3305
3328
|
}, e.key);
|
|
3306
3329
|
})
|
|
3307
|
-
},
|
|
3330
|
+
}, Xa(t));
|
|
3308
3331
|
}),
|
|
3309
3332
|
f && d > 0 ? /* @__PURE__ */ J("tr", {
|
|
3310
3333
|
"data-virtual-spacer": "bottom",
|
|
@@ -3321,8 +3344,8 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3321
3344
|
})
|
|
3322
3345
|
]
|
|
3323
3346
|
});
|
|
3324
|
-
},
|
|
3325
|
-
let o = e.categories.length, { range: s, spacerTop: c, spacerBottom: l, isWindowed: u, tbodyRef: d, measureRowRef: f } =
|
|
3347
|
+
}, Qa = ({ data: e, hasCategoryLabels: t, ariaLabel: n, fmt: r, onDataPointClick: i, scrollElRef: a }) => {
|
|
3348
|
+
let o = e.categories.length, { range: s, spacerTop: c, spacerBottom: l, isWindowed: u, tbodyRef: d, measureRowRef: f } = Ia({
|
|
3326
3349
|
rowCount: o,
|
|
3327
3350
|
scrollElRef: a
|
|
3328
3351
|
}), p = e.categories.slice(s.start, s.end), m = e.series.length + +!!t;
|
|
@@ -3334,12 +3357,12 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3334
3357
|
className: "sr-only",
|
|
3335
3358
|
children: n ?? "Chart data"
|
|
3336
3359
|
}),
|
|
3337
|
-
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", { children: [t && /* @__PURE__ */ J(
|
|
3360
|
+
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", { children: [t && /* @__PURE__ */ J(Ra, { children: /* @__PURE__ */ J("span", {
|
|
3338
3361
|
className: "sr-only",
|
|
3339
3362
|
children: "Category"
|
|
3340
|
-
}) }), e.series.map((e) => /* @__PURE__ */ J(
|
|
3363
|
+
}) }), e.series.map((e) => /* @__PURE__ */ J(Ra, {
|
|
3341
3364
|
align: "right",
|
|
3342
|
-
children:
|
|
3365
|
+
children: Wa(e.name)
|
|
3343
3366
|
}, e.name))] }) }),
|
|
3344
3367
|
/* @__PURE__ */ Y("tbody", {
|
|
3345
3368
|
ref: d,
|
|
@@ -3359,9 +3382,9 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3359
3382
|
let o = s.start + a;
|
|
3360
3383
|
return /* @__PURE__ */ Y("tr", {
|
|
3361
3384
|
ref: u ? f(o) : void 0,
|
|
3362
|
-
children: [t && /* @__PURE__ */ J(
|
|
3385
|
+
children: [t && /* @__PURE__ */ J(za, { children: n }), e.series.map((e) => {
|
|
3363
3386
|
let t = e.data[o] ?? null;
|
|
3364
|
-
return /* @__PURE__ */ J(
|
|
3387
|
+
return /* @__PURE__ */ J(Ba, {
|
|
3365
3388
|
onActivate: i ? () => i({
|
|
3366
3389
|
seriesName: e.name,
|
|
3367
3390
|
category: n,
|
|
@@ -3387,22 +3410,22 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3387
3410
|
})
|
|
3388
3411
|
]
|
|
3389
3412
|
});
|
|
3390
|
-
},
|
|
3391
|
-
let l = K(null), u =
|
|
3413
|
+
}, $a = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatter: i, className: a, ariaLabel: o, onDataPointClick: s, onEvents: c }) => {
|
|
3414
|
+
let l = K(null), u = Ua(l, {
|
|
3392
3415
|
appearance: t,
|
|
3393
3416
|
adminTheme: n,
|
|
3394
3417
|
chartColors: r
|
|
3395
3418
|
}), f = d(t, {
|
|
3396
3419
|
columns: e.columns?.map((e) => e.key) ?? e.series.map((e) => e.name),
|
|
3397
|
-
fallback: i ??
|
|
3398
|
-
}) ??
|
|
3399
|
-
if (Array.isArray(p) && p.length > 0 && Array.isArray(m)) return /* @__PURE__ */ J(
|
|
3420
|
+
fallback: i ?? La
|
|
3421
|
+
}) ?? La, p = e.columns, m = e.rows;
|
|
3422
|
+
if (Array.isArray(p) && p.length > 0 && Array.isArray(m)) return /* @__PURE__ */ J(Ha, {
|
|
3400
3423
|
hostRef: l,
|
|
3401
3424
|
fontFamily: u.text.fontFamily,
|
|
3402
3425
|
letterSpacing: u.text.letterSpacing,
|
|
3403
3426
|
className: a,
|
|
3404
3427
|
ariaLabel: o,
|
|
3405
|
-
children: m.length === 0 ? /* @__PURE__ */ J(
|
|
3428
|
+
children: m.length === 0 ? /* @__PURE__ */ J(Va, {}) : /* @__PURE__ */ J(Za, {
|
|
3406
3429
|
columns: p,
|
|
3407
3430
|
rows: m,
|
|
3408
3431
|
appearance: t,
|
|
@@ -3413,13 +3436,13 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3413
3436
|
})
|
|
3414
3437
|
});
|
|
3415
3438
|
let h = e.categories.length === 0 || e.series.length === 0, g = e.categories.some((e) => String(e ?? "").trim() !== "");
|
|
3416
|
-
return /* @__PURE__ */ J(
|
|
3439
|
+
return /* @__PURE__ */ J(Ha, {
|
|
3417
3440
|
hostRef: l,
|
|
3418
3441
|
fontFamily: u.text.fontFamily,
|
|
3419
3442
|
letterSpacing: u.text.letterSpacing,
|
|
3420
3443
|
className: a,
|
|
3421
3444
|
ariaLabel: o,
|
|
3422
|
-
children: h ? /* @__PURE__ */ J(
|
|
3445
|
+
children: h ? /* @__PURE__ */ J(Va, {}) : /* @__PURE__ */ J(Qa, {
|
|
3423
3446
|
data: e,
|
|
3424
3447
|
hasCategoryLabels: g,
|
|
3425
3448
|
ariaLabel: o,
|
|
@@ -3431,7 +3454,7 @@ var Ga = "border-b border-border-subtle px-3 py-2 text-body-sm text-text-primary
|
|
|
3431
3454
|
};
|
|
3432
3455
|
//#endregion
|
|
3433
3456
|
//#region ../core/src/charts/types/FunnelChart.tsx
|
|
3434
|
-
function
|
|
3457
|
+
function eo(e, t) {
|
|
3435
3458
|
let n = 0;
|
|
3436
3459
|
for (let r of e.series) {
|
|
3437
3460
|
let e = r.data[t];
|
|
@@ -3439,7 +3462,7 @@ function Qa(e, t) {
|
|
|
3439
3462
|
}
|
|
3440
3463
|
return n;
|
|
3441
3464
|
}
|
|
3442
|
-
var
|
|
3465
|
+
var to = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: f }) => {
|
|
3443
3466
|
let p = G(() => d(t, {
|
|
3444
3467
|
columns: e.series.map((e) => e.name),
|
|
3445
3468
|
fallback: o
|
|
@@ -3452,7 +3475,7 @@ var $a = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3452
3475
|
let i = n.palette[r % n.palette.length];
|
|
3453
3476
|
return {
|
|
3454
3477
|
name: String(t),
|
|
3455
|
-
value:
|
|
3478
|
+
value: eo(e, r),
|
|
3456
3479
|
itemStyle: { color: i },
|
|
3457
3480
|
label: { color: fe(i, { backdrop: n.tooltip.bg }) }
|
|
3458
3481
|
};
|
|
@@ -3516,7 +3539,7 @@ var $a = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3516
3539
|
};
|
|
3517
3540
|
//#endregion
|
|
3518
3541
|
//#region ../core/src/charts/types/GaugeChart.tsx
|
|
3519
|
-
function
|
|
3542
|
+
function no(e) {
|
|
3520
3543
|
if (e <= 0) return 100;
|
|
3521
3544
|
let t = 10 ** Math.floor(Math.log10(e));
|
|
3522
3545
|
for (let n of [
|
|
@@ -3531,7 +3554,7 @@ function eo(e) {
|
|
|
3531
3554
|
}
|
|
3532
3555
|
return 10 * t;
|
|
3533
3556
|
}
|
|
3534
|
-
var
|
|
3557
|
+
var ro = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: f }) => {
|
|
3535
3558
|
let p = e.series[0]?.data.some((e) => e != null) ?? !1, m = G(() => d(t, {
|
|
3536
3559
|
column: e.series[0]?.name,
|
|
3537
3560
|
columns: e.series.map((e) => e.name),
|
|
@@ -3541,7 +3564,7 @@ var to = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3541
3564
|
e.series,
|
|
3542
3565
|
o
|
|
3543
3566
|
]), h = U((n) => {
|
|
3544
|
-
let r = e.series[0], i = r?.data.find((e) => e != null) ?? null ?? 0, a = r?.color ?? n.palette[0], o = i <= 100 ? 100 :
|
|
3567
|
+
let r = e.series[0], i = r?.data.find((e) => e != null) ?? null ?? 0, a = r?.color ?? n.palette[0], o = i <= 100 ? 100 : no(i * 1.25), s = M(m);
|
|
3545
3568
|
return {
|
|
3546
3569
|
tooltip: A(n, {
|
|
3547
3570
|
axis: !1,
|
|
@@ -3616,7 +3639,7 @@ var to = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3616
3639
|
onEvents: f
|
|
3617
3640
|
});
|
|
3618
3641
|
};
|
|
3619
|
-
function
|
|
3642
|
+
function io(e) {
|
|
3620
3643
|
if (e <= 0) return 1;
|
|
3621
3644
|
let t = 10 ** Math.floor(Math.log10(e));
|
|
3622
3645
|
for (let n of [
|
|
@@ -3631,10 +3654,10 @@ function no(e) {
|
|
|
3631
3654
|
}
|
|
3632
3655
|
return 10 * t;
|
|
3633
3656
|
}
|
|
3634
|
-
function
|
|
3657
|
+
function ao(e) {
|
|
3635
3658
|
return e ? e >= 400 ? 30 : e >= 200 ? 26 : 20 : 26;
|
|
3636
3659
|
}
|
|
3637
|
-
function
|
|
3660
|
+
function oo(e, t, n) {
|
|
3638
3661
|
let r = ue(e), i = ue(t);
|
|
3639
3662
|
if (!r || !i) return e;
|
|
3640
3663
|
let a = R(i) < .5 ? .1 : 0, o = le({
|
|
@@ -3643,15 +3666,15 @@ function io(e, t, n) {
|
|
|
3643
3666
|
}, i);
|
|
3644
3667
|
return `rgb(${Math.round(o.r)}, ${Math.round(o.g)}, ${Math.round(o.b)})`;
|
|
3645
3668
|
}
|
|
3646
|
-
function
|
|
3647
|
-
let n =
|
|
3669
|
+
function so(e, t) {
|
|
3670
|
+
let n = io(Math.max(e * 1.3, e + 1));
|
|
3648
3671
|
return {
|
|
3649
3672
|
value: e,
|
|
3650
3673
|
min: t,
|
|
3651
3674
|
max: n > t ? n : t + 1
|
|
3652
3675
|
};
|
|
3653
3676
|
}
|
|
3654
|
-
function
|
|
3677
|
+
function co(e, t, n) {
|
|
3655
3678
|
if (e?.chartMargin) return D(e.chartMargin);
|
|
3656
3679
|
let r = n + 14, i = r + 12 + 26, a = t.height || 0, o = a > i ? Math.round((a - i) / 2) + r : r;
|
|
3657
3680
|
return {
|
|
@@ -3663,12 +3686,12 @@ function oo(e, t, n) {
|
|
|
3663
3686
|
containLabel: !1
|
|
3664
3687
|
};
|
|
3665
3688
|
}
|
|
3666
|
-
function
|
|
3689
|
+
function lo(e, t, n, r) {
|
|
3667
3690
|
let i = {
|
|
3668
3691
|
hideSplitLines: !0,
|
|
3669
3692
|
hideAxisTicks: !0,
|
|
3670
3693
|
...t?.horizontalAxis
|
|
3671
|
-
}, a =
|
|
3694
|
+
}, a = I(e, i, "value", r);
|
|
3672
3695
|
return {
|
|
3673
3696
|
...a,
|
|
3674
3697
|
min: n.min,
|
|
@@ -3684,9 +3707,9 @@ function so(e, t, n, r) {
|
|
|
3684
3707
|
}
|
|
3685
3708
|
};
|
|
3686
3709
|
}
|
|
3687
|
-
function
|
|
3710
|
+
function uo(e) {
|
|
3688
3711
|
return {
|
|
3689
|
-
...
|
|
3712
|
+
...I(e, {
|
|
3690
3713
|
hideAxisLines: !0,
|
|
3691
3714
|
hideAxisLabels: !0,
|
|
3692
3715
|
hideAxisTicks: !0,
|
|
@@ -3698,7 +3721,7 @@ function co(e) {
|
|
|
3698
3721
|
data: [""]
|
|
3699
3722
|
};
|
|
3700
3723
|
}
|
|
3701
|
-
function
|
|
3724
|
+
function fo(e, t, n) {
|
|
3702
3725
|
return {
|
|
3703
3726
|
show: !0,
|
|
3704
3727
|
position: [0, -(t + 10)],
|
|
@@ -3712,7 +3735,7 @@ function lo(e, t, n) {
|
|
|
3712
3735
|
formatter: () => n
|
|
3713
3736
|
};
|
|
3714
3737
|
}
|
|
3715
|
-
function
|
|
3738
|
+
function po(e, t) {
|
|
3716
3739
|
return {
|
|
3717
3740
|
color: e.palette,
|
|
3718
3741
|
legend: { show: !1 },
|
|
@@ -3724,7 +3747,7 @@ function uo(e, t) {
|
|
|
3724
3747
|
...b()
|
|
3725
3748
|
};
|
|
3726
3749
|
}
|
|
3727
|
-
function
|
|
3750
|
+
function mo(e, t, n) {
|
|
3728
3751
|
return {
|
|
3729
3752
|
name: n.name,
|
|
3730
3753
|
type: "scatter",
|
|
@@ -3747,19 +3770,19 @@ function fo(e, t, n) {
|
|
|
3747
3770
|
}
|
|
3748
3771
|
//#endregion
|
|
3749
3772
|
//#region ../core/src/charts/types/LinearGaugeChart.tsx
|
|
3750
|
-
var
|
|
3773
|
+
var ho = [
|
|
3751
3774
|
.14,
|
|
3752
3775
|
.26,
|
|
3753
3776
|
.42
|
|
3754
3777
|
];
|
|
3755
|
-
function
|
|
3756
|
-
let { value: r, hasValue: i, series: a, appearance: o, valueFormatter: s } = n, c = M(s), l =
|
|
3778
|
+
function go(e, t, n) {
|
|
3779
|
+
let { value: r, hasValue: i, series: a, appearance: o, valueFormatter: s } = n, c = M(s), l = so(r, 0), u = a?.color ?? e.palette[0], d = ao(t.height), f = (l.max - l.min) / 3;
|
|
3757
3780
|
return {
|
|
3758
|
-
...
|
|
3759
|
-
grid:
|
|
3760
|
-
xAxis:
|
|
3761
|
-
yAxis:
|
|
3762
|
-
series: [...
|
|
3781
|
+
...po(e, s),
|
|
3782
|
+
grid: co(o, t, d),
|
|
3783
|
+
xAxis: lo(e, o, l, s),
|
|
3784
|
+
yAxis: uo(e),
|
|
3785
|
+
series: [...ho.map((t, n) => ({
|
|
3763
3786
|
name: `zone-${n + 1}`,
|
|
3764
3787
|
type: "bar",
|
|
3765
3788
|
stack: "zones",
|
|
@@ -3768,22 +3791,22 @@ function mo(e, t, n) {
|
|
|
3768
3791
|
silent: !0,
|
|
3769
3792
|
emphasis: { disabled: !0 },
|
|
3770
3793
|
itemStyle: {
|
|
3771
|
-
color:
|
|
3794
|
+
color: oo(u, e.tooltip.bg, t),
|
|
3772
3795
|
borderRadius: n === 0 ? [
|
|
3773
3796
|
6,
|
|
3774
3797
|
0,
|
|
3775
3798
|
0,
|
|
3776
3799
|
6
|
|
3777
|
-
] : n ===
|
|
3800
|
+
] : n === ho.length - 1 ? [
|
|
3778
3801
|
0,
|
|
3779
3802
|
6,
|
|
3780
3803
|
6,
|
|
3781
3804
|
0
|
|
3782
3805
|
] : 0
|
|
3783
3806
|
},
|
|
3784
|
-
label: n === 0 ?
|
|
3807
|
+
label: n === 0 ? fo(e, d, c(i ? r : null, a?.name)) : { show: !1 },
|
|
3785
3808
|
data: [f]
|
|
3786
|
-
})),
|
|
3809
|
+
})), mo(e, l, {
|
|
3787
3810
|
symbol: "diamond",
|
|
3788
3811
|
color: u,
|
|
3789
3812
|
filled: !0,
|
|
@@ -3791,8 +3814,8 @@ function mo(e, t, n) {
|
|
|
3791
3814
|
})]
|
|
3792
3815
|
};
|
|
3793
3816
|
}
|
|
3794
|
-
var
|
|
3795
|
-
let f = e.series[0], p = f?.data.find((e) => e != null) ?? null, m = p != null && Number.isFinite(p), h = U((e, n) =>
|
|
3817
|
+
var _o = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
3818
|
+
let f = e.series[0], p = f?.data.find((e) => e != null) ?? null, m = p != null && Number.isFinite(p), h = U((e, n) => go(e, n, {
|
|
3796
3819
|
value: m ? p : 0,
|
|
3797
3820
|
hasValue: m,
|
|
3798
3821
|
series: f,
|
|
@@ -3824,13 +3847,13 @@ var ho = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3824
3847
|
};
|
|
3825
3848
|
//#endregion
|
|
3826
3849
|
//#region ../core/src/charts/types/LinearGaugeV2Chart.tsx
|
|
3827
|
-
function
|
|
3828
|
-
let { value: r, hasValue: i, series: a, appearance: o, valueFormatter: s } = n, c = M(s), l =
|
|
3850
|
+
function vo(e, t, n) {
|
|
3851
|
+
let { value: r, hasValue: i, series: a, appearance: o, valueFormatter: s } = n, c = M(s), l = so(r, r > 0 ? 0 : Math.floor(r + r * .2)), u = a?.color ?? e.palette[0], d = ao(t.height);
|
|
3829
3852
|
return {
|
|
3830
|
-
...
|
|
3831
|
-
grid:
|
|
3832
|
-
xAxis:
|
|
3833
|
-
yAxis:
|
|
3853
|
+
...po(e, s),
|
|
3854
|
+
grid: co(o, t, d),
|
|
3855
|
+
xAxis: lo(e, o, l, s),
|
|
3856
|
+
yAxis: uo(e),
|
|
3834
3857
|
series: [
|
|
3835
3858
|
{
|
|
3836
3859
|
name: "track",
|
|
@@ -3843,7 +3866,7 @@ function go(e, t, n) {
|
|
|
3843
3866
|
color: e.splitLine,
|
|
3844
3867
|
borderRadius: 6
|
|
3845
3868
|
},
|
|
3846
|
-
label:
|
|
3869
|
+
label: fo(e, d, c(i ? r : null, a?.name)),
|
|
3847
3870
|
data: [l.max]
|
|
3848
3871
|
},
|
|
3849
3872
|
...l.min < 0 ? [{
|
|
@@ -3872,7 +3895,7 @@ function go(e, t, n) {
|
|
|
3872
3895
|
label: { show: !1 },
|
|
3873
3896
|
data: [i ? r : 0]
|
|
3874
3897
|
},
|
|
3875
|
-
|
|
3898
|
+
mo(e, l, {
|
|
3876
3899
|
symbol: "circle",
|
|
3877
3900
|
color: u,
|
|
3878
3901
|
filled: !1,
|
|
@@ -3881,8 +3904,8 @@ function go(e, t, n) {
|
|
|
3881
3904
|
]
|
|
3882
3905
|
};
|
|
3883
3906
|
}
|
|
3884
|
-
var
|
|
3885
|
-
let f = e.series[0], p = f?.data.find((e) => e != null) ?? null, m = p != null && Number.isFinite(p), h = U((e, n) =>
|
|
3907
|
+
var yo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
3908
|
+
let f = e.series[0], p = f?.data.find((e) => e != null) ?? null, m = p != null && Number.isFinite(p), h = U((e, n) => vo(e, n, {
|
|
3886
3909
|
value: m ? p : 0,
|
|
3887
3910
|
hasValue: m,
|
|
3888
3911
|
series: f,
|
|
@@ -3911,16 +3934,16 @@ var _o = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3911
3934
|
onDataPointClick: u,
|
|
3912
3935
|
onEvents: d
|
|
3913
3936
|
});
|
|
3914
|
-
},
|
|
3915
|
-
function
|
|
3937
|
+
}, bo = 50, xo = 120, So = 100, Co = 24;
|
|
3938
|
+
function wo(e, t) {
|
|
3916
3939
|
let n = Math.min(e?.width ?? 0, e?.height ?? 0);
|
|
3917
|
-
if (!(n > 0)) return
|
|
3940
|
+
if (!(n > 0)) return So;
|
|
3918
3941
|
let r = (n - 60) / Math.sqrt(Math.max(t, 1));
|
|
3919
|
-
return Math.min(
|
|
3942
|
+
return Math.min(So, Math.max(Co, Math.round(r)));
|
|
3920
3943
|
}
|
|
3921
|
-
var
|
|
3944
|
+
var To = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
3922
3945
|
let f = U((n, r) => {
|
|
3923
|
-
let i = o ?? ((e) => E(e)), a = e.nodes ?? [], s = e.links ?? [], c = e.nodeCategories ?? [], l = t?.chartNetwork?.repulsion ??
|
|
3946
|
+
let i = o ?? ((e) => E(e)), a = e.nodes ?? [], s = e.links ?? [], c = e.nodeCategories ?? [], l = t?.chartNetwork?.repulsion ?? bo, u = /* @__PURE__ */ new Map();
|
|
3924
3947
|
for (let e of s) u.set(e.source, (u.get(e.source) ?? 0) + 1), u.set(e.target, (u.get(e.target) ?? 0) + 1);
|
|
3925
3948
|
let d = Math.max(1, ...u.values()), f = c.length > 1 && t?.chartLegend?.show !== !1;
|
|
3926
3949
|
return {
|
|
@@ -3939,10 +3962,10 @@ var Co = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3939
3962
|
let t = e;
|
|
3940
3963
|
if (t?.dataType === "edge") {
|
|
3941
3964
|
let e = t.data ?? {};
|
|
3942
|
-
return
|
|
3965
|
+
return P(`${e.source ?? ""} → ${e.target ?? ""}`, [{ value: i(e.value ?? null) }]);
|
|
3943
3966
|
}
|
|
3944
3967
|
let n = t?.data?.name ?? "", r = u.get(n) ?? 0;
|
|
3945
|
-
return
|
|
3968
|
+
return P(n, [{
|
|
3946
3969
|
label: r === 1 ? "Connection" : "Connections",
|
|
3947
3970
|
value: String(r)
|
|
3948
3971
|
}]);
|
|
@@ -3983,8 +4006,8 @@ var Co = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
3983
4006
|
force: {
|
|
3984
4007
|
repulsion: l,
|
|
3985
4008
|
gravity: .1,
|
|
3986
|
-
edgeLength:
|
|
3987
|
-
layoutAnimation: a.length <=
|
|
4009
|
+
edgeLength: wo(r, a.length),
|
|
4010
|
+
layoutAnimation: a.length <= xo
|
|
3988
4011
|
},
|
|
3989
4012
|
lineStyle: {
|
|
3990
4013
|
color: n.splitLine,
|
|
@@ -4041,19 +4064,138 @@ var Co = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4041
4064
|
};
|
|
4042
4065
|
//#endregion
|
|
4043
4066
|
//#region ../core/src/charts/labelInk.ts
|
|
4044
|
-
function
|
|
4067
|
+
function Eo(e) {
|
|
4045
4068
|
let { strategy: t, position: n, fill: r, surface: i } = e;
|
|
4046
4069
|
if (t !== "legible") return;
|
|
4047
|
-
let a =
|
|
4070
|
+
let a = ce(n) ? r : i;
|
|
4048
4071
|
if (a) return fe(a, { backdrop: i ?? void 0 });
|
|
4049
4072
|
}
|
|
4050
|
-
function
|
|
4051
|
-
let t =
|
|
4073
|
+
function Do(e) {
|
|
4074
|
+
let t = Eo(e);
|
|
4052
4075
|
return t ? { color: t } : {};
|
|
4053
4076
|
}
|
|
4054
4077
|
//#endregion
|
|
4078
|
+
//#region ../core/src/charts/types/roseOption.ts
|
|
4079
|
+
function Oo(e) {
|
|
4080
|
+
let { data: t, slices: r, appearance: i, theme: a, layout: o, valueFormatter: c, mutedCategory: l } = e, u = Sr(r), d = u.map((e) => e.name), f = M(c), p = i?.chartLabel?.radialChartposition, h = p !== "inside" && p !== "outside", g = i?.chartLegend, _ = p === void 0 && g?.show === !1 ? {
|
|
4081
|
+
...g,
|
|
4082
|
+
show: !0
|
|
4083
|
+
} : g, v = p === "inside", y = s({
|
|
4084
|
+
labels: d,
|
|
4085
|
+
layout: o,
|
|
4086
|
+
legend: _,
|
|
4087
|
+
fontSizePx: a.text.fontSize,
|
|
4088
|
+
directLabelling: !h
|
|
4089
|
+
}), x = m({
|
|
4090
|
+
legendRoom: _?.show !== !1,
|
|
4091
|
+
layout: o,
|
|
4092
|
+
outsideLabels: !h && !v,
|
|
4093
|
+
legendBand: y
|
|
4094
|
+
}), S = Math.sqrt(Math.max(0, ...u.map((e) => e.value)) || 1), C = t.series[0]?.name, w = v ? "insideEnd" : "end", T = (e) => `${e.name}\n${f(e.value, e.name)}`;
|
|
4095
|
+
return {
|
|
4096
|
+
color: a.palette,
|
|
4097
|
+
polar: {
|
|
4098
|
+
radius: n(["0%", "76%"], x.radiusScale),
|
|
4099
|
+
center: x.center
|
|
4100
|
+
},
|
|
4101
|
+
angleAxis: {
|
|
4102
|
+
type: "category",
|
|
4103
|
+
data: d,
|
|
4104
|
+
z: 3,
|
|
4105
|
+
startAngle: 90,
|
|
4106
|
+
boundaryGap: !0,
|
|
4107
|
+
axisLine: { show: !1 },
|
|
4108
|
+
axisTick: { show: !1 },
|
|
4109
|
+
axisLabel: { show: !1 },
|
|
4110
|
+
splitLine: {
|
|
4111
|
+
show: !0,
|
|
4112
|
+
lineStyle: {
|
|
4113
|
+
color: a.splitLine,
|
|
4114
|
+
width: 1,
|
|
4115
|
+
opacity: .42
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
},
|
|
4119
|
+
radiusAxis: {
|
|
4120
|
+
type: "value",
|
|
4121
|
+
z: 3,
|
|
4122
|
+
min: 0,
|
|
4123
|
+
max: S,
|
|
4124
|
+
splitNumber: 4,
|
|
4125
|
+
axisLine: { show: !1 },
|
|
4126
|
+
axisTick: { show: !1 },
|
|
4127
|
+
axisLabel: {
|
|
4128
|
+
show: !0,
|
|
4129
|
+
color: a.mutedText,
|
|
4130
|
+
fontSize: a.text.fontSize,
|
|
4131
|
+
formatter: (e) => f(Number(e) ** 2, C)
|
|
4132
|
+
},
|
|
4133
|
+
splitLine: {
|
|
4134
|
+
show: !0,
|
|
4135
|
+
lineStyle: {
|
|
4136
|
+
color: a.splitLine,
|
|
4137
|
+
width: 1,
|
|
4138
|
+
opacity: .72
|
|
4139
|
+
}
|
|
4140
|
+
}
|
|
4141
|
+
},
|
|
4142
|
+
legend: ee(a, _, y, { names: d }),
|
|
4143
|
+
tooltip: A(a, {
|
|
4144
|
+
axis: !1,
|
|
4145
|
+
valueFormatter: (e, t) => c?.(e === null ? null : e ** 2, t) ?? f(e === null ? null : e ** 2, t),
|
|
4146
|
+
content: i?.chartTooltip,
|
|
4147
|
+
fieldFormats: i?.chartFieldFormats,
|
|
4148
|
+
valueField: C
|
|
4149
|
+
}),
|
|
4150
|
+
textStyle: j(a.text),
|
|
4151
|
+
...b(),
|
|
4152
|
+
series: u.map((e, n) => {
|
|
4153
|
+
let r = e.name === l ? a.mutedText : t.series[0]?.color ?? a.palette[e.colorIndex % a.palette.length], o = Do({
|
|
4154
|
+
strategy: i?.chartLabelInk?.strategy,
|
|
4155
|
+
position: w,
|
|
4156
|
+
fill: r,
|
|
4157
|
+
surface: a.tooltip.bg
|
|
4158
|
+
});
|
|
4159
|
+
return {
|
|
4160
|
+
name: e.name,
|
|
4161
|
+
type: "bar",
|
|
4162
|
+
coordinateSystem: "polar",
|
|
4163
|
+
barWidth: "92%",
|
|
4164
|
+
barGap: "-100%",
|
|
4165
|
+
stack: "dbn-rose-slices",
|
|
4166
|
+
z: 2,
|
|
4167
|
+
itemStyle: {
|
|
4168
|
+
color: r,
|
|
4169
|
+
borderWidth: 2,
|
|
4170
|
+
borderColor: a.tooltip.bg
|
|
4171
|
+
},
|
|
4172
|
+
label: h ? { show: !1 } : {
|
|
4173
|
+
show: !0,
|
|
4174
|
+
position: w,
|
|
4175
|
+
rotate: 0,
|
|
4176
|
+
formatter: () => T(e),
|
|
4177
|
+
...j(a.text),
|
|
4178
|
+
...o
|
|
4179
|
+
},
|
|
4180
|
+
labelLayout: { hideOverlap: !0 },
|
|
4181
|
+
emphasis: {
|
|
4182
|
+
focus: "series",
|
|
4183
|
+
itemStyle: { opacity: .92 }
|
|
4184
|
+
},
|
|
4185
|
+
data: u.map((e, t) => t === n ? {
|
|
4186
|
+
name: e.name,
|
|
4187
|
+
value: Math.sqrt(Math.max(e.value, 0)),
|
|
4188
|
+
dbnRaw: e.value,
|
|
4189
|
+
dbnCategory: e.name,
|
|
4190
|
+
dbnSeriesName: C
|
|
4191
|
+
} : null)
|
|
4192
|
+
};
|
|
4193
|
+
})
|
|
4194
|
+
};
|
|
4195
|
+
}
|
|
4196
|
+
//#endregion
|
|
4055
4197
|
//#region ../core/src/charts/types/PieChart.tsx
|
|
4056
|
-
var
|
|
4198
|
+
var ko = 12, Ao = 8, jo = ({ type: e, data: t, appearance: r, adminTheme: i, chartColors: a, mutedCategory: o, renderer: l, family: u, valueFormatter: f, className: p, ariaLabel: h, answerLine: g, onDataPointClick: _, onEvents: y }) => {
|
|
4057
4199
|
let x = G(() => d(r, {
|
|
4058
4200
|
column: t.series[0]?.name,
|
|
4059
4201
|
columns: t.series.map((e) => e.name),
|
|
@@ -4066,36 +4208,46 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4066
4208
|
let l = t.categories, u = t.series[0]?.data ?? [], d = M(x), f = l.map((e, t) => ({
|
|
4067
4209
|
name: String(e),
|
|
4068
4210
|
value: u[t] ?? null
|
|
4069
|
-
})).filter((e) => e.value !== null)
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4211
|
+
})).filter((e) => e.value !== null);
|
|
4212
|
+
if (e === "rose") return Oo({
|
|
4213
|
+
data: t,
|
|
4214
|
+
slices: f.map((e, t) => ({
|
|
4215
|
+
...e,
|
|
4216
|
+
colorIndex: t
|
|
4217
|
+
})),
|
|
4218
|
+
appearance: r,
|
|
4219
|
+
theme: i,
|
|
4220
|
+
layout: a,
|
|
4221
|
+
valueFormatter: x,
|
|
4222
|
+
mutedCategory: o
|
|
4223
|
+
});
|
|
4224
|
+
let p = r?.chartLabel?.radialChartposition, h = p === "hidden", g = p === "inside", _ = s({
|
|
4073
4225
|
labels: t.categories.map(String),
|
|
4074
4226
|
layout: a,
|
|
4075
4227
|
legend: r?.chartLegend,
|
|
4076
4228
|
fontSizePx: i.text.fontSize,
|
|
4077
|
-
directLabelling: !
|
|
4078
|
-
}),
|
|
4229
|
+
directLabelling: !h
|
|
4230
|
+
}), y = m({
|
|
4079
4231
|
legendRoom: r?.chartLegend?.show !== !1,
|
|
4080
4232
|
layout: a,
|
|
4081
|
-
outsideLabels: !
|
|
4082
|
-
legendBand:
|
|
4083
|
-
}),
|
|
4233
|
+
outsideLabels: !g,
|
|
4234
|
+
legendBand: _
|
|
4235
|
+
}), S = e === "doughnut" ? ["58%", "80%"] : "72%", C = h || g ? {
|
|
4084
4236
|
mode: "outside",
|
|
4085
4237
|
radiusScale: 1
|
|
4086
4238
|
} : v({
|
|
4087
4239
|
layout: a,
|
|
4088
|
-
outerRadius: Number.parseFloat(Array.isArray(
|
|
4089
|
-
centerX:
|
|
4090
|
-
insetLeftPx:
|
|
4091
|
-
insetRightPx:
|
|
4240
|
+
outerRadius: Number.parseFloat(Array.isArray(S) ? S[1] : S) / 100 * y.radiusScale,
|
|
4241
|
+
centerX: y.center[0],
|
|
4242
|
+
insetLeftPx: _.show ? _.reserveLeftPx : 0,
|
|
4243
|
+
insetRightPx: _.show ? _.reserveRightPx : 0,
|
|
4092
4244
|
labelLines: f.flatMap((e) => [e.name, d(e.value, e.name)]),
|
|
4093
4245
|
fontSizePx: i.text.fontSize,
|
|
4094
4246
|
leaderPx: 20
|
|
4095
|
-
}),
|
|
4096
|
-
if (!
|
|
4247
|
+
}), w = !h && C.mode !== "hidden", T = r?.chartLegend;
|
|
4248
|
+
if (!w && !h && T?.show === !1) {
|
|
4097
4249
|
let e = {
|
|
4098
|
-
...
|
|
4250
|
+
...T,
|
|
4099
4251
|
show: !0,
|
|
4100
4252
|
fixedPosition: "bottom-center",
|
|
4101
4253
|
enableVariablePosition: !1
|
|
@@ -4106,17 +4258,17 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4106
4258
|
fontSizePx: i.text.fontSize,
|
|
4107
4259
|
directLabelling: !1
|
|
4108
4260
|
});
|
|
4109
|
-
n.show && (
|
|
4261
|
+
n.show && (T = e, _ = n, y = m({
|
|
4110
4262
|
legendRoom: !0,
|
|
4111
4263
|
layout: a,
|
|
4112
4264
|
outsideLabels: !1,
|
|
4113
|
-
legendBand:
|
|
4265
|
+
legendBand: _
|
|
4114
4266
|
}));
|
|
4115
4267
|
}
|
|
4116
|
-
let
|
|
4268
|
+
let E = y.radiusScale * C.radiusScale, D = d(u.reduce((e, t) => e + (typeof t == "number" ? t : 0), 0)), k = a.width > 0 && a.height > 0 ? Math.min(a.width, a.height) * .72 * .58 * E : 0, N = i.text.fontSize + 10, P = k > 0 && D.length > 0 ? Math.max(11, Math.min(N, Math.floor(k * .92 / (D.length * .6)))) : N;
|
|
4117
4269
|
return {
|
|
4118
4270
|
color: i.palette,
|
|
4119
|
-
legend: ee(i,
|
|
4271
|
+
legend: ee(i, T, _),
|
|
4120
4272
|
tooltip: A(i, {
|
|
4121
4273
|
axis: !1,
|
|
4122
4274
|
valueFormatter: x,
|
|
@@ -4127,7 +4279,7 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4127
4279
|
textStyle: j(i.text),
|
|
4128
4280
|
...b(),
|
|
4129
4281
|
graphic: e === "doughnut" && a.width > 0 && a.height > 0 ? (() => {
|
|
4130
|
-
let e = i.text.fontSize, t =
|
|
4282
|
+
let e = i.text.fontSize, t = P + 4 + e, n = {
|
|
4131
4283
|
type: "text",
|
|
4132
4284
|
silent: !0,
|
|
4133
4285
|
z: 10
|
|
@@ -4138,17 +4290,17 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4138
4290
|
z: 10,
|
|
4139
4291
|
bounding: "raw",
|
|
4140
4292
|
left: "center",
|
|
4141
|
-
top:
|
|
4293
|
+
top: y.center[1],
|
|
4142
4294
|
children: [{
|
|
4143
4295
|
...n,
|
|
4144
4296
|
style: {
|
|
4145
4297
|
x: 0,
|
|
4146
|
-
y: -t / 2 +
|
|
4147
|
-
text:
|
|
4298
|
+
y: -t / 2 + P / 2,
|
|
4299
|
+
text: D,
|
|
4148
4300
|
textAlign: "center",
|
|
4149
4301
|
textVerticalAlign: "middle",
|
|
4150
4302
|
fontFamily: i.text.fontFamily,
|
|
4151
|
-
fontSize:
|
|
4303
|
+
fontSize: P,
|
|
4152
4304
|
fontWeight: 600,
|
|
4153
4305
|
fill: i.text.color
|
|
4154
4306
|
}
|
|
@@ -4172,43 +4324,42 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4172
4324
|
type: "pie",
|
|
4173
4325
|
...c(),
|
|
4174
4326
|
name: t.series[0]?.name,
|
|
4175
|
-
radius: n(
|
|
4176
|
-
center:
|
|
4177
|
-
...e === "rose" ? { roseType: "area" } : {},
|
|
4327
|
+
radius: n(S, E),
|
|
4328
|
+
center: y.center,
|
|
4178
4329
|
avoidLabelOverlap: !0,
|
|
4179
4330
|
...O(r?.chartLabelOverlap?.strategy),
|
|
4180
4331
|
itemStyle: {
|
|
4181
4332
|
borderWidth: 2,
|
|
4182
4333
|
borderColor: i.tooltip.bg
|
|
4183
4334
|
},
|
|
4184
|
-
label:
|
|
4335
|
+
label: w ? {
|
|
4185
4336
|
show: !0,
|
|
4186
|
-
position:
|
|
4187
|
-
formatter: (e) =>
|
|
4337
|
+
position: g ? "inside" : "outside",
|
|
4338
|
+
formatter: (e) => `${e.name}\n${d(e.value, e.name)}`,
|
|
4188
4339
|
...j(i.text),
|
|
4189
|
-
...
|
|
4190
|
-
...
|
|
4340
|
+
...g ? {} : F(r?.chartLabelOverlap?.strategy),
|
|
4341
|
+
...Do({
|
|
4191
4342
|
strategy: r?.chartLabelInk?.strategy,
|
|
4192
|
-
position:
|
|
4343
|
+
position: g ? "inside" : "outside",
|
|
4193
4344
|
fill: void 0,
|
|
4194
4345
|
surface: i.tooltip.bg
|
|
4195
4346
|
})
|
|
4196
4347
|
} : { show: !1 },
|
|
4197
|
-
labelLine:
|
|
4348
|
+
labelLine: w && !g ? {
|
|
4198
4349
|
show: !0,
|
|
4199
|
-
length:
|
|
4200
|
-
length2:
|
|
4350
|
+
length: ko,
|
|
4351
|
+
length2: Ao,
|
|
4201
4352
|
smooth: !0
|
|
4202
4353
|
} : { show: !1 },
|
|
4203
4354
|
emphasis: {
|
|
4204
4355
|
focus: "self",
|
|
4205
4356
|
scaleSize: 4
|
|
4206
4357
|
},
|
|
4207
|
-
blur: { itemStyle: { opacity:
|
|
4358
|
+
blur: { itemStyle: { opacity: te } },
|
|
4208
4359
|
data: f.map((e, n) => {
|
|
4209
|
-
let a = e.name === o ? i.mutedText : t.series[0]?.color ?? i.palette[n % i.palette.length], s =
|
|
4360
|
+
let a = e.name === o ? i.mutedText : t.series[0]?.color ?? i.palette[n % i.palette.length], s = Do({
|
|
4210
4361
|
strategy: r?.chartLabelInk?.strategy,
|
|
4211
|
-
position:
|
|
4362
|
+
position: g ? "inside" : "outside",
|
|
4212
4363
|
fill: a,
|
|
4213
4364
|
surface: i.tooltip.bg
|
|
4214
4365
|
});
|
|
@@ -4246,46 +4397,46 @@ var Eo = 12, Do = 8, Oo = 12, ko = 24, Ao = ({ type: e, data: t, appearance: r,
|
|
|
4246
4397
|
};
|
|
4247
4398
|
//#endregion
|
|
4248
4399
|
//#region ../core/src/charts/types/PivotTable.tsx
|
|
4249
|
-
function
|
|
4400
|
+
function Mo(e) {
|
|
4250
4401
|
let t = null;
|
|
4251
4402
|
for (let n of e) n != null && (t = (t ?? 0) + n);
|
|
4252
4403
|
return t;
|
|
4253
4404
|
}
|
|
4254
|
-
var
|
|
4255
|
-
let c = K(null), l =
|
|
4405
|
+
var No = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatter: i, className: a, ariaLabel: o, onDataPointClick: s }) => {
|
|
4406
|
+
let c = K(null), l = Ua(c, {
|
|
4256
4407
|
appearance: t,
|
|
4257
4408
|
adminTheme: n,
|
|
4258
4409
|
chartColors: r
|
|
4259
|
-
}), u = i ??
|
|
4260
|
-
return /* @__PURE__ */ J(
|
|
4410
|
+
}), u = i ?? La, { categories: d, series: f } = e, p = d.length === 0 || f.length === 0, m = d.map((e, t) => Mo(f.map((e) => e.data[t] ?? null))), h = f.map((e) => Mo(e.data)), g = Mo(m);
|
|
4411
|
+
return /* @__PURE__ */ J(Ha, {
|
|
4261
4412
|
hostRef: c,
|
|
4262
4413
|
fontFamily: l.text.fontFamily,
|
|
4263
4414
|
letterSpacing: l.text.letterSpacing,
|
|
4264
4415
|
className: a,
|
|
4265
4416
|
ariaLabel: o,
|
|
4266
|
-
children: p ? /* @__PURE__ */ J(
|
|
4417
|
+
children: p ? /* @__PURE__ */ J(Va, {}) : /* @__PURE__ */ Y("table", {
|
|
4267
4418
|
className: "w-full border-collapse",
|
|
4268
4419
|
"aria-label": o,
|
|
4269
4420
|
children: [
|
|
4270
4421
|
/* @__PURE__ */ J("thead", { children: /* @__PURE__ */ Y("tr", { children: [
|
|
4271
|
-
/* @__PURE__ */ J(
|
|
4422
|
+
/* @__PURE__ */ J(Ra, { children: /* @__PURE__ */ J("span", {
|
|
4272
4423
|
className: "sr-only",
|
|
4273
4424
|
children: "Category"
|
|
4274
4425
|
}) }),
|
|
4275
|
-
f.map((e) => /* @__PURE__ */ J(
|
|
4426
|
+
f.map((e) => /* @__PURE__ */ J(Ra, {
|
|
4276
4427
|
align: "right",
|
|
4277
4428
|
children: e.name
|
|
4278
4429
|
}, e.name)),
|
|
4279
|
-
/* @__PURE__ */ J(
|
|
4430
|
+
/* @__PURE__ */ J(Ra, {
|
|
4280
4431
|
align: "right",
|
|
4281
4432
|
children: "Total"
|
|
4282
4433
|
})
|
|
4283
4434
|
] }) }),
|
|
4284
4435
|
/* @__PURE__ */ J("tbody", { children: d.map((e, t) => /* @__PURE__ */ Y("tr", { children: [
|
|
4285
|
-
/* @__PURE__ */ J(
|
|
4436
|
+
/* @__PURE__ */ J(za, { children: e }),
|
|
4286
4437
|
f.map((n) => {
|
|
4287
4438
|
let r = n.data[t] ?? null;
|
|
4288
|
-
return /* @__PURE__ */ J(
|
|
4439
|
+
return /* @__PURE__ */ J(Ba, {
|
|
4289
4440
|
onActivate: s ? () => s({
|
|
4290
4441
|
seriesName: n.name,
|
|
4291
4442
|
category: e,
|
|
@@ -4294,21 +4445,21 @@ var Mo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
4294
4445
|
children: u(r, n.name)
|
|
4295
4446
|
}, n.name);
|
|
4296
4447
|
}),
|
|
4297
|
-
/* @__PURE__ */ J(
|
|
4448
|
+
/* @__PURE__ */ J(Ba, {
|
|
4298
4449
|
emphasis: !0,
|
|
4299
4450
|
children: u(m[t])
|
|
4300
4451
|
})
|
|
4301
4452
|
] }, String(e))) }),
|
|
4302
4453
|
/* @__PURE__ */ J("tfoot", { children: /* @__PURE__ */ Y("tr", { children: [
|
|
4303
|
-
/* @__PURE__ */ J(
|
|
4454
|
+
/* @__PURE__ */ J(za, {
|
|
4304
4455
|
className: V("bg-surface-raised"),
|
|
4305
4456
|
children: "Total"
|
|
4306
4457
|
}),
|
|
4307
|
-
f.map((e, t) => /* @__PURE__ */ J(
|
|
4458
|
+
f.map((e, t) => /* @__PURE__ */ J(Ba, {
|
|
4308
4459
|
emphasis: !0,
|
|
4309
4460
|
children: u(h[t], e.name)
|
|
4310
4461
|
}, e.name)),
|
|
4311
|
-
/* @__PURE__ */ J(
|
|
4462
|
+
/* @__PURE__ */ J(Ba, {
|
|
4312
4463
|
emphasis: !0,
|
|
4313
4464
|
children: u(g)
|
|
4314
4465
|
})
|
|
@@ -4319,7 +4470,7 @@ var Mo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
4319
4470
|
};
|
|
4320
4471
|
//#endregion
|
|
4321
4472
|
//#region ../core/src/charts/types/ProgressBarChart.tsx
|
|
4322
|
-
function
|
|
4473
|
+
function Po(e, t) {
|
|
4323
4474
|
let n = 0;
|
|
4324
4475
|
for (let r of e.series) {
|
|
4325
4476
|
let e = r.data[t];
|
|
@@ -4327,7 +4478,7 @@ function No(e, t) {
|
|
|
4327
4478
|
}
|
|
4328
4479
|
return n;
|
|
4329
4480
|
}
|
|
4330
|
-
function
|
|
4481
|
+
function Fo(e) {
|
|
4331
4482
|
if (e <= 0) return 1;
|
|
4332
4483
|
let t = 10 ** Math.floor(Math.log10(e));
|
|
4333
4484
|
for (let n of [
|
|
@@ -4342,7 +4493,7 @@ function Po(e) {
|
|
|
4342
4493
|
}
|
|
4343
4494
|
return 10 * t;
|
|
4344
4495
|
}
|
|
4345
|
-
var
|
|
4496
|
+
var Io = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: f }) => {
|
|
4346
4497
|
let p = G(() => d(t, {
|
|
4347
4498
|
columns: e.series.map((e) => e.name),
|
|
4348
4499
|
fallback: o
|
|
@@ -4351,10 +4502,10 @@ var Fo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4351
4502
|
e.series,
|
|
4352
4503
|
o
|
|
4353
4504
|
]), m = U((n) => {
|
|
4354
|
-
let r = M(p), i = e.categories.map((t, n) =>
|
|
4505
|
+
let r = M(p), i = e.categories.map((t, n) => Po(e, n)), a = i.filter((e) => Number.isFinite(e)), o = Fo(Math.max(0, ...a) * 1.15 || 1), s = t?.chartLabel?.position, c = s === "hidden" ? { show: !1 } : N(n, {
|
|
4355
4506
|
...t?.chartLabel,
|
|
4356
4507
|
position: s ?? "right"
|
|
4357
|
-
}, "right"), l = (t) => e.series[0]?.color ?? n.palette[t % n.palette.length], u = c.show === !0 &&
|
|
4508
|
+
}, "right"), l = (t) => e.series[0]?.color ?? n.palette[t % n.palette.length], u = c.show === !0 && ce(c.position), d = {
|
|
4358
4509
|
hideAxisLines: !0,
|
|
4359
4510
|
hideSplitLines: !0,
|
|
4360
4511
|
hideAxisLabels: !0,
|
|
@@ -4375,11 +4526,11 @@ var Fo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4375
4526
|
textStyle: j(n.text),
|
|
4376
4527
|
...b(),
|
|
4377
4528
|
xAxis: {
|
|
4378
|
-
...
|
|
4529
|
+
...I(n, d, "value"),
|
|
4379
4530
|
max: o
|
|
4380
4531
|
},
|
|
4381
4532
|
yAxis: {
|
|
4382
|
-
...
|
|
4533
|
+
...I(n, t?.verticalAxis, "category", void 0, {
|
|
4383
4534
|
categories: e.categories,
|
|
4384
4535
|
orientation: "left"
|
|
4385
4536
|
}),
|
|
@@ -4443,7 +4594,7 @@ var Fo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4443
4594
|
};
|
|
4444
4595
|
//#endregion
|
|
4445
4596
|
//#region ../core/src/charts/types/RadarChart.tsx
|
|
4446
|
-
function
|
|
4597
|
+
function Lo(e, t) {
|
|
4447
4598
|
let n = 0;
|
|
4448
4599
|
for (let r of e.series) {
|
|
4449
4600
|
let e = r.data[t];
|
|
@@ -4451,14 +4602,14 @@ function Io(e, t) {
|
|
|
4451
4602
|
}
|
|
4452
4603
|
return n;
|
|
4453
4604
|
}
|
|
4454
|
-
function
|
|
4605
|
+
function Ro(e, t, n, r, i) {
|
|
4455
4606
|
let a = t.categories.map((e, n) => {
|
|
4456
|
-
let r =
|
|
4607
|
+
let r = Lo(t, n);
|
|
4457
4608
|
return {
|
|
4458
4609
|
name: String(e),
|
|
4459
4610
|
max: r > 0 ? r * 1.2 : 1
|
|
4460
4611
|
};
|
|
4461
|
-
}), { showSymbol: o } =
|
|
4612
|
+
}), { showSymbol: o } = L(e, e.palette[0], n?.chartMarkers?.show, $i("radar", t.categories.length, void 0, e.text.fontSize, i));
|
|
4462
4613
|
return {
|
|
4463
4614
|
...k(e, n, { valueFormatter: r }),
|
|
4464
4615
|
tooltip: A(e, {
|
|
@@ -4507,8 +4658,8 @@ function Lo(e, t, n, r, i) {
|
|
|
4507
4658
|
}]
|
|
4508
4659
|
};
|
|
4509
4660
|
}
|
|
4510
|
-
var
|
|
4511
|
-
let p = U((n) =>
|
|
4661
|
+
var zo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d, applyDensity: f }) => {
|
|
4662
|
+
let p = U((n) => Ro(n, e, t, o, f), [
|
|
4512
4663
|
e,
|
|
4513
4664
|
t,
|
|
4514
4665
|
o,
|
|
@@ -4530,7 +4681,7 @@ var Ro = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4530
4681
|
onDataPointClick: u,
|
|
4531
4682
|
onEvents: d
|
|
4532
4683
|
});
|
|
4533
|
-
},
|
|
4684
|
+
}, Bo = ({ data: e, appearance: t, adminTheme: r, chartColors: i, renderer: a, family: o, valueFormatter: c, className: l, ariaLabel: u, answerLine: d, onDataPointClick: f, onEvents: p }) => {
|
|
4534
4685
|
let h = U((r, i) => {
|
|
4535
4686
|
let a = e.categories, o = e.series[0]?.data ?? [], l = M(c), u = o.filter((e) => typeof e == "number"), d = u.length ? Math.max(...u) : 1, f = t?.chartLabel?.radialChartposition, p = f === "hidden", h = f === "outside" ? "end" : "insideEnd", g = s({
|
|
4536
4687
|
labels: a.map(String),
|
|
@@ -4580,7 +4731,7 @@ var Ro = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4580
4731
|
rotate: 0,
|
|
4581
4732
|
formatter: () => l(s, String(n)),
|
|
4582
4733
|
...j(r.text),
|
|
4583
|
-
...
|
|
4734
|
+
...Do({
|
|
4584
4735
|
strategy: t?.chartLabelInk?.strategy,
|
|
4585
4736
|
position: h,
|
|
4586
4737
|
fill: c,
|
|
@@ -4637,12 +4788,12 @@ var Ro = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4637
4788
|
onDataPointClick: f,
|
|
4638
4789
|
onEvents: p
|
|
4639
4790
|
});
|
|
4640
|
-
},
|
|
4791
|
+
}, Vo = {
|
|
4641
4792
|
top: 12,
|
|
4642
4793
|
bottom: 12,
|
|
4643
4794
|
left: 8,
|
|
4644
4795
|
right: 8
|
|
4645
|
-
},
|
|
4796
|
+
}, Ho = 1.6, Uo = {
|
|
4646
4797
|
light: {
|
|
4647
4798
|
rest: .42,
|
|
4648
4799
|
emphasis: .72,
|
|
@@ -4654,7 +4805,7 @@ var Ro = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4654
4805
|
blur: .12
|
|
4655
4806
|
}
|
|
4656
4807
|
};
|
|
4657
|
-
function
|
|
4808
|
+
function Wo(e, t) {
|
|
4658
4809
|
let n = /* @__PURE__ */ new Map();
|
|
4659
4810
|
for (let t of e) n.set(t.name, 0);
|
|
4660
4811
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -4674,7 +4825,7 @@ function Uo(e, t) {
|
|
|
4674
4825
|
}
|
|
4675
4826
|
return n;
|
|
4676
4827
|
}
|
|
4677
|
-
function
|
|
4828
|
+
function Go(e, t) {
|
|
4678
4829
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
4679
4830
|
for (let e of t) {
|
|
4680
4831
|
let t = typeof e.value == "number" && Number.isFinite(e.value) ? e.value : 0;
|
|
@@ -4684,10 +4835,10 @@ function Wo(e, t) {
|
|
|
4684
4835
|
for (let t of e) i.set(t.name, Math.max(n.get(t.name) ?? 0, r.get(t.name) ?? 0));
|
|
4685
4836
|
return i;
|
|
4686
4837
|
}
|
|
4687
|
-
function
|
|
4838
|
+
function Ko(e, t, n, r) {
|
|
4688
4839
|
let i = r?.height ?? 0;
|
|
4689
4840
|
if (!(i > 0)) return null;
|
|
4690
|
-
let a = i -
|
|
4841
|
+
let a = i - Vo.top - Vo.bottom, o = n * Ho + 4, s = Math.max(1, Math.floor(a / o)), c = Wo(e, t), l = Go(e, t), u = /* @__PURE__ */ new Map();
|
|
4691
4842
|
for (let t of e) {
|
|
4692
4843
|
let e = c.get(t.name) ?? 0, n = u.get(e);
|
|
4693
4844
|
n ? n.push(t.name) : u.set(e, [t.name]);
|
|
@@ -4703,9 +4854,9 @@ function Go(e, t, n, r) {
|
|
|
4703
4854
|
}
|
|
4704
4855
|
return d;
|
|
4705
4856
|
}
|
|
4706
|
-
var
|
|
4857
|
+
var qo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: l, answerLine: u, onDataPointClick: d, onEvents: f }) => {
|
|
4707
4858
|
let p = U((n, r) => {
|
|
4708
|
-
let i = o ?? ((e) => E(e)), a = e.nodes ?? [], s = e.links ?? [], l = t?.chartLabel?.position, u = l === "hidden" ? { show: !1 } : N(n, { position: l ?? "right" }, "right"), d = new Set(s.map((e) => e.source)), f = (e) => !d.has(e), p = u.show !== !1, m = p ?
|
|
4859
|
+
let i = o ?? ((e) => E(e)), a = e.nodes ?? [], s = e.links ?? [], l = t?.chartLabel?.position, u = l === "hidden" ? { show: !1 } : N(n, { position: l ?? "right" }, "right"), d = new Set(s.map((e) => e.source)), f = (e) => !d.has(e), p = u.show !== !1, m = p ? Ko(a, s, n.text.fontSize, r) : null, h = Go(a, s), g = Ae(n.surface) === !0 ? Uo.dark : Uo.light;
|
|
4709
4860
|
return {
|
|
4710
4861
|
color: n.palette,
|
|
4711
4862
|
textStyle: j(n.text),
|
|
@@ -4718,10 +4869,10 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4718
4869
|
let t = e;
|
|
4719
4870
|
if (t?.dataType === "edge") {
|
|
4720
4871
|
let e = t.data ?? {};
|
|
4721
|
-
return
|
|
4872
|
+
return P(`${e.source ?? ""} → ${e.target ?? ""}`, [{ value: i(e.value ?? null) }]);
|
|
4722
4873
|
}
|
|
4723
4874
|
let n = t?.data?.name ?? "";
|
|
4724
|
-
return
|
|
4875
|
+
return P(n, [{
|
|
4725
4876
|
label: "Total",
|
|
4726
4877
|
value: i(h.get(n) ?? null)
|
|
4727
4878
|
}]);
|
|
@@ -4731,10 +4882,10 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4731
4882
|
type: "sankey",
|
|
4732
4883
|
...c(),
|
|
4733
4884
|
layout: "none",
|
|
4734
|
-
left:
|
|
4735
|
-
right:
|
|
4736
|
-
top:
|
|
4737
|
-
bottom:
|
|
4885
|
+
left: Vo.left,
|
|
4886
|
+
right: Vo.right,
|
|
4887
|
+
top: Vo.top,
|
|
4888
|
+
bottom: Vo.bottom,
|
|
4738
4889
|
nodeWidth: 14,
|
|
4739
4890
|
nodeGap: 10,
|
|
4740
4891
|
data: a.map((e, t) => ({
|
|
@@ -4798,7 +4949,7 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4798
4949
|
onDataPointClick: d,
|
|
4799
4950
|
onEvents: f
|
|
4800
4951
|
});
|
|
4801
|
-
},
|
|
4952
|
+
}, Jo = 10, Yo = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
4802
4953
|
let f = U((n, r) => {
|
|
4803
4954
|
let i = N(n, t?.chartLabel), a = (e) => o ? o(e.value ?? null, e.seriesName) : String(e.value ?? "");
|
|
4804
4955
|
return {
|
|
@@ -4809,14 +4960,14 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4809
4960
|
legendNames: e.series.map((e) => e.name)
|
|
4810
4961
|
}),
|
|
4811
4962
|
xAxis: {
|
|
4812
|
-
...
|
|
4963
|
+
...I(n, t?.horizontalAxis, "category", void 0, {
|
|
4813
4964
|
categories: e.categories,
|
|
4814
4965
|
orientation: "bottom",
|
|
4815
4966
|
layout: r
|
|
4816
4967
|
}),
|
|
4817
4968
|
data: e.categories
|
|
4818
4969
|
},
|
|
4819
|
-
yAxis:
|
|
4970
|
+
yAxis: I(n, t?.verticalAxis, "value", o),
|
|
4820
4971
|
series: e.series.map((e, t) => {
|
|
4821
4972
|
let r = e.color ?? n.palette[t % n.palette.length];
|
|
4822
4973
|
return {
|
|
@@ -4825,7 +4976,7 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4825
4976
|
data: e.data,
|
|
4826
4977
|
color: r,
|
|
4827
4978
|
symbol: "circle",
|
|
4828
|
-
symbolSize:
|
|
4979
|
+
symbolSize: Jo,
|
|
4829
4980
|
itemStyle: {
|
|
4830
4981
|
color: r,
|
|
4831
4982
|
borderColor: n.tooltip.bg,
|
|
@@ -4844,7 +4995,7 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4844
4995
|
...i,
|
|
4845
4996
|
formatter: a
|
|
4846
4997
|
} : i,
|
|
4847
|
-
...
|
|
4998
|
+
...ne({
|
|
4848
4999
|
pointCount: e.data?.length ?? 0,
|
|
4849
5000
|
perPointStyling: i.show === !0
|
|
4850
5001
|
}).series
|
|
@@ -4875,7 +5026,7 @@ var Ko = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
4875
5026
|
};
|
|
4876
5027
|
//#endregion
|
|
4877
5028
|
//#region ../core/src/charts/comparison.ts
|
|
4878
|
-
function
|
|
5029
|
+
function Xo(e) {
|
|
4879
5030
|
for (let t = e.length - 1; t >= 0; --t) {
|
|
4880
5031
|
let n = e[t];
|
|
4881
5032
|
if (n != null) return {
|
|
@@ -4885,7 +5036,7 @@ function Yo(e) {
|
|
|
4885
5036
|
}
|
|
4886
5037
|
return null;
|
|
4887
5038
|
}
|
|
4888
|
-
function
|
|
5039
|
+
function Zo(e, t) {
|
|
4889
5040
|
for (let n = t - 1; n >= 0; --n) {
|
|
4890
5041
|
let t = e[n];
|
|
4891
5042
|
if (t != null) return {
|
|
@@ -4895,7 +5046,7 @@ function Xo(e, t) {
|
|
|
4895
5046
|
}
|
|
4896
5047
|
return null;
|
|
4897
5048
|
}
|
|
4898
|
-
function
|
|
5049
|
+
function Qo(e) {
|
|
4899
5050
|
for (let t = 0; t < e.length; t += 1) {
|
|
4900
5051
|
let n = e[t];
|
|
4901
5052
|
if (n != null) return {
|
|
@@ -4905,14 +5056,14 @@ function Zo(e) {
|
|
|
4905
5056
|
}
|
|
4906
5057
|
return null;
|
|
4907
5058
|
}
|
|
4908
|
-
function
|
|
5059
|
+
function $o(e, t) {
|
|
4909
5060
|
return {
|
|
4910
5061
|
available: !1,
|
|
4911
5062
|
kind: e,
|
|
4912
5063
|
reason: t
|
|
4913
5064
|
};
|
|
4914
5065
|
}
|
|
4915
|
-
function
|
|
5066
|
+
function es(e, t) {
|
|
4916
5067
|
switch (e) {
|
|
4917
5068
|
case "previous": return "vs previous";
|
|
4918
5069
|
case "period-offset": {
|
|
@@ -4925,18 +5076,18 @@ function $o(e, t) {
|
|
|
4925
5076
|
case "none": return "";
|
|
4926
5077
|
}
|
|
4927
5078
|
}
|
|
4928
|
-
function
|
|
5079
|
+
function ts(e, t, n) {
|
|
4929
5080
|
if (e === "flat") return "neutral";
|
|
4930
5081
|
let r = t == null || t === "auto" ? n ?? "up-is-good" : t;
|
|
4931
5082
|
if (r === "neutral") return "neutral";
|
|
4932
5083
|
let i = r === "up-is-good";
|
|
4933
5084
|
return e === "up" ? i ? "good" : "bad" : i ? "bad" : "good";
|
|
4934
5085
|
}
|
|
4935
|
-
function
|
|
5086
|
+
function ns(e, t) {
|
|
4936
5087
|
return e === 0 ? 0 : t === 0 ? null : e / Math.abs(t) * 100;
|
|
4937
5088
|
}
|
|
4938
|
-
function
|
|
4939
|
-
let a = t.value - n.value, o =
|
|
5089
|
+
function rs(e, t, n, r, i) {
|
|
5090
|
+
let a = t.value - n.value, o = ns(a, n.value), s = a === 0 ? "flat" : a > 0 ? "up" : "down";
|
|
4940
5091
|
return {
|
|
4941
5092
|
available: !0,
|
|
4942
5093
|
kind: e,
|
|
@@ -4947,56 +5098,56 @@ function ns(e, t, n, r, i) {
|
|
|
4947
5098
|
diff: a,
|
|
4948
5099
|
pct: o,
|
|
4949
5100
|
direction: s,
|
|
4950
|
-
sentiment:
|
|
5101
|
+
sentiment: ts(s, r?.polarity, i),
|
|
4951
5102
|
display: r?.display ?? "percent",
|
|
4952
5103
|
format: r?.format,
|
|
4953
|
-
label: r?.label ??
|
|
5104
|
+
label: r?.label ?? es(e, r)
|
|
4954
5105
|
};
|
|
4955
5106
|
}
|
|
4956
|
-
function
|
|
5107
|
+
function is(e, t) {
|
|
4957
5108
|
let n = t?.kind ?? "previous";
|
|
4958
|
-
if (n === "none") return
|
|
4959
|
-
let r =
|
|
4960
|
-
if (!r) return
|
|
5109
|
+
if (n === "none") return $o(n, "no-comparison");
|
|
5110
|
+
let r = Xo(e.values);
|
|
5111
|
+
if (!r) return $o(n, "no-current-value");
|
|
4961
5112
|
switch (n) {
|
|
4962
5113
|
case "previous": {
|
|
4963
|
-
let i =
|
|
4964
|
-
return i ?
|
|
5114
|
+
let i = Zo(e.values, r.index);
|
|
5115
|
+
return i ? rs(n, r, i, t, e.measurePolarity) : $o(n, "insufficient-history");
|
|
4965
5116
|
}
|
|
4966
5117
|
case "period-offset": {
|
|
4967
5118
|
let i = t?.offset != null && t.offset > 0 ? t.offset : 1, a = r.index - i;
|
|
4968
|
-
if (a < 0) return
|
|
5119
|
+
if (a < 0) return $o(n, "out-of-range");
|
|
4969
5120
|
let o = e.values[a];
|
|
4970
|
-
return o == null ?
|
|
5121
|
+
return o == null ? $o(n, "gap-at-offset") : rs(n, r, {
|
|
4971
5122
|
value: o,
|
|
4972
5123
|
index: a
|
|
4973
5124
|
}, t, e.measurePolarity);
|
|
4974
5125
|
}
|
|
4975
5126
|
case "first": {
|
|
4976
|
-
let i =
|
|
4977
|
-
return !i || i.index === r.index ?
|
|
5127
|
+
let i = Qo(e.values);
|
|
5128
|
+
return !i || i.index === r.index ? $o(n, "insufficient-history") : rs(n, r, i, t, e.measurePolarity);
|
|
4978
5129
|
}
|
|
4979
|
-
case "target": return t?.target == null ?
|
|
5130
|
+
case "target": return t?.target == null ? $o(n, "no-target") : rs(n, r, {
|
|
4980
5131
|
value: t.target,
|
|
4981
5132
|
index: null
|
|
4982
5133
|
}, t, e.measurePolarity);
|
|
4983
5134
|
case "field": {
|
|
4984
5135
|
let i = t?.field, a = i ? e.fields?.[i] : void 0, o = a?.[r.index];
|
|
4985
|
-
return !i || a == null || o == null ?
|
|
5136
|
+
return !i || a == null || o == null ? $o(n, "no-field") : rs(n, r, {
|
|
4986
5137
|
value: o,
|
|
4987
5138
|
index: r.index
|
|
4988
5139
|
}, t, e.measurePolarity);
|
|
4989
5140
|
}
|
|
4990
5141
|
}
|
|
4991
5142
|
}
|
|
4992
|
-
var
|
|
5143
|
+
var as = [
|
|
4993
5144
|
"B",
|
|
4994
5145
|
"KB",
|
|
4995
5146
|
"MB",
|
|
4996
5147
|
"GB",
|
|
4997
5148
|
"TB",
|
|
4998
5149
|
"PB"
|
|
4999
|
-
],
|
|
5150
|
+
], os = [
|
|
5000
5151
|
"B",
|
|
5001
5152
|
"KiB",
|
|
5002
5153
|
"MiB",
|
|
@@ -5004,41 +5155,41 @@ var is = [
|
|
|
5004
5155
|
"TiB",
|
|
5005
5156
|
"PiB"
|
|
5006
5157
|
];
|
|
5007
|
-
function
|
|
5008
|
-
let r = t ? 1024 : 1e3, i = t ?
|
|
5158
|
+
function ss(e, t, n) {
|
|
5159
|
+
let r = t ? 1024 : 1e3, i = t ? os : as, a = Math.abs(e);
|
|
5009
5160
|
if (a < r) return `${e.toFixed(0)} ${i[0]}`;
|
|
5010
5161
|
let o = Math.min(Math.floor(Math.log(a) / Math.log(r)), i.length - 1), s = e / r ** o, c = n ?? 1;
|
|
5011
5162
|
return `${s.toFixed(c)} ${i[o]}`;
|
|
5012
5163
|
}
|
|
5013
|
-
function
|
|
5164
|
+
function cs(e, t) {
|
|
5014
5165
|
let n = new Date(e);
|
|
5015
5166
|
return Number.isNaN(n.getTime()) ? "-" : t === "date" ? n.toLocaleDateString() : n.toLocaleTimeString();
|
|
5016
5167
|
}
|
|
5017
|
-
function
|
|
5168
|
+
function ls(e) {
|
|
5018
5169
|
let t = Math.abs(e), n = e < 0 ? "-" : "", r = Math.floor(t / 3600), i = Math.floor(t % 3600 / 60), a = Math.floor(t % 60);
|
|
5019
5170
|
return r > 0 ? `${n}${r}h ${i}m` : i > 0 ? `${n}${i}m ${a}s` : `${n}${a}s`;
|
|
5020
5171
|
}
|
|
5021
|
-
function
|
|
5172
|
+
function us(e, t) {
|
|
5022
5173
|
if (!t || t === "," || t === "none") return e;
|
|
5023
5174
|
if (t === " ") return e.split(",").join(" ");
|
|
5024
5175
|
let n = "";
|
|
5025
5176
|
for (let t of e) n += t === "," ? "." : t === "." ? "," : t;
|
|
5026
5177
|
return n;
|
|
5027
5178
|
}
|
|
5028
|
-
function
|
|
5179
|
+
function ds(e, t) {
|
|
5029
5180
|
let n = t.compact === "si", i = { useGrouping: t.separator !== "none" };
|
|
5030
|
-
return t.round != null && (i.minimumFractionDigits = t.round, i.maximumFractionDigits = t.round), n && (i.notation = "compact", i.compactDisplay = "short", i.maximumFractionDigits = t.round ?? 1),
|
|
5181
|
+
return t.round != null && (i.minimumFractionDigits = t.round, i.maximumFractionDigits = t.round), n && (i.notation = "compact", i.compactDisplay = "short", i.maximumFractionDigits = t.round ?? 1), us(r("en-US", i).format(e), t.separator);
|
|
5031
5182
|
}
|
|
5032
|
-
function
|
|
5183
|
+
function fs(e, t) {
|
|
5033
5184
|
return !e || e.type == null || e.type === "default" ? t : (t) => {
|
|
5034
5185
|
if (t == null || Number.isNaN(t)) return "-";
|
|
5035
5186
|
let n = Number(t);
|
|
5036
5187
|
if (!Number.isFinite(n)) return "-";
|
|
5037
5188
|
let i = (() => {
|
|
5038
5189
|
switch (e.type) {
|
|
5039
|
-
case "percent": return `${
|
|
5190
|
+
case "percent": return `${ds(n, e)}%`;
|
|
5040
5191
|
case "currency":
|
|
5041
|
-
if (!e.currency) return
|
|
5192
|
+
if (!e.currency) return ds(n, e);
|
|
5042
5193
|
try {
|
|
5043
5194
|
let t = {
|
|
5044
5195
|
style: "currency",
|
|
@@ -5046,37 +5197,37 @@ function ds(e, t) {
|
|
|
5046
5197
|
};
|
|
5047
5198
|
return e.round != null && (t.minimumFractionDigits = e.round, t.maximumFractionDigits = e.round), r(void 0, t).format(n);
|
|
5048
5199
|
} catch {
|
|
5049
|
-
return
|
|
5200
|
+
return ds(n, e);
|
|
5050
5201
|
}
|
|
5051
|
-
case "bytes-si": return
|
|
5052
|
-
case "bytes-iec": return
|
|
5053
|
-
case "date": return
|
|
5054
|
-
case "time": return
|
|
5055
|
-
case "duration": return
|
|
5056
|
-
default: return
|
|
5202
|
+
case "bytes-si": return ss(n, !1, e.round);
|
|
5203
|
+
case "bytes-iec": return ss(n, !0, e.round);
|
|
5204
|
+
case "date": return cs(n, "date");
|
|
5205
|
+
case "time": return cs(n, "time");
|
|
5206
|
+
case "duration": return ls(n);
|
|
5207
|
+
default: return ds(n, e);
|
|
5057
5208
|
}
|
|
5058
5209
|
})(), a = `${e.prefix ?? ""}${i}${e.suffix ?? ""}`;
|
|
5059
5210
|
return e.custom ? e.custom.includes("{value}") ? e.custom.replace("{value}", a) : e.custom : a;
|
|
5060
5211
|
};
|
|
5061
5212
|
}
|
|
5062
|
-
function
|
|
5213
|
+
function ps(e, t, n) {
|
|
5063
5214
|
if (!e?.available) return null;
|
|
5064
5215
|
let { diff: r, pct: i, display: a, format: o } = e;
|
|
5065
5216
|
if (r === 0) return "0%";
|
|
5066
|
-
let s = r > 0 ? "+" : "", c =
|
|
5217
|
+
let s = r > 0 ? "+" : "", c = fs(o, (e) => t(e, n)), l = i == null ? null : `${s}${i.toFixed(1)}%`, u = `${s}${c(r)}`;
|
|
5067
5218
|
return a === "absolute" ? u : a === "both" ? l == null ? u : `${l} (${u})` : l ?? u;
|
|
5068
5219
|
}
|
|
5069
5220
|
//#endregion
|
|
5070
5221
|
//#region ../core/src/charts/singleValueComparison.ts
|
|
5071
|
-
var
|
|
5072
|
-
function
|
|
5222
|
+
var ms = "No comparison available";
|
|
5223
|
+
function hs(e) {
|
|
5073
5224
|
return typeof e == "number" && Number.isFinite(e);
|
|
5074
5225
|
}
|
|
5075
|
-
function
|
|
5226
|
+
function gs(e) {
|
|
5076
5227
|
let t = null, n = null, r = -1, i = -1;
|
|
5077
5228
|
for (let a = e.length - 1; a >= 0; --a) {
|
|
5078
5229
|
let o = e[a];
|
|
5079
|
-
if (
|
|
5230
|
+
if (hs(o)) {
|
|
5080
5231
|
if (t === null) {
|
|
5081
5232
|
t = o, r = a;
|
|
5082
5233
|
continue;
|
|
@@ -5092,18 +5243,18 @@ function hs(e) {
|
|
|
5092
5243
|
previousIndex: i
|
|
5093
5244
|
};
|
|
5094
5245
|
}
|
|
5095
|
-
function
|
|
5246
|
+
function _s(e) {
|
|
5096
5247
|
if (!Number.isFinite(e)) return "";
|
|
5097
5248
|
let t = e > 0 ? "+" : e < 0 ? "-" : "", n = Math.abs(e);
|
|
5098
5249
|
return n >= 1e4 ? `${t}${a(n)}%` : n >= 100 ? `${t}${n.toFixed(0)}%` : `${t}${n.toFixed(1)}%`;
|
|
5099
5250
|
}
|
|
5100
|
-
function
|
|
5251
|
+
function vs(e, t, n) {
|
|
5101
5252
|
return `${e > 0 ? "+" : e < 0 ? "-" : ""}${t(Math.abs(e), n)}`;
|
|
5102
5253
|
}
|
|
5103
|
-
function
|
|
5254
|
+
function ys(e, t) {
|
|
5104
5255
|
return e === "flat" ? "neutral" : t === "increaseIsGood" ? e === "up" ? "positive" : "negative" : t === "increaseIsBad" ? e === "up" ? "negative" : "positive" : "neutral";
|
|
5105
5256
|
}
|
|
5106
|
-
var
|
|
5257
|
+
var bs = {
|
|
5107
5258
|
current: null,
|
|
5108
5259
|
currentIndex: -1,
|
|
5109
5260
|
baseline: null,
|
|
@@ -5118,11 +5269,11 @@ var ys = {
|
|
|
5118
5269
|
announcement: null,
|
|
5119
5270
|
reason: "no-data"
|
|
5120
5271
|
};
|
|
5121
|
-
function
|
|
5122
|
-
let { values: t, categories: n, series: r, seriesName: i, options: a, format: o } = e, { current: s, previous: c, currentIndex: l, previousIndex: u } =
|
|
5123
|
-
if (s == null) return { ...
|
|
5272
|
+
function xs(e) {
|
|
5273
|
+
let { values: t, categories: n, series: r, seriesName: i, options: a, format: o } = e, { current: s, previous: c, currentIndex: l, previousIndex: u } = gs(t);
|
|
5274
|
+
if (s == null) return { ...bs };
|
|
5124
5275
|
let d = {
|
|
5125
|
-
...
|
|
5276
|
+
...bs,
|
|
5126
5277
|
current: s,
|
|
5127
5278
|
currentIndex: l
|
|
5128
5279
|
};
|
|
@@ -5132,10 +5283,10 @@ function bs(e) {
|
|
|
5132
5283
|
};
|
|
5133
5284
|
let f = a?.mode ?? "previousPeriod", p = a?.sentiment ?? "neutral", m = a?.format ?? "percent", h = null, g = -1, _ = "", v = "";
|
|
5134
5285
|
if (f === "target") {
|
|
5135
|
-
if (!
|
|
5286
|
+
if (!hs(a?.target)) return {
|
|
5136
5287
|
...d,
|
|
5137
5288
|
reason: "no-baseline",
|
|
5138
|
-
label:
|
|
5289
|
+
label: ms
|
|
5139
5290
|
};
|
|
5140
5291
|
h = a.target, _ = `vs. target ${o(h, i)}`, v = `Target ${o(h, i)}`;
|
|
5141
5292
|
} else if (f === "series") {
|
|
@@ -5143,16 +5294,16 @@ function bs(e) {
|
|
|
5143
5294
|
if (!t) return {
|
|
5144
5295
|
...d,
|
|
5145
5296
|
reason: "no-baseline",
|
|
5146
|
-
label:
|
|
5297
|
+
label: ms
|
|
5147
5298
|
};
|
|
5148
5299
|
let n = t.data[l];
|
|
5149
|
-
if (
|
|
5300
|
+
if (hs(n)) h = n, g = l;
|
|
5150
5301
|
else {
|
|
5151
|
-
let e =
|
|
5302
|
+
let e = gs(t.data);
|
|
5152
5303
|
if (e.current == null) return {
|
|
5153
5304
|
...d,
|
|
5154
5305
|
reason: "no-baseline",
|
|
5155
|
-
label:
|
|
5306
|
+
label: ms
|
|
5156
5307
|
};
|
|
5157
5308
|
h = e.current, g = e.currentIndex;
|
|
5158
5309
|
}
|
|
@@ -5168,7 +5319,7 @@ function bs(e) {
|
|
|
5168
5319
|
}
|
|
5169
5320
|
let y = s - h, b = y === 0 ? "flat" : y > 0 ? "up" : "down", x;
|
|
5170
5321
|
x = y === 0 ? 0 : h === 0 ? null : y / Math.abs(h) * 100;
|
|
5171
|
-
let S = x == null ? null :
|
|
5322
|
+
let S = x == null ? null : _s(x), C = vs(y, o, i), w;
|
|
5172
5323
|
w = m === "absolute" ? C : m === "both" ? S ? `${S} (${C})` : C : S ?? C;
|
|
5173
5324
|
let T = a?.label ?? _, E = b === "flat" ? `No change ${T}.` : `${b === "up" ? "Up" : b === "down" ? "Down" : "No change"} ${w.replace(/^[+-]/, "")} ${T}.`;
|
|
5174
5325
|
return {
|
|
@@ -5179,7 +5330,7 @@ function bs(e) {
|
|
|
5179
5330
|
delta: y,
|
|
5180
5331
|
pct: x,
|
|
5181
5332
|
direction: b,
|
|
5182
|
-
tone:
|
|
5333
|
+
tone: ys(b, p),
|
|
5183
5334
|
text: w,
|
|
5184
5335
|
label: T,
|
|
5185
5336
|
baselineLabel: v,
|
|
@@ -5189,19 +5340,19 @@ function bs(e) {
|
|
|
5189
5340
|
}
|
|
5190
5341
|
//#endregion
|
|
5191
5342
|
//#region ../core/src/charts/singleValueLayout.ts
|
|
5192
|
-
var
|
|
5343
|
+
var Ss = [
|
|
5193
5344
|
"micro",
|
|
5194
5345
|
"compact",
|
|
5195
5346
|
"standard",
|
|
5196
5347
|
"rich",
|
|
5197
5348
|
"full"
|
|
5198
|
-
],
|
|
5349
|
+
], Cs = {
|
|
5199
5350
|
micro: 0,
|
|
5200
5351
|
compact: 64,
|
|
5201
5352
|
standard: 104,
|
|
5202
5353
|
rich: 160,
|
|
5203
5354
|
full: 224
|
|
5204
|
-
},
|
|
5355
|
+
}, ws = {
|
|
5205
5356
|
micro: {
|
|
5206
5357
|
delta: !1,
|
|
5207
5358
|
context: !1,
|
|
@@ -5232,107 +5383,107 @@ var xs = [
|
|
|
5232
5383
|
sparkline: !0,
|
|
5233
5384
|
baseline: !0
|
|
5234
5385
|
}
|
|
5235
|
-
},
|
|
5386
|
+
}, Ts = {
|
|
5236
5387
|
micro: 1,
|
|
5237
5388
|
compact: 1.25,
|
|
5238
5389
|
standard: 1.6,
|
|
5239
5390
|
rich: 2,
|
|
5240
5391
|
full: 2.4
|
|
5241
|
-
},
|
|
5392
|
+
}, Es = {
|
|
5242
5393
|
micro: 1,
|
|
5243
5394
|
compact: 1,
|
|
5244
5395
|
standard: 1,
|
|
5245
5396
|
rich: 1.25,
|
|
5246
5397
|
full: 1.4
|
|
5247
|
-
},
|
|
5398
|
+
}, Ds = {
|
|
5248
5399
|
micro: 0,
|
|
5249
5400
|
compact: 0,
|
|
5250
5401
|
standard: 0,
|
|
5251
5402
|
rich: 36,
|
|
5252
5403
|
full: 48
|
|
5253
5404
|
};
|
|
5254
|
-
function
|
|
5405
|
+
function Os(e) {
|
|
5255
5406
|
if (!Number.isFinite(e) || e <= 0) return "micro";
|
|
5256
5407
|
let t = "micro";
|
|
5257
|
-
return
|
|
5258
|
-
e >=
|
|
5408
|
+
return Ss.forEach((n) => {
|
|
5409
|
+
e >= Cs[n] && (t = n);
|
|
5259
5410
|
}), t;
|
|
5260
5411
|
}
|
|
5261
|
-
function Os(e, t) {
|
|
5262
|
-
let n = Ds(t);
|
|
5263
|
-
return n === e ? e : xs.indexOf(n) > xs.indexOf(e) ? n : t >= Ss[e] - 12 ? e : n;
|
|
5264
|
-
}
|
|
5265
5412
|
function ks(e, t) {
|
|
5266
|
-
let n =
|
|
5413
|
+
let n = Os(t);
|
|
5414
|
+
return n === e ? e : Ss.indexOf(n) > Ss.indexOf(e) ? n : t >= Cs[e] - 12 ? e : n;
|
|
5415
|
+
}
|
|
5416
|
+
function As(e, t) {
|
|
5417
|
+
let n = ws[e], r = n.delta && t.delta, i = n.context && t.context, a = n.sparkline && t.sparkline, o = n.baseline && t.baseline, s = !r && !i && !a && !o;
|
|
5267
5418
|
return {
|
|
5268
5419
|
tier: e,
|
|
5269
5420
|
showDelta: r,
|
|
5270
5421
|
showContext: i,
|
|
5271
5422
|
showSparkline: a,
|
|
5272
5423
|
showBaseline: o,
|
|
5273
|
-
sparklineHeightPx: a ?
|
|
5274
|
-
heroScale: s ?
|
|
5424
|
+
sparklineHeightPx: a ? Ds[e] : 0,
|
|
5425
|
+
heroScale: s ? Ts[e] : Es[e],
|
|
5275
5426
|
solo: s,
|
|
5276
5427
|
justify: s ? "center" : "flex-start"
|
|
5277
5428
|
};
|
|
5278
5429
|
}
|
|
5279
|
-
function
|
|
5430
|
+
function js(e) {
|
|
5280
5431
|
return !Number.isFinite(e) || e <= 0 ? 0 : Math.floor(e / 8) * 8;
|
|
5281
5432
|
}
|
|
5282
5433
|
//#endregion
|
|
5283
5434
|
//#region ../core/src/charts/types/SingleValue.tsx
|
|
5284
|
-
var
|
|
5285
|
-
function
|
|
5435
|
+
var Ms = (e) => a(e), Ns = "var(--dbn-kpi-font-size, 28px)", Ps = "var(--dbn-kpi-line-height, 32px)";
|
|
5436
|
+
function Fs(e) {
|
|
5286
5437
|
return !Number.isFinite(e) || e === 1 ? {
|
|
5287
|
-
fontSize:
|
|
5288
|
-
lineHeight:
|
|
5438
|
+
fontSize: Ns,
|
|
5439
|
+
lineHeight: Ps,
|
|
5289
5440
|
fontVariantNumeric: "tabular-nums"
|
|
5290
5441
|
} : {
|
|
5291
|
-
fontSize: `calc(${
|
|
5292
|
-
lineHeight: `calc(${
|
|
5442
|
+
fontSize: `calc(${Ns} * ${e})`,
|
|
5443
|
+
lineHeight: `calc(${Ps} * ${e})`,
|
|
5293
5444
|
fontVariantNumeric: "tabular-nums"
|
|
5294
5445
|
};
|
|
5295
5446
|
}
|
|
5296
|
-
var
|
|
5447
|
+
var Is = {
|
|
5297
5448
|
display: "flex",
|
|
5298
5449
|
flexDirection: "column",
|
|
5299
5450
|
height: "100%",
|
|
5300
5451
|
width: "100%",
|
|
5301
5452
|
minWidth: 0,
|
|
5302
5453
|
gap: "var(--dbn-kpi-gap, 8px)"
|
|
5303
|
-
},
|
|
5454
|
+
}, Ls = {
|
|
5304
5455
|
display: "flex",
|
|
5305
5456
|
flexDirection: "column",
|
|
5306
5457
|
minWidth: 0,
|
|
5307
5458
|
gap: "var(--dbn-kpi-stack-gap, 4px)"
|
|
5308
|
-
},
|
|
5459
|
+
}, Rs = {
|
|
5309
5460
|
display: "flex",
|
|
5310
5461
|
flexWrap: "wrap",
|
|
5311
5462
|
alignItems: "baseline",
|
|
5312
5463
|
columnGap: 8,
|
|
5313
5464
|
rowGap: 4,
|
|
5314
5465
|
minWidth: 0
|
|
5315
|
-
},
|
|
5466
|
+
}, zs = {
|
|
5316
5467
|
width: "100%",
|
|
5317
5468
|
flexShrink: 0,
|
|
5318
5469
|
marginTop: "auto",
|
|
5319
5470
|
display: "block"
|
|
5320
|
-
},
|
|
5471
|
+
}, Bs = {
|
|
5321
5472
|
display: "flex",
|
|
5322
5473
|
height: "100%",
|
|
5323
5474
|
minHeight: 40,
|
|
5324
5475
|
alignItems: "center",
|
|
5325
5476
|
justifyContent: "center"
|
|
5326
|
-
},
|
|
5477
|
+
}, Vs = {
|
|
5327
5478
|
fontSize: "var(--dbn-kpi-caption-font-size, 12px)",
|
|
5328
5479
|
lineHeight: "var(--dbn-kpi-caption-line-height, 18px)"
|
|
5329
|
-
}, Vs = {
|
|
5330
|
-
...Bs,
|
|
5331
|
-
fontVariantNumeric: "tabular-nums"
|
|
5332
5480
|
}, Hs = {
|
|
5333
|
-
...
|
|
5334
|
-
|
|
5481
|
+
...Vs,
|
|
5482
|
+
fontVariantNumeric: "tabular-nums"
|
|
5335
5483
|
}, Us = {
|
|
5484
|
+
...Vs,
|
|
5485
|
+
fontWeight: 400
|
|
5486
|
+
}, Ws = {
|
|
5336
5487
|
position: "absolute",
|
|
5337
5488
|
width: 1,
|
|
5338
5489
|
height: 1,
|
|
@@ -5342,29 +5493,29 @@ var Fs = {
|
|
|
5342
5493
|
clipPath: "inset(50%)",
|
|
5343
5494
|
whiteSpace: "nowrap",
|
|
5344
5495
|
border: 0
|
|
5345
|
-
},
|
|
5496
|
+
}, Gs = {
|
|
5346
5497
|
positive: "var(--dbn-kpi-positive-fg, var(--success-fg, #15803d))",
|
|
5347
5498
|
negative: "var(--dbn-kpi-negative-fg, var(--danger-fg, #b91c1c))",
|
|
5348
5499
|
neutral: "var(--dbn-kpi-neutral-fg, var(--text-secondary, #52525b))"
|
|
5349
|
-
},
|
|
5500
|
+
}, Ks = {
|
|
5350
5501
|
positive: "var(--dbn-kpi-positive-bg, var(--success-surface, #f0fdf4))",
|
|
5351
5502
|
negative: "var(--dbn-kpi-negative-bg, var(--danger-surface, #fef2f2))",
|
|
5352
5503
|
neutral: "var(--dbn-kpi-neutral-bg, var(--surface-inset, #f4f4f5))"
|
|
5353
|
-
},
|
|
5504
|
+
}, qs = {
|
|
5354
5505
|
positive: "var(--dbn-kpi-positive-border, var(--success-border, #bbf7d0))",
|
|
5355
5506
|
negative: "var(--dbn-kpi-negative-border, var(--danger-border, #fecaca))",
|
|
5356
5507
|
neutral: "var(--dbn-kpi-neutral-border, var(--border-default, #e4e4e7))"
|
|
5357
5508
|
};
|
|
5358
|
-
function
|
|
5509
|
+
function Js(e) {
|
|
5359
5510
|
return {
|
|
5360
5511
|
display: "inline-flex",
|
|
5361
5512
|
alignItems: "center",
|
|
5362
5513
|
gap: 4,
|
|
5363
5514
|
padding: "1px 7px",
|
|
5364
5515
|
borderRadius: "var(--dbn-kpi-chip-radius, 999px)",
|
|
5365
|
-
border: `1px solid ${
|
|
5366
|
-
backgroundColor:
|
|
5367
|
-
color:
|
|
5516
|
+
border: `1px solid ${qs[e]}`,
|
|
5517
|
+
backgroundColor: Ks[e],
|
|
5518
|
+
color: Gs[e],
|
|
5368
5519
|
fontSize: "var(--dbn-kpi-delta-font-size, 12px)",
|
|
5369
5520
|
lineHeight: "var(--dbn-kpi-delta-line-height, 18px)",
|
|
5370
5521
|
fontWeight: 600,
|
|
@@ -5372,7 +5523,7 @@ function qs(e) {
|
|
|
5372
5523
|
whiteSpace: "nowrap"
|
|
5373
5524
|
};
|
|
5374
5525
|
}
|
|
5375
|
-
var
|
|
5526
|
+
var Ys = {
|
|
5376
5527
|
fontSize: "var(--dbn-kpi-context-font-size, 12px)",
|
|
5377
5528
|
lineHeight: "var(--dbn-kpi-context-line-height, 16px)",
|
|
5378
5529
|
color: "var(--text-secondary, #52525b)",
|
|
@@ -5380,25 +5531,25 @@ var Js = {
|
|
|
5380
5531
|
overflow: "hidden",
|
|
5381
5532
|
textOverflow: "ellipsis",
|
|
5382
5533
|
whiteSpace: "nowrap"
|
|
5383
|
-
},
|
|
5384
|
-
...
|
|
5534
|
+
}, Xs = {
|
|
5535
|
+
...Ys,
|
|
5385
5536
|
fontSize: "var(--dbn-kpi-baseline-font-size, 11px)",
|
|
5386
5537
|
color: "var(--text-muted, #686871)",
|
|
5387
5538
|
fontVariantNumeric: "tabular-nums"
|
|
5388
|
-
},
|
|
5539
|
+
}, Zs = {
|
|
5389
5540
|
up: "▲",
|
|
5390
5541
|
down: "▼",
|
|
5391
5542
|
flat: "▬"
|
|
5392
|
-
},
|
|
5543
|
+
}, Qs = {
|
|
5393
5544
|
up: "Up",
|
|
5394
5545
|
down: "Down",
|
|
5395
5546
|
flat: "Flat"
|
|
5396
|
-
},
|
|
5547
|
+
}, $s = {
|
|
5397
5548
|
good: "positive",
|
|
5398
5549
|
bad: "negative",
|
|
5399
5550
|
neutral: "neutral"
|
|
5400
5551
|
};
|
|
5401
|
-
function
|
|
5552
|
+
function ec(e) {
|
|
5402
5553
|
if (e.length < 2) return "";
|
|
5403
5554
|
if (e.length === 2) return `M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;
|
|
5404
5555
|
let t = .25, n = `M ${e[0].x} ${e[0].y}`;
|
|
@@ -5408,8 +5559,8 @@ function $s(e) {
|
|
|
5408
5559
|
}
|
|
5409
5560
|
return n;
|
|
5410
5561
|
}
|
|
5411
|
-
function
|
|
5412
|
-
let a = e.filter(
|
|
5562
|
+
function tc(e, t = 100, n = 32, r = 3, i = null) {
|
|
5563
|
+
let a = e.filter(hs), o = {
|
|
5413
5564
|
lines: [],
|
|
5414
5565
|
areas: [],
|
|
5415
5566
|
currentX: null,
|
|
@@ -5417,9 +5568,9 @@ function ec(e, t = 100, n = 32, r = 3, i = null) {
|
|
|
5417
5568
|
referenceY: null
|
|
5418
5569
|
};
|
|
5419
5570
|
if (a.length < 2) return o;
|
|
5420
|
-
let s =
|
|
5571
|
+
let s = hs(i) ? [...a, i] : a, c = Math.min(...s), l = Math.max(...s) - c || 1, u = e.length, d = u > 1 ? t / (u - 1) : t, f = (e) => n - r - (e - c) / l * (n - r * 2), p = [], m = [], h = null, g = null;
|
|
5421
5572
|
e.forEach((e, t) => {
|
|
5422
|
-
if (!
|
|
5573
|
+
if (!hs(e)) {
|
|
5423
5574
|
m.length && p.push(m), m = [];
|
|
5424
5575
|
return;
|
|
5425
5576
|
}
|
|
@@ -5431,18 +5582,18 @@ function ec(e, t = 100, n = 32, r = 3, i = null) {
|
|
|
5431
5582
|
}), m.length && p.push(m);
|
|
5432
5583
|
let _ = p.filter((e) => e.length > 1);
|
|
5433
5584
|
return {
|
|
5434
|
-
lines: _.map(
|
|
5585
|
+
lines: _.map(ec),
|
|
5435
5586
|
areas: _.map((e) => {
|
|
5436
5587
|
let t = e[0], r = e[e.length - 1];
|
|
5437
|
-
return `${
|
|
5588
|
+
return `${ec(e)} L ${r.x} ${n} L ${t.x} ${n} Z`;
|
|
5438
5589
|
}),
|
|
5439
5590
|
currentX: h,
|
|
5440
5591
|
currentY: g,
|
|
5441
|
-
referenceY:
|
|
5592
|
+
referenceY: hs(i) ? f(i) : null
|
|
5442
5593
|
};
|
|
5443
5594
|
}
|
|
5444
|
-
var
|
|
5445
|
-
function
|
|
5595
|
+
var nc = 8, rc = .5, ic = .01, ac = 6;
|
|
5596
|
+
function oc(e, t, n) {
|
|
5446
5597
|
let [r, i] = q(1), a = K(1), o = K(0), s = K(""), c = K(-1);
|
|
5447
5598
|
return Fe(() => {
|
|
5448
5599
|
let r = e.current;
|
|
@@ -5451,9 +5602,9 @@ function ac(e, t, n) {
|
|
|
5451
5602
|
s.current !== l && (s.current = l, a.current = 1, o.current = 0, c.current = -1);
|
|
5452
5603
|
let u = () => {
|
|
5453
5604
|
let e = r.clientWidth, t = r.scrollWidth, n = a.current;
|
|
5454
|
-
if (e <= 0 || t <= 0 || n <= 0 || (e !== c.current && (o.current = 0), o.current >=
|
|
5455
|
-
let s = t / n, l = Math.min(1, Math.max(
|
|
5456
|
-
Math.abs(l - n) <
|
|
5605
|
+
if (e <= 0 || t <= 0 || n <= 0 || (e !== c.current && (o.current = 0), o.current >= ac)) return;
|
|
5606
|
+
let s = t / n, l = Math.min(1, Math.max(rc, e / s));
|
|
5607
|
+
Math.abs(l - n) < ic || (a.current = l, c.current = e, o.current += 1, i(l));
|
|
5457
5608
|
};
|
|
5458
5609
|
if (typeof ResizeObserver != "function") {
|
|
5459
5610
|
u();
|
|
@@ -5469,15 +5620,15 @@ function ac(e, t, n) {
|
|
|
5469
5620
|
n
|
|
5470
5621
|
]), r;
|
|
5471
5622
|
}
|
|
5472
|
-
function
|
|
5623
|
+
function sc(e, t) {
|
|
5473
5624
|
let n = !!(t && t !== "auto"), [r, i] = q("micro"), [a, o] = q(n), s = K("micro"), c = K(0);
|
|
5474
5625
|
return Fe(() => {
|
|
5475
5626
|
if (t && t !== "auto") return;
|
|
5476
5627
|
let n = e.current;
|
|
5477
5628
|
if (!n) return;
|
|
5478
5629
|
let r = (e) => {
|
|
5479
|
-
if (o(!0), c.current >=
|
|
5480
|
-
let t =
|
|
5630
|
+
if (o(!0), c.current >= nc) return;
|
|
5631
|
+
let t = ks(s.current, js(e));
|
|
5481
5632
|
t !== s.current && (s.current = t, c.current += 1, i(t));
|
|
5482
5633
|
};
|
|
5483
5634
|
if (typeof ResizeObserver != "function") {
|
|
@@ -5494,11 +5645,11 @@ function oc(e, t) {
|
|
|
5494
5645
|
measured: a
|
|
5495
5646
|
};
|
|
5496
5647
|
}
|
|
5497
|
-
var
|
|
5648
|
+
var cc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatter: i, className: a, ariaLabel: o, onDataPointClick: s, onEvents: c }) => {
|
|
5498
5649
|
let l = K(null), u = Pe();
|
|
5499
|
-
|
|
5650
|
+
Ma(l);
|
|
5500
5651
|
let [d, f] = q(0);
|
|
5501
|
-
W(() => f((e) => e + 1), []), W(() =>
|
|
5652
|
+
W(() => f((e) => e + 1), []), W(() => yi(() => f((e) => e + 1), l.current), []);
|
|
5502
5653
|
let p = br(_r(t, n, r), {
|
|
5503
5654
|
appearance: t,
|
|
5504
5655
|
adminTheme: n,
|
|
@@ -5510,11 +5661,11 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5510
5661
|
l,
|
|
5511
5662
|
p,
|
|
5512
5663
|
d
|
|
5513
|
-
]), h = t?.chartKpi, { tier: g, measured: _ } =
|
|
5664
|
+
]), h = t?.chartKpi, { tier: g, measured: _ } = sc(l, h?.layout), v = e.series[0], y = G(() => v?.data ?? [], [v]), b = i ?? Ms, x = G(() => fs(t?.chartFieldFormats?.[v?.name ?? ""], b), [
|
|
5514
5665
|
t?.chartFieldFormats,
|
|
5515
5666
|
v?.name,
|
|
5516
5667
|
b
|
|
5517
|
-
]), S = G(() =>
|
|
5668
|
+
]), S = G(() => xs({
|
|
5518
5669
|
values: y,
|
|
5519
5670
|
categories: e.categories,
|
|
5520
5671
|
series: e.series,
|
|
@@ -5532,31 +5683,31 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5532
5683
|
let t = {};
|
|
5533
5684
|
for (let n of e.series) t[n.name] = n.data;
|
|
5534
5685
|
return t;
|
|
5535
|
-
}, [e.series]), T = G(() => C ?
|
|
5686
|
+
}, [e.series]), T = G(() => C ? is({
|
|
5536
5687
|
values: y,
|
|
5537
5688
|
fields: w
|
|
5538
5689
|
}, C) : null, [
|
|
5539
5690
|
y,
|
|
5540
5691
|
w,
|
|
5541
5692
|
C
|
|
5542
|
-
]), E = G(() => T ?
|
|
5693
|
+
]), E = G(() => T ? ps(T, b, v?.name) : null, [
|
|
5543
5694
|
T,
|
|
5544
5695
|
b,
|
|
5545
5696
|
v?.name
|
|
5546
|
-
]), { current: D, currentIndex: O } = S, ee = D == null, k = T != null, A = k ? E : S.reason === "ok" ? S.text : null, j = k ? T.available ?
|
|
5547
|
-
delta: A != null ||
|
|
5697
|
+
]), { current: D, currentIndex: O } = S, ee = D == null, k = T != null, A = k ? E : S.reason === "ok" ? S.text : null, j = k ? T.available ? $s[T.sentiment] : "neutral" : S.tone, M = k ? T.available ? T.direction : "flat" : S.direction, N = k && T.available ? T.label : null, P = k && !T.available && T.kind !== "none", te = k ? A == null ? null : `${Qs[M]} ${A}${N ? ` ${N}` : ""}` : S.announcement, ne = k ? T.available && T.kind === "target" ? T.baseline : null : h?.comparison?.mode === "target" && S.reason === "ok" ? S.baseline : null, F = G(() => tc(y, 100, 32, 3, ne), [y, ne]), re = h?.sparkline !== !1, I = G(() => As(g, {
|
|
5698
|
+
delta: A != null || P,
|
|
5548
5699
|
context: !k && !!S.label,
|
|
5549
|
-
sparkline:
|
|
5700
|
+
sparkline: re && F.lines.length > 0,
|
|
5550
5701
|
baseline: !k && S.reason === "ok" && !!S.baselineLabel
|
|
5551
5702
|
}), [
|
|
5552
5703
|
g,
|
|
5553
5704
|
S,
|
|
5554
|
-
|
|
5555
|
-
|
|
5705
|
+
F.lines.length,
|
|
5706
|
+
re,
|
|
5556
5707
|
A,
|
|
5557
|
-
|
|
5708
|
+
P,
|
|
5558
5709
|
k
|
|
5559
|
-
]),
|
|
5710
|
+
]), ie = x(D, v?.name), ae = K(null), oe = oc(ae, ie, I.heroScale), L = m.palette[0] ?? "#6366f1", se = typeof c?.click == "function" ? c.click : void 0, ce = typeof c?.contextmenu == "function" ? c.contextmenu : void 0, R = !!(s || se || ce) && !ee, z = O >= 0 ? e.categories[O] ?? "" : "", le = () => {
|
|
5560
5711
|
if (D != null) {
|
|
5561
5712
|
if (s) {
|
|
5562
5713
|
s({
|
|
@@ -5566,14 +5717,14 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5566
5717
|
});
|
|
5567
5718
|
return;
|
|
5568
5719
|
}
|
|
5569
|
-
(
|
|
5720
|
+
(se ?? ce)?.({
|
|
5570
5721
|
seriesName: v?.name ?? "",
|
|
5571
5722
|
name: z,
|
|
5572
5723
|
value: D
|
|
5573
5724
|
});
|
|
5574
5725
|
}
|
|
5575
5726
|
}, ue = K(null);
|
|
5576
|
-
ue.current = () => !
|
|
5727
|
+
ue.current = () => !ce || ee || D == null ? !1 : (ce({
|
|
5577
5728
|
seriesName: v?.name ?? "",
|
|
5578
5729
|
name: z,
|
|
5579
5730
|
value: D
|
|
@@ -5587,29 +5738,29 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5587
5738
|
}, []);
|
|
5588
5739
|
let de = (e) => {
|
|
5589
5740
|
R && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), le());
|
|
5590
|
-
}, fe =
|
|
5741
|
+
}, fe = I.sparklineHeightPx || 36;
|
|
5591
5742
|
return /* @__PURE__ */ J("div", {
|
|
5592
5743
|
ref: l,
|
|
5593
5744
|
className: V("dbn-chart flex h-full w-full flex-col gap-2 rounded-lg p-1", R && "cursor-pointer", !_ && "invisible", a),
|
|
5594
5745
|
style: {
|
|
5595
|
-
...
|
|
5596
|
-
justifyContent:
|
|
5597
|
-
alignItems:
|
|
5746
|
+
...Is,
|
|
5747
|
+
justifyContent: I.justify,
|
|
5748
|
+
alignItems: I.solo ? "center" : "stretch",
|
|
5598
5749
|
fontFamily: m.text.fontFamily
|
|
5599
5750
|
},
|
|
5600
5751
|
role: R ? "button" : "group",
|
|
5601
5752
|
tabIndex: R ? 0 : void 0,
|
|
5602
5753
|
"aria-label": o ?? v?.name,
|
|
5603
|
-
"data-kpi-tier":
|
|
5604
|
-
"data-kpi-solo":
|
|
5754
|
+
"data-kpi-tier": I.tier,
|
|
5755
|
+
"data-kpi-solo": I.solo ? "true" : "false",
|
|
5605
5756
|
onClick: R ? le : void 0,
|
|
5606
5757
|
onKeyDown: R ? de : void 0,
|
|
5607
5758
|
children: ee ? /* @__PURE__ */ J("div", {
|
|
5608
5759
|
"data-slot": "kpi-empty",
|
|
5609
5760
|
className: "flex h-full min-h-10 items-center justify-center text-body-sm text-text-secondary",
|
|
5610
5761
|
style: {
|
|
5611
|
-
...
|
|
5612
|
-
...
|
|
5762
|
+
...Bs,
|
|
5763
|
+
...Vs
|
|
5613
5764
|
},
|
|
5614
5765
|
children: /* @__PURE__ */ J(De, {
|
|
5615
5766
|
state: "empty",
|
|
@@ -5617,26 +5768,26 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5617
5768
|
})
|
|
5618
5769
|
}) : /* @__PURE__ */ Y(Le, { children: [/* @__PURE__ */ Y("div", {
|
|
5619
5770
|
className: "flex min-w-0 flex-col gap-1",
|
|
5620
|
-
style:
|
|
5771
|
+
style: Ls,
|
|
5621
5772
|
children: [
|
|
5622
5773
|
/* @__PURE__ */ Y("div", {
|
|
5623
5774
|
"data-slot": "kpi-headline",
|
|
5624
5775
|
className: "flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1",
|
|
5625
|
-
style:
|
|
5776
|
+
style: Rs,
|
|
5626
5777
|
children: [/* @__PURE__ */ J("span", {
|
|
5627
|
-
ref:
|
|
5778
|
+
ref: ae,
|
|
5628
5779
|
className: "text-kpi font-semibold tracking-tight text-text-primary tabular-nums",
|
|
5629
5780
|
style: {
|
|
5630
|
-
...
|
|
5781
|
+
...Fs(I.heroScale * oe),
|
|
5631
5782
|
minWidth: 0,
|
|
5632
5783
|
whiteSpace: "nowrap",
|
|
5633
5784
|
overflow: "hidden"
|
|
5634
5785
|
},
|
|
5635
5786
|
"data-testid": "dbn-kpi-value",
|
|
5636
|
-
children:
|
|
5637
|
-
}),
|
|
5787
|
+
children: ie
|
|
5788
|
+
}), I.showDelta && A != null ? /* @__PURE__ */ Y("span", {
|
|
5638
5789
|
className: "inline-flex items-center gap-1 font-medium",
|
|
5639
|
-
style:
|
|
5790
|
+
style: Js(j),
|
|
5640
5791
|
"data-slot": "kpi-delta",
|
|
5641
5792
|
"data-testid": "dbn-kpi-delta",
|
|
5642
5793
|
"data-kpi-tone": j,
|
|
@@ -5644,49 +5795,49 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5644
5795
|
children: [
|
|
5645
5796
|
/* @__PURE__ */ J("span", {
|
|
5646
5797
|
"aria-hidden": "true",
|
|
5647
|
-
children:
|
|
5798
|
+
children: Zs[M]
|
|
5648
5799
|
}),
|
|
5649
5800
|
/* @__PURE__ */ J("span", {
|
|
5650
5801
|
"aria-hidden": "true",
|
|
5651
5802
|
className: "text-body-sm tabular-nums",
|
|
5652
|
-
style:
|
|
5803
|
+
style: Hs,
|
|
5653
5804
|
children: A
|
|
5654
5805
|
}),
|
|
5655
5806
|
N ? /* @__PURE__ */ J("span", {
|
|
5656
5807
|
"aria-hidden": "true",
|
|
5657
5808
|
"data-slot": "kpi-comparison-label",
|
|
5658
5809
|
className: "text-body-sm font-normal text-text-tertiary",
|
|
5659
|
-
style:
|
|
5810
|
+
style: Us,
|
|
5660
5811
|
children: N
|
|
5661
5812
|
}) : null,
|
|
5662
5813
|
/* @__PURE__ */ J("span", {
|
|
5663
|
-
style:
|
|
5664
|
-
children:
|
|
5814
|
+
style: Ws,
|
|
5815
|
+
children: te
|
|
5665
5816
|
})
|
|
5666
5817
|
]
|
|
5667
|
-
}) :
|
|
5818
|
+
}) : I.showDelta && P ? /* @__PURE__ */ J("span", {
|
|
5668
5819
|
"data-slot": "kpi-no-comparison",
|
|
5669
5820
|
"data-testid": "dbn-kpi-no-comparison",
|
|
5670
5821
|
className: "text-body-sm text-text-tertiary",
|
|
5671
|
-
style:
|
|
5822
|
+
style: Vs,
|
|
5672
5823
|
children: "No comparison available"
|
|
5673
5824
|
}) : null]
|
|
5674
5825
|
}),
|
|
5675
|
-
|
|
5676
|
-
style:
|
|
5826
|
+
I.showContext && S.label ? /* @__PURE__ */ J("div", {
|
|
5827
|
+
style: Ys,
|
|
5677
5828
|
"data-testid": "dbn-kpi-context",
|
|
5678
5829
|
children: S.label
|
|
5679
5830
|
}) : null,
|
|
5680
|
-
|
|
5681
|
-
style:
|
|
5831
|
+
I.showBaseline && S.baselineLabel ? /* @__PURE__ */ J("div", {
|
|
5832
|
+
style: Xs,
|
|
5682
5833
|
"data-testid": "dbn-kpi-baseline",
|
|
5683
5834
|
children: S.baselineLabel
|
|
5684
5835
|
}) : null
|
|
5685
5836
|
]
|
|
5686
|
-
}),
|
|
5837
|
+
}), I.showSparkline ? /* @__PURE__ */ Y("svg", {
|
|
5687
5838
|
className: "w-full shrink-0",
|
|
5688
5839
|
style: {
|
|
5689
|
-
...
|
|
5840
|
+
...zs,
|
|
5690
5841
|
height: `var(--dbn-kpi-sparkline-height, ${fe}px)`
|
|
5691
5842
|
},
|
|
5692
5843
|
viewBox: "0 0 100 32",
|
|
@@ -5704,49 +5855,49 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5704
5855
|
children: [/* @__PURE__ */ J("stop", {
|
|
5705
5856
|
offset: "0%",
|
|
5706
5857
|
style: {
|
|
5707
|
-
stopColor:
|
|
5858
|
+
stopColor: L,
|
|
5708
5859
|
stopOpacity: .28
|
|
5709
5860
|
}
|
|
5710
5861
|
}), /* @__PURE__ */ J("stop", {
|
|
5711
5862
|
offset: "100%",
|
|
5712
5863
|
style: {
|
|
5713
|
-
stopColor:
|
|
5864
|
+
stopColor: L,
|
|
5714
5865
|
stopOpacity: 0
|
|
5715
5866
|
}
|
|
5716
5867
|
})]
|
|
5717
5868
|
}) }),
|
|
5718
|
-
|
|
5869
|
+
F.areas.map((e) => /* @__PURE__ */ J("path", {
|
|
5719
5870
|
d: e,
|
|
5720
5871
|
fill: `url(#dbn-spark-${u})`,
|
|
5721
5872
|
stroke: "none"
|
|
5722
5873
|
}, `area-${e}`)),
|
|
5723
|
-
|
|
5874
|
+
F.referenceY == null ? null : /* @__PURE__ */ J("line", {
|
|
5724
5875
|
x1: "0",
|
|
5725
5876
|
x2: "100",
|
|
5726
|
-
y1:
|
|
5727
|
-
y2:
|
|
5877
|
+
y1: F.referenceY,
|
|
5878
|
+
y2: F.referenceY,
|
|
5728
5879
|
style: { stroke: "var(--text-muted, #686871)" },
|
|
5729
5880
|
strokeWidth: 1,
|
|
5730
5881
|
strokeDasharray: "3 3",
|
|
5731
5882
|
vectorEffect: "non-scaling-stroke",
|
|
5732
5883
|
"data-testid": "dbn-kpi-target-line"
|
|
5733
5884
|
}),
|
|
5734
|
-
|
|
5885
|
+
F.lines.map((e) => /* @__PURE__ */ J("path", {
|
|
5735
5886
|
d: e,
|
|
5736
5887
|
fill: "none",
|
|
5737
|
-
style: { stroke:
|
|
5888
|
+
style: { stroke: L },
|
|
5738
5889
|
strokeWidth: 1.75,
|
|
5739
5890
|
strokeLinecap: "round",
|
|
5740
5891
|
strokeLinejoin: "round",
|
|
5741
5892
|
vectorEffect: "non-scaling-stroke"
|
|
5742
5893
|
}, `line-${e}`)),
|
|
5743
|
-
|
|
5744
|
-
x1:
|
|
5745
|
-
x2:
|
|
5746
|
-
y1:
|
|
5894
|
+
F.currentX != null && F.currentY != null ? /* @__PURE__ */ J("line", {
|
|
5895
|
+
x1: F.currentX,
|
|
5896
|
+
x2: F.currentX,
|
|
5897
|
+
y1: F.currentY,
|
|
5747
5898
|
y2: 32,
|
|
5748
5899
|
style: {
|
|
5749
|
-
stroke:
|
|
5900
|
+
stroke: L,
|
|
5750
5901
|
opacity: .55
|
|
5751
5902
|
},
|
|
5752
5903
|
strokeWidth: 1.5,
|
|
@@ -5759,7 +5910,7 @@ var sc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, valueFormatte
|
|
|
5759
5910
|
};
|
|
5760
5911
|
//#endregion
|
|
5761
5912
|
//#region ../core/src/charts/types/TreemapChart.tsx
|
|
5762
|
-
function
|
|
5913
|
+
function lc(e, t) {
|
|
5763
5914
|
let n = 0;
|
|
5764
5915
|
for (let r of e.series) {
|
|
5765
5916
|
let e = r.data[t];
|
|
@@ -5767,29 +5918,29 @@ function cc(e, t) {
|
|
|
5767
5918
|
}
|
|
5768
5919
|
return n;
|
|
5769
5920
|
}
|
|
5770
|
-
function
|
|
5921
|
+
function uc(e, t) {
|
|
5771
5922
|
return typeof e == "number" && Number.isFinite(e) ? e : t;
|
|
5772
5923
|
}
|
|
5773
|
-
var
|
|
5774
|
-
function
|
|
5924
|
+
var dc = 1600, fc = 4e3;
|
|
5925
|
+
function pc(e, t, n) {
|
|
5775
5926
|
if (!Number.isFinite(e) || e <= 0) return "none";
|
|
5776
5927
|
if (!(n > 0) || !(t > 0)) return "name+value";
|
|
5777
5928
|
let r = e / t * n;
|
|
5778
|
-
return r <
|
|
5929
|
+
return r < dc ? "none" : r < fc ? "name" : "name+value";
|
|
5779
5930
|
}
|
|
5780
|
-
function
|
|
5931
|
+
function mc({ data: e, appearance: t, valueFormatter: n }, r, i) {
|
|
5781
5932
|
let a = d(t, {
|
|
5782
5933
|
columns: e.series.map((e) => e.name),
|
|
5783
5934
|
fallback: n
|
|
5784
|
-
}), o = M(a), s = D(t?.chartMargin), c =
|
|
5935
|
+
}), o = M(a), s = D(t?.chartMargin), c = uc(s.top, 24), l = uc(s.left, 12), u = uc(s.right, 12), f = uc(s.bottom, 8), p = t?.chartLabel?.position === "hidden", m = {
|
|
5785
5936
|
...N(r, { position: "inside" }, "inside"),
|
|
5786
5937
|
distance: 0,
|
|
5787
5938
|
overflow: "truncate",
|
|
5788
5939
|
ellipsis: "...",
|
|
5789
5940
|
lineHeight: Math.round(r.text.fontSize * 1.35),
|
|
5790
5941
|
padding: 4
|
|
5791
|
-
}, h = Math.max(0, i.width - l - u) * Math.max(0, i.height - c - f), g = e.categories.map((t, n) =>
|
|
5792
|
-
let n = r.palette[t % r.palette.length], i = p ? "none" :
|
|
5942
|
+
}, h = Math.max(0, i.width - l - u) * Math.max(0, i.height - c - f), g = e.categories.map((t, n) => lc(e, n)), _ = g.reduce((e, t) => e + (t > 0 ? t : 0), 0), v = e.categories.map((e, t) => {
|
|
5943
|
+
let n = r.palette[t % r.palette.length], i = p ? "none" : pc(g[t], _, h);
|
|
5793
5944
|
return {
|
|
5794
5945
|
name: String(e),
|
|
5795
5946
|
value: g[t],
|
|
@@ -5834,7 +5985,7 @@ function pc({ data: e, appearance: t, valueFormatter: n }, r, i) {
|
|
|
5834
5985
|
}]
|
|
5835
5986
|
};
|
|
5836
5987
|
}
|
|
5837
|
-
var
|
|
5988
|
+
var hc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: f }) => {
|
|
5838
5989
|
let p = G(() => d(t, {
|
|
5839
5990
|
columns: e.series.map((e) => e.name),
|
|
5840
5991
|
fallback: o
|
|
@@ -5842,7 +5993,7 @@ var mc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
5842
5993
|
t,
|
|
5843
5994
|
e.series,
|
|
5844
5995
|
o
|
|
5845
|
-
]), m = U((n, r) =>
|
|
5996
|
+
]), m = U((n, r) => mc({
|
|
5846
5997
|
data: e,
|
|
5847
5998
|
appearance: t,
|
|
5848
5999
|
valueFormatter: p
|
|
@@ -5870,7 +6021,7 @@ var mc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
5870
6021
|
};
|
|
5871
6022
|
//#endregion
|
|
5872
6023
|
//#region ../core/src/charts/types/WaterfallChart.tsx
|
|
5873
|
-
function
|
|
6024
|
+
function gc(e, t = "levels") {
|
|
5874
6025
|
if (t === "deltas") return [...e];
|
|
5875
6026
|
let n = 0;
|
|
5876
6027
|
return e.map((e) => {
|
|
@@ -5879,9 +6030,9 @@ function hc(e, t = "levels") {
|
|
|
5879
6030
|
return n = e, t;
|
|
5880
6031
|
});
|
|
5881
6032
|
}
|
|
5882
|
-
function
|
|
6033
|
+
function _c(e, t = "levels") {
|
|
5883
6034
|
let n = 0;
|
|
5884
|
-
return
|
|
6035
|
+
return gc(e, t).map((e) => {
|
|
5885
6036
|
if (e == null || !Number.isFinite(e)) return {
|
|
5886
6037
|
placeholder: null,
|
|
5887
6038
|
increase: null,
|
|
@@ -5905,9 +6056,9 @@ function gc(e, t = "levels") {
|
|
|
5905
6056
|
};
|
|
5906
6057
|
});
|
|
5907
6058
|
}
|
|
5908
|
-
var
|
|
6059
|
+
var vc = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i, family: a, valueFormatter: o, className: s, ariaLabel: c, answerLine: l, onDataPointClick: u, onEvents: d }) => {
|
|
5909
6060
|
let f = U((n, r) => {
|
|
5910
|
-
let i = o ?? ((e) => E(e)), a =
|
|
6061
|
+
let i = o ?? ((e) => E(e)), a = _c(e.series[0]?.data ?? [], t?.chartWaterfall?.isUseAsDifference === !0 ? "deltas" : "levels"), s = e.series[0]?.color ?? n.palette[0], c = n.palette[1 % n.palette.length], l = t?.chartLabel?.position, u = l === "hidden", d = u ? { show: !1 } : N(n, { position: l ?? "top" }, "top"), f = !u && ce(l), p = (e) => f ? { color: fe(e, { backdrop: n.tooltip.bg }) } : {}, m = (e) => T(e, n, { seriesCount: 2 }), h = n.axisLine, g = {
|
|
5911
6062
|
type: "custom",
|
|
5912
6063
|
name: "__dbn_waterfall_connector__",
|
|
5913
6064
|
silent: !0,
|
|
@@ -5917,7 +6068,7 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
5917
6068
|
renderItem: (e, t) => {
|
|
5918
6069
|
let n = e.dataIndex, r = t.value(1), i = a[n + 1];
|
|
5919
6070
|
if (n >= a.length - 1 || r == null || !Number.isFinite(r) || i?.total == null) return;
|
|
5920
|
-
let o = t.coord([n, r]), s = t.coord([n + 1, r]), c = t.size([1, 0])[0], l = Math.min(72, c *
|
|
6071
|
+
let o = t.coord([n, r]), s = t.coord([n + 1, r]), c = t.size([1, 0])[0], l = Math.min(72, c * ie) / 2, u = o[0] + l, d = s[0] - l;
|
|
5921
6072
|
if (d > u) return {
|
|
5922
6073
|
type: "line",
|
|
5923
6074
|
shape: {
|
|
@@ -5958,14 +6109,14 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
5958
6109
|
}
|
|
5959
6110
|
},
|
|
5960
6111
|
xAxis: {
|
|
5961
|
-
...
|
|
6112
|
+
...I(n, t?.horizontalAxis, "category", void 0, {
|
|
5962
6113
|
categories: e.categories,
|
|
5963
6114
|
orientation: "bottom",
|
|
5964
6115
|
layout: r
|
|
5965
6116
|
}),
|
|
5966
6117
|
data: e.categories
|
|
5967
6118
|
},
|
|
5968
|
-
yAxis:
|
|
6119
|
+
yAxis: I(n, t?.verticalAxis, "value", o),
|
|
5969
6120
|
series: [
|
|
5970
6121
|
g,
|
|
5971
6122
|
{
|
|
@@ -6049,11 +6200,11 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
6049
6200
|
onDataPointClick: u,
|
|
6050
6201
|
onEvents: d
|
|
6051
6202
|
});
|
|
6052
|
-
},
|
|
6203
|
+
}, yc = (e) => {
|
|
6053
6204
|
let { type: t } = e;
|
|
6054
|
-
if (
|
|
6205
|
+
if (wr(t)) return /* @__PURE__ */ J(me.Provider, {
|
|
6055
6206
|
value: e,
|
|
6056
|
-
children: /* @__PURE__ */ J(
|
|
6207
|
+
children: /* @__PURE__ */ J(Qi, {
|
|
6057
6208
|
...e,
|
|
6058
6209
|
type: t
|
|
6059
6210
|
})
|
|
@@ -6062,74 +6213,76 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
6062
6213
|
switch (t) {
|
|
6063
6214
|
case "line":
|
|
6064
6215
|
case "stepped":
|
|
6065
|
-
n =
|
|
6216
|
+
n = ea;
|
|
6066
6217
|
break;
|
|
6067
6218
|
case "area":
|
|
6068
6219
|
case "stackedArea":
|
|
6069
|
-
n =
|
|
6220
|
+
n = ra;
|
|
6070
6221
|
break;
|
|
6071
6222
|
case "bar":
|
|
6072
6223
|
case "stack":
|
|
6073
6224
|
case "row":
|
|
6074
6225
|
case "horizontalStack":
|
|
6075
|
-
n =
|
|
6226
|
+
n = ua;
|
|
6076
6227
|
break;
|
|
6077
6228
|
case "combo":
|
|
6078
6229
|
case "bullet":
|
|
6079
|
-
n =
|
|
6230
|
+
n = ba;
|
|
6080
6231
|
break;
|
|
6081
6232
|
case "pie":
|
|
6082
6233
|
case "doughnut":
|
|
6234
|
+
n = jo;
|
|
6235
|
+
break;
|
|
6083
6236
|
case "rose":
|
|
6084
|
-
n =
|
|
6237
|
+
n = jo;
|
|
6085
6238
|
break;
|
|
6086
6239
|
case "radial":
|
|
6087
|
-
n =
|
|
6240
|
+
n = Bo;
|
|
6088
6241
|
break;
|
|
6089
6242
|
case "radar":
|
|
6090
|
-
n =
|
|
6243
|
+
n = zo;
|
|
6091
6244
|
break;
|
|
6092
6245
|
case "scatter":
|
|
6093
|
-
n =
|
|
6246
|
+
n = Yo;
|
|
6094
6247
|
break;
|
|
6095
6248
|
case "bubble":
|
|
6096
|
-
n =
|
|
6249
|
+
n = ha;
|
|
6097
6250
|
break;
|
|
6098
6251
|
case "sankey":
|
|
6099
|
-
n =
|
|
6252
|
+
n = qo;
|
|
6100
6253
|
break;
|
|
6101
6254
|
case "network":
|
|
6102
|
-
n =
|
|
6255
|
+
n = To;
|
|
6103
6256
|
break;
|
|
6104
6257
|
case "gaugeV2":
|
|
6105
|
-
n =
|
|
6258
|
+
n = ro;
|
|
6106
6259
|
break;
|
|
6107
6260
|
case "linearGauge":
|
|
6108
|
-
n =
|
|
6261
|
+
n = _o;
|
|
6109
6262
|
break;
|
|
6110
6263
|
case "linearGaugeV2":
|
|
6111
|
-
n =
|
|
6264
|
+
n = yo;
|
|
6112
6265
|
break;
|
|
6113
6266
|
case "funnelV2":
|
|
6114
|
-
n =
|
|
6267
|
+
n = to;
|
|
6115
6268
|
break;
|
|
6116
6269
|
case "treeMap":
|
|
6117
|
-
n =
|
|
6270
|
+
n = hc;
|
|
6118
6271
|
break;
|
|
6119
6272
|
case "waterfall":
|
|
6120
|
-
n =
|
|
6273
|
+
n = vc;
|
|
6121
6274
|
break;
|
|
6122
6275
|
case "progressBarV2":
|
|
6123
|
-
n =
|
|
6276
|
+
n = Io;
|
|
6124
6277
|
break;
|
|
6125
6278
|
case "singleValue":
|
|
6126
|
-
n =
|
|
6279
|
+
n = cc;
|
|
6127
6280
|
break;
|
|
6128
6281
|
case "table":
|
|
6129
|
-
n =
|
|
6282
|
+
n = $a;
|
|
6130
6283
|
break;
|
|
6131
6284
|
case "pivotV2":
|
|
6132
|
-
n =
|
|
6285
|
+
n = No;
|
|
6133
6286
|
break;
|
|
6134
6287
|
default: return null;
|
|
6135
6288
|
}
|
|
@@ -6137,7 +6290,7 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
6137
6290
|
value: e,
|
|
6138
6291
|
children: /* @__PURE__ */ J(n, { ...e })
|
|
6139
6292
|
});
|
|
6140
|
-
},
|
|
6293
|
+
}, bc = /* @__PURE__ */ e({
|
|
6141
6294
|
CENTER_BASELINE_SERIES_NAME: () => Vn,
|
|
6142
6295
|
ChartCardOverlay: () => De,
|
|
6143
6296
|
DBN_ANIMATION_THRESHOLD: () => DBN_ANIMATION_THRESHOLD,
|
|
@@ -6145,7 +6298,7 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
6145
6298
|
DBN_EASE_NAME: () => DBN_EASE_NAME,
|
|
6146
6299
|
DEFAULT_INVALID_MODE: () => xn,
|
|
6147
6300
|
DEFAULT_LOG_BASE: () => 10,
|
|
6148
|
-
DbnChart: () =>
|
|
6301
|
+
DbnChart: () => yc,
|
|
6149
6302
|
FACET_DEFAULT_COLUMNS: () => 2,
|
|
6150
6303
|
FACET_DEFAULT_MAX: () => 12,
|
|
6151
6304
|
FACET_GUTTER_PX: () => 8,
|
|
@@ -6161,4 +6314,4 @@ var _c = ({ data: e, appearance: t, adminTheme: n, chartColors: r, renderer: i,
|
|
|
6161
6314
|
buildAnswerLine: () => $e
|
|
6162
6315
|
});
|
|
6163
6316
|
//#endregion
|
|
6164
|
-
export { $e as n,
|
|
6317
|
+
export { $e as n, bc as t };
|