@sentio/ui-dashboard 0.1.2 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -31,18 +31,39 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var index_exports = {};
32
32
  __export(index_exports, {
33
33
  AggregateInput: () => AggregateInput,
34
+ AreaIcon: () => AreaIcon_default,
34
35
  ArgumentInput: () => ArgumentInput,
35
36
  ArgumentType: () => ArgumentType,
37
+ BarGaugeControls: () => BarGaugeControls,
38
+ BarGuageIcon: () => BarGuageIcon_default,
39
+ BarIcon: () => BarIcon_default,
40
+ ChartLegend: () => ChartLegend,
36
41
  EventsFunctionCategories: () => EventsFunctionCategories,
37
42
  EventsFunctionMap: () => EventsFunctionMap,
38
43
  FunctionInput: () => FunctionInput,
39
44
  FunctionMap: () => FunctionMap,
40
45
  FunctionsCategories: () => FunctionsCategories,
41
46
  FunctionsPanel: () => FunctionsPanel,
47
+ LabelControls: () => LabelControls,
42
48
  LabelSearchProvider: () => LabelSearchProvider,
43
49
  LabelsInput: () => LabelsInput,
50
+ LineControls: () => LineControls,
51
+ LineIcon: () => LineIcon_default,
52
+ PieChartControls: () => PieChartControls,
53
+ PieIcon: () => PieIcon_default,
54
+ QueryValueIcon: () => QueryValueIcon_default,
55
+ ReactEChartsBase: () => ReactEChartsBase,
56
+ RefreshButton: () => RefreshButton,
57
+ RefreshContext: () => RefreshContext,
58
+ ScatterIcon: () => ScatterIcon_default,
44
59
  SystemLabels: () => SystemLabels,
60
+ TableIcon: () => TableIcon_default,
61
+ defaultBarGaugeConfig: () => defaultConfig2,
62
+ defaultPieConfig: () => defaultConfig,
45
63
  isAggrOrRollupFunction: () => isAggrOrRollupFunction,
64
+ sentioColors: () => sentioColors,
65
+ sentioTheme: () => sentioTheme,
66
+ sentioThemeDark: () => sentioThemeDark,
46
67
  sortMetricByName: () => sortMetricByName,
47
68
  useLabelSearch: () => useLabelSearch,
48
69
  useLabelSearchContext: () => useLabelSearchContext
@@ -728,7 +749,7 @@ function FunctionInput({ value, onChange }) {
728
749
  }
729
750
  ),
730
751
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "inline-flex items-center", children: [
731
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-px w-2.5 self-center bg-border-color" }),
752
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "bg-border-color h-px w-2.5 self-center" }),
732
753
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react4.Popover, { className: "relative", children: ({ open }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
733
754
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
734
755
  import_react4.Popover.Button,
@@ -783,7 +804,7 @@ function Functions({
783
804
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children: functions.map((f, fi) => {
784
805
  const def = FunctionMap[f.name];
785
806
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "inline-flex items-center", children: [
786
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-px w-2.5 self-center bg-border-color" }),
807
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "bg-border-color h-px w-2.5 self-center" }),
787
808
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
788
809
  "div",
789
810
  {
@@ -1052,21 +1073,2307 @@ function LabelsInput({
1052
1073
  }
1053
1074
  );
1054
1075
  }
1076
+
1077
+ // src/charts/EchartsBase.tsx
1078
+ var import_react12 = require("react");
1079
+ var import_renderers = require("echarts/renderers");
1080
+ var import_core2 = require("echarts/core");
1081
+ var import_charts = require("echarts/charts");
1082
+ var import_components = require("echarts/components");
1083
+ var import_react_resize_detector = require("react-resize-detector");
1084
+ var import_ui_core6 = require("@sentio/ui-core");
1085
+
1086
+ // src/charts/ChartLegend.tsx
1087
+ var import_react10 = require("react");
1088
+
1089
+ // src/common/Tooltip.tsx
1090
+ var import_react8 = require("react");
1091
+ var import_react9 = require("@floating-ui/react");
1092
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1093
+ function Tooltip({ referenceElement, text }) {
1094
+ const { x, y, refs, strategy } = (0, import_react9.useFloating)({
1095
+ placement: "bottom",
1096
+ middleware: [(0, import_react9.shift)()]
1097
+ });
1098
+ (0, import_react8.useEffect)(() => {
1099
+ if (referenceElement) refs.setReference(referenceElement);
1100
+ }, [refs, referenceElement]);
1101
+ if (!referenceElement || !text) {
1102
+ return null;
1103
+ }
1104
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react9.FloatingPortal, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1105
+ "div",
1106
+ {
1107
+ ref: refs.setFloating,
1108
+ className: "z-tooltip pointer-events-none rounded-md bg-black/70 px-2 py-1 text-white backdrop-opacity-60",
1109
+ style: {
1110
+ position: strategy,
1111
+ top: y ?? 0,
1112
+ left: x ?? 0
1113
+ },
1114
+ children: text
1115
+ }
1116
+ ) });
1117
+ }
1118
+
1119
+ // src/charts/ChartLegend.tsx
1120
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1121
+ var COLOR_UNSELECTED = "#dddddd";
1122
+ var ChartLegend = ({
1123
+ legend,
1124
+ legendSelected,
1125
+ returnedSeries,
1126
+ totalSeries,
1127
+ onRendered,
1128
+ chartHandle
1129
+ }) => {
1130
+ const rootRef = (0, import_react10.useRef)(null);
1131
+ const [tooltipText, setTooltipText] = (0, import_react10.useState)("");
1132
+ const [tooltipReferenceElement, setTooltipReferenceElement] = (0, import_react10.useState)();
1133
+ (0, import_react10.useEffect)(() => {
1134
+ if (!rootRef.current) {
1135
+ return;
1136
+ }
1137
+ const offsetHeight = rootRef?.current?.parentElement?.offsetHeight || 0;
1138
+ chartHandle?.resize({
1139
+ height: offsetHeight - rootRef.current.offsetHeight
1140
+ });
1141
+ onRendered(true);
1142
+ }, [chartHandle, onRendered]);
1143
+ const onToggleLegend = (0, import_react10.useCallback)(
1144
+ (event, name, _seriesIndex) => {
1145
+ if (event.altKey) {
1146
+ legend.forEach((n) => {
1147
+ chartHandle?.toggleLegend(n, n === name);
1148
+ });
1149
+ return;
1150
+ }
1151
+ chartHandle?.toggleLegend(name);
1152
+ },
1153
+ [chartHandle, legendSelected]
1154
+ );
1155
+ const highlightSeries = (0, import_react10.useCallback)(
1156
+ (index) => {
1157
+ chartHandle?.highlightSeries({ seriesIndex: index });
1158
+ },
1159
+ [chartHandle]
1160
+ );
1161
+ const unhighlightSeries = (0, import_react10.useCallback)(() => {
1162
+ chartHandle?.highlightSeries(void 0);
1163
+ }, [chartHandle]);
1164
+ const onToggleAll = (0, import_react10.useCallback)(
1165
+ (legend2, legendSelected2, chartHandle2) => {
1166
+ const allSelected = legend2.every((name) => legendSelected2[name]);
1167
+ legend2.forEach((name) => {
1168
+ chartHandle2?.toggleLegend(name, !allSelected);
1169
+ });
1170
+ },
1171
+ [legend, legendSelected, chartHandle]
1172
+ );
1173
+ const list = legend.map((name, index) => {
1174
+ const selected = legendSelected[name] || legendSelected[name] === void 0;
1175
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1176
+ "div",
1177
+ {
1178
+ className: "flex cursor-pointer items-center gap-0.5 whitespace-nowrap",
1179
+ "data-tip": name,
1180
+ onClick: (event) => onToggleLegend(event, name, index),
1181
+ onDoubleClick: (event) => {
1182
+ onToggleAll(legend, legendSelected, chartHandle);
1183
+ },
1184
+ onMouseEnter: (e) => {
1185
+ if (legendSelected[name] !== false) {
1186
+ highlightSeries(index);
1187
+ }
1188
+ setTooltipReferenceElement(e.currentTarget);
1189
+ setTooltipText(name);
1190
+ },
1191
+ onMouseLeave: () => {
1192
+ unhighlightSeries();
1193
+ setTooltipReferenceElement(void 0);
1194
+ setTooltipText("");
1195
+ },
1196
+ children: [
1197
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1198
+ "span",
1199
+ {
1200
+ className: "rounded-xs h-2.5 w-2.5",
1201
+ style: {
1202
+ backgroundColor: selected ? chartHandle?.getSeriesColor({ seriesName: name }) : COLOR_UNSELECTED
1203
+ }
1204
+ }
1205
+ ),
1206
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1207
+ "span",
1208
+ {
1209
+ className: "truncate text-xs",
1210
+ style: {
1211
+ maxWidth: "12em",
1212
+ color: selected ? void 0 : COLOR_UNSELECTED
1213
+ },
1214
+ children: name
1215
+ }
1216
+ )
1217
+ ]
1218
+ },
1219
+ name + index
1220
+ );
1221
+ });
1222
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1223
+ "div",
1224
+ {
1225
+ ref: rootRef,
1226
+ className: "text-text-foreground-secondary flex max-h-10 flex-wrap gap-x-3 gap-y-1 overflow-y-auto px-2 text-[13px] leading-[18px]",
1227
+ children: [
1228
+ list,
1229
+ returnedSeries && totalSeries && returnedSeries < totalSeries ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "font-semibold", style: { color: "#6B7280" }, children: [
1230
+ "showing ",
1231
+ returnedSeries,
1232
+ " of ",
1233
+ totalSeries,
1234
+ " series"
1235
+ ] }) : null,
1236
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Tooltip, { referenceElement: tooltipReferenceElement, text: tooltipText })
1237
+ ]
1238
+ }
1239
+ );
1240
+ };
1241
+
1242
+ // src/utils/is-mobile.ts
1243
+ function isMobile() {
1244
+ return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
1245
+ navigator.userAgent
1246
+ );
1247
+ }
1248
+
1249
+ // src/charts/theme/register.ts
1250
+ var import_core = require("echarts/core");
1251
+
1252
+ // src/charts/theme/sentio-colors.ts
1253
+ var sentioColors = {
1254
+ light: {
1255
+ classic: [
1256
+ "#5470f0",
1257
+ "#47c9d9",
1258
+ "#de5f94",
1259
+ "#e4bc4f",
1260
+ "#4cb275",
1261
+ "#77aeef",
1262
+ "#9368dd",
1263
+ "#e46d6d",
1264
+ "#f1904e"
1265
+ ],
1266
+ purple: [
1267
+ "#5b0fa6",
1268
+ "#6d11c9",
1269
+ "#8617e8",
1270
+ "#9b35e9",
1271
+ "#a855f7",
1272
+ "#b67af2",
1273
+ "#7a6bff",
1274
+ "#5b7cff",
1275
+ "#3e82f6"
1276
+ ]
1277
+ },
1278
+ dark: {
1279
+ classic: [
1280
+ "#6c8aff",
1281
+ "#74dfe6",
1282
+ "#ff75b0",
1283
+ "#f1cf66",
1284
+ "#67c88f",
1285
+ "#95c6ff",
1286
+ "#b189ff",
1287
+ "#f28787",
1288
+ "#ffad67"
1289
+ ],
1290
+ purple: [
1291
+ "#3f0a78",
1292
+ "#5310a0",
1293
+ "#6816c7",
1294
+ "#7c2ee6",
1295
+ "#9451f4",
1296
+ "#a874f8",
1297
+ "#6d63f6",
1298
+ "#5b7cff",
1299
+ "#4794ff"
1300
+ ]
1301
+ }
1302
+ };
1303
+
1304
+ // src/charts/theme/sentio-theme.ts
1305
+ var sansFontFamily = 'ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
1306
+ var textSecondaryLight = "#625d75";
1307
+ var textSecondaryDark = "#b7b4c7";
1308
+ var sentioTheme = {
1309
+ color: sentioColors.light.classic,
1310
+ backgroundColor: "rgba(0,0,0,0)",
1311
+ textStyle: {
1312
+ fontSize: 11,
1313
+ fontFamily: sansFontFamily,
1314
+ color: textSecondaryLight
1315
+ },
1316
+ title: {
1317
+ textStyle: {
1318
+ color: textSecondaryLight
1319
+ },
1320
+ subtextStyle: {
1321
+ color: textSecondaryLight
1322
+ }
1323
+ },
1324
+ line: {
1325
+ itemStyle: {
1326
+ borderWidth: 1
1327
+ },
1328
+ lineStyle: {
1329
+ width: 2
1330
+ },
1331
+ symbolSize: 4,
1332
+ symbol: "emptyCircle",
1333
+ smooth: false
1334
+ },
1335
+ radar: {
1336
+ itemStyle: {
1337
+ borderWidth: 1
1338
+ },
1339
+ lineStyle: {
1340
+ width: 2
1341
+ },
1342
+ symbolSize: 4,
1343
+ symbol: "emptyCircle",
1344
+ smooth: false
1345
+ },
1346
+ bar: {
1347
+ itemStyle: {
1348
+ borderWidth: 0,
1349
+ borderColor: "#ccc"
1350
+ }
1351
+ },
1352
+ pie: {
1353
+ itemStyle: {
1354
+ borderWidth: 0,
1355
+ borderColor: "#ccc"
1356
+ },
1357
+ label: {
1358
+ textBorderWidth: 0,
1359
+ textBorderColor: "transparent"
1360
+ }
1361
+ },
1362
+ scatter: {
1363
+ itemStyle: {
1364
+ borderWidth: 0,
1365
+ borderColor: "#ccc"
1366
+ }
1367
+ },
1368
+ boxplot: {
1369
+ itemStyle: {
1370
+ borderWidth: 0,
1371
+ borderColor: "#ccc"
1372
+ }
1373
+ },
1374
+ parallel: {
1375
+ itemStyle: {
1376
+ borderWidth: 0,
1377
+ borderColor: "#ccc"
1378
+ }
1379
+ },
1380
+ sankey: {
1381
+ itemStyle: {
1382
+ borderWidth: 0,
1383
+ borderColor: "#ccc"
1384
+ }
1385
+ },
1386
+ funnel: {
1387
+ itemStyle: {
1388
+ borderWidth: 0,
1389
+ borderColor: "#ccc"
1390
+ }
1391
+ },
1392
+ gauge: {
1393
+ itemStyle: {
1394
+ borderWidth: 0,
1395
+ borderColor: "#ccc"
1396
+ }
1397
+ },
1398
+ candlestick: {
1399
+ itemStyle: {
1400
+ color: "#eb5454",
1401
+ color0: "#47b262",
1402
+ borderColor: "#eb5454",
1403
+ borderColor0: "#47b262",
1404
+ borderWidth: 1
1405
+ }
1406
+ },
1407
+ graph: {
1408
+ itemStyle: {
1409
+ borderWidth: 0,
1410
+ borderColor: "#ccc"
1411
+ },
1412
+ lineStyle: {
1413
+ width: 1,
1414
+ color: "#aaaaaa"
1415
+ },
1416
+ symbolSize: 4,
1417
+ symbol: "emptyCircle",
1418
+ smooth: false,
1419
+ color: [
1420
+ "#2e71db",
1421
+ "#8dc869",
1422
+ "#ffdc2d",
1423
+ "#f05a4d",
1424
+ "#56bce5",
1425
+ "#73ba46",
1426
+ "#fe9f05",
1427
+ "#a452d7",
1428
+ "#a65a8b"
1429
+ ],
1430
+ label: {
1431
+ color: "#ebeff3"
1432
+ }
1433
+ },
1434
+ map: {
1435
+ itemStyle: {
1436
+ areaColor: "#eee",
1437
+ borderColor: "#444",
1438
+ borderWidth: 0.5
1439
+ },
1440
+ label: {
1441
+ color: "#000"
1442
+ },
1443
+ emphasis: {
1444
+ itemStyle: {
1445
+ areaColor: "rgba(255,215,0,0.8)",
1446
+ borderColor: "#444",
1447
+ borderWidth: 1
1448
+ },
1449
+ label: {
1450
+ color: "rgb(100,0,0)"
1451
+ }
1452
+ }
1453
+ },
1454
+ geo: {
1455
+ itemStyle: {
1456
+ areaColor: "#eee",
1457
+ borderColor: "#444",
1458
+ borderWidth: 0.5
1459
+ },
1460
+ label: {
1461
+ color: "#000"
1462
+ },
1463
+ emphasis: {
1464
+ itemStyle: {
1465
+ areaColor: "rgba(255,215,0,0.8)",
1466
+ borderColor: "#444",
1467
+ borderWidth: 1
1468
+ },
1469
+ label: {
1470
+ color: "rgb(100,0,0)"
1471
+ }
1472
+ }
1473
+ },
1474
+ categoryAxis: {
1475
+ axisLine: {
1476
+ show: true,
1477
+ lineStyle: {
1478
+ // matches CSS --border-color in light mode (rgb(235,239,243))
1479
+ color: "#EBEFF3"
1480
+ }
1481
+ },
1482
+ axisTick: {
1483
+ show: true,
1484
+ lineStyle: {
1485
+ color: "#EBEFF3"
1486
+ }
1487
+ },
1488
+ axisLabel: {
1489
+ show: true,
1490
+ color: textSecondaryLight,
1491
+ fontWeight: "normal"
1492
+ },
1493
+ splitLine: {
1494
+ show: false,
1495
+ lineStyle: {
1496
+ color: ["#E0E6F1"]
1497
+ }
1498
+ },
1499
+ splitArea: {
1500
+ show: false,
1501
+ areaStyle: {
1502
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1503
+ }
1504
+ }
1505
+ },
1506
+ valueAxis: {
1507
+ axisLine: {
1508
+ show: false,
1509
+ lineStyle: {
1510
+ color: textSecondaryLight
1511
+ }
1512
+ },
1513
+ axisTick: {
1514
+ show: false,
1515
+ lineStyle: {
1516
+ color: textSecondaryLight
1517
+ }
1518
+ },
1519
+ axisLabel: {
1520
+ show: true,
1521
+ color: textSecondaryLight,
1522
+ fontWeight: "normal"
1523
+ },
1524
+ splitLine: {
1525
+ show: true,
1526
+ lineStyle: {
1527
+ color: "rgba(228, 232, 237, 0.3)"
1528
+ }
1529
+ },
1530
+ splitArea: {
1531
+ show: false,
1532
+ areaStyle: {
1533
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1534
+ }
1535
+ }
1536
+ },
1537
+ logAxis: {
1538
+ axisLine: {
1539
+ show: false,
1540
+ lineStyle: {
1541
+ color: textSecondaryLight
1542
+ }
1543
+ },
1544
+ axisTick: {
1545
+ show: false,
1546
+ lineStyle: {
1547
+ color: textSecondaryLight
1548
+ }
1549
+ },
1550
+ axisLabel: {
1551
+ show: true,
1552
+ color: textSecondaryLight
1553
+ },
1554
+ splitLine: {
1555
+ show: true,
1556
+ lineStyle: {
1557
+ color: "rgba(89, 93, 97, 0.8)"
1558
+ }
1559
+ },
1560
+ splitArea: {
1561
+ show: false,
1562
+ areaStyle: {
1563
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1564
+ }
1565
+ }
1566
+ },
1567
+ timeAxis: {
1568
+ axisLine: {
1569
+ show: true,
1570
+ lineStyle: {
1571
+ // matches CSS --border-color in light mode (rgb(235,239,243))
1572
+ color: "#EBEFF3"
1573
+ }
1574
+ },
1575
+ axisTick: {
1576
+ show: true,
1577
+ lineStyle: {
1578
+ color: "#EBEFF3"
1579
+ }
1580
+ },
1581
+ axisLabel: {
1582
+ show: true,
1583
+ color: textSecondaryLight
1584
+ },
1585
+ splitLine: {
1586
+ show: false,
1587
+ lineStyle: {
1588
+ color: ["#E0E6F1"]
1589
+ }
1590
+ },
1591
+ splitArea: {
1592
+ show: false,
1593
+ areaStyle: {
1594
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1595
+ }
1596
+ }
1597
+ },
1598
+ toolbox: {
1599
+ iconStyle: {
1600
+ borderColor: "#999999"
1601
+ },
1602
+ emphasis: {
1603
+ iconStyle: {
1604
+ borderColor: "#666666"
1605
+ }
1606
+ }
1607
+ },
1608
+ legend: {
1609
+ textStyle: {
1610
+ color: textSecondaryLight,
1611
+ fontSize: 10
1612
+ },
1613
+ pageIconColor: "#4E5969",
1614
+ pageIconInactiveColor: "#C9CDD4",
1615
+ pageTextStyle: {
1616
+ color: textSecondaryLight
1617
+ }
1618
+ },
1619
+ tooltip: {
1620
+ axisPointer: {
1621
+ lineStyle: {
1622
+ color: "#e0e0e0",
1623
+ width: 1
1624
+ },
1625
+ crossStyle: {
1626
+ color: "#e0e0e0",
1627
+ width: 1
1628
+ }
1629
+ }
1630
+ },
1631
+ timeline: {
1632
+ lineStyle: {
1633
+ color: "#dae1f5",
1634
+ width: 2
1635
+ },
1636
+ itemStyle: {
1637
+ color: "#a4b1d7",
1638
+ borderWidth: 1
1639
+ },
1640
+ controlStyle: {
1641
+ color: "#a4b1d7",
1642
+ borderColor: "#a4b1d7",
1643
+ borderWidth: 1
1644
+ },
1645
+ checkpointStyle: {
1646
+ color: "#316bf3",
1647
+ borderColor: "#ffffff"
1648
+ },
1649
+ label: {
1650
+ color: "#a4b1d7"
1651
+ },
1652
+ emphasis: {
1653
+ itemStyle: {
1654
+ color: "#ffffff"
1655
+ },
1656
+ controlStyle: {
1657
+ color: "#a4b1d7",
1658
+ borderColor: "#a4b1d7",
1659
+ borderWidth: 1
1660
+ },
1661
+ label: {
1662
+ color: "#a4b1d7"
1663
+ }
1664
+ }
1665
+ },
1666
+ visualMap: {
1667
+ color: ["#bf444c", "#d88273", "#f6efa6"]
1668
+ },
1669
+ dataZoom: {
1670
+ handleSize: "undefined%",
1671
+ textStyle: {}
1672
+ },
1673
+ markPoint: {
1674
+ label: {
1675
+ color: "#ebeff3"
1676
+ },
1677
+ emphasis: {
1678
+ label: {
1679
+ color: "#ebeff3"
1680
+ }
1681
+ }
1682
+ }
1683
+ };
1684
+ var sentioThemeDark = {
1685
+ color: sentioColors.dark.classic,
1686
+ backgroundColor: "rgba(0,0,0,0)",
1687
+ textStyle: {
1688
+ fontSize: 11,
1689
+ fontFamily: sansFontFamily,
1690
+ textBorderWidth: 0,
1691
+ textBorderColor: "transparent",
1692
+ color: textSecondaryDark
1693
+ },
1694
+ title: {
1695
+ textStyle: {
1696
+ color: textSecondaryDark
1697
+ },
1698
+ subtextStyle: {
1699
+ color: textSecondaryDark
1700
+ }
1701
+ },
1702
+ line: {
1703
+ itemStyle: {
1704
+ borderWidth: 1
1705
+ },
1706
+ lineStyle: {
1707
+ width: 2
1708
+ },
1709
+ symbolSize: 4,
1710
+ symbol: "emptyCircle",
1711
+ smooth: false
1712
+ },
1713
+ radar: {
1714
+ itemStyle: {
1715
+ borderWidth: 1
1716
+ },
1717
+ lineStyle: {
1718
+ width: 2
1719
+ },
1720
+ symbolSize: 4,
1721
+ symbol: "emptyCircle",
1722
+ smooth: false
1723
+ },
1724
+ bar: {
1725
+ itemStyle: {
1726
+ borderWidth: 0,
1727
+ borderColor: "#ccc"
1728
+ }
1729
+ },
1730
+ pie: {
1731
+ itemStyle: {
1732
+ borderWidth: 0,
1733
+ borderColor: "transparent"
1734
+ },
1735
+ label: {
1736
+ textBorderWidth: 0,
1737
+ textBorderColor: "transparent",
1738
+ color: textSecondaryDark
1739
+ }
1740
+ },
1741
+ scatter: {
1742
+ itemStyle: {
1743
+ borderWidth: 0,
1744
+ borderColor: "#ccc"
1745
+ }
1746
+ },
1747
+ boxplot: {
1748
+ itemStyle: {
1749
+ borderWidth: 0,
1750
+ borderColor: "#ccc"
1751
+ }
1752
+ },
1753
+ parallel: {
1754
+ itemStyle: {
1755
+ borderWidth: 0,
1756
+ borderColor: "#ccc"
1757
+ }
1758
+ },
1759
+ sankey: {
1760
+ itemStyle: {
1761
+ borderWidth: 0,
1762
+ borderColor: "#ccc"
1763
+ }
1764
+ },
1765
+ funnel: {
1766
+ itemStyle: {
1767
+ borderWidth: 0,
1768
+ borderColor: "#ccc"
1769
+ }
1770
+ },
1771
+ gauge: {
1772
+ itemStyle: {
1773
+ borderWidth: 0,
1774
+ borderColor: "#ccc"
1775
+ }
1776
+ },
1777
+ candlestick: {
1778
+ itemStyle: {
1779
+ color: "#eb5454",
1780
+ color0: "#47b262",
1781
+ borderColor: "#eb5454",
1782
+ borderColor0: "#47b262",
1783
+ borderWidth: 1
1784
+ }
1785
+ },
1786
+ graph: {
1787
+ itemStyle: {
1788
+ borderWidth: 0,
1789
+ borderColor: "#ccc"
1790
+ },
1791
+ lineStyle: {
1792
+ width: 1,
1793
+ color: "#aaaaaa"
1794
+ },
1795
+ symbolSize: 4,
1796
+ symbol: "emptyCircle",
1797
+ smooth: false,
1798
+ color: [
1799
+ "#2e71db",
1800
+ "#a8d58d",
1801
+ "#ffe355",
1802
+ "#f05a4d",
1803
+ "#56bce5",
1804
+ "#73ba46",
1805
+ "#ff9f05",
1806
+ "#ad56e2",
1807
+ "#e97ec2"
1808
+ ],
1809
+ label: {
1810
+ color: "#ebeff3"
1811
+ }
1812
+ },
1813
+ map: {
1814
+ itemStyle: {
1815
+ areaColor: "#eee",
1816
+ borderColor: "#444",
1817
+ borderWidth: 0.5
1818
+ },
1819
+ label: {
1820
+ color: "#000"
1821
+ },
1822
+ emphasis: {
1823
+ itemStyle: {
1824
+ areaColor: "rgba(255,215,0,0.8)",
1825
+ borderColor: "#444",
1826
+ borderWidth: 1
1827
+ },
1828
+ label: {
1829
+ color: "rgb(100,0,0)"
1830
+ }
1831
+ }
1832
+ },
1833
+ geo: {
1834
+ itemStyle: {
1835
+ areaColor: "#eee",
1836
+ borderColor: "#444",
1837
+ borderWidth: 0.5
1838
+ },
1839
+ label: {
1840
+ color: "#000"
1841
+ },
1842
+ emphasis: {
1843
+ itemStyle: {
1844
+ areaColor: "rgba(255,215,0,0.8)",
1845
+ borderColor: "#444",
1846
+ borderWidth: 1
1847
+ },
1848
+ label: {
1849
+ color: "rgb(100,0,0)"
1850
+ }
1851
+ }
1852
+ },
1853
+ categoryAxis: {
1854
+ axisLine: {
1855
+ show: true,
1856
+ lineStyle: {
1857
+ // matches CSS --border-color in dark mode (gray-100 = rgb(66,66,72))
1858
+ color: "#424248"
1859
+ }
1860
+ },
1861
+ axisTick: {
1862
+ show: true,
1863
+ lineStyle: {
1864
+ color: "#424248"
1865
+ }
1866
+ },
1867
+ axisLabel: {
1868
+ show: true,
1869
+ color: textSecondaryDark,
1870
+ fontWeight: "normal"
1871
+ },
1872
+ splitLine: {
1873
+ show: false,
1874
+ lineStyle: {
1875
+ color: ["#E0E6F1"]
1876
+ }
1877
+ },
1878
+ splitArea: {
1879
+ show: false,
1880
+ areaStyle: {
1881
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1882
+ }
1883
+ }
1884
+ },
1885
+ valueAxis: {
1886
+ axisLine: {
1887
+ show: false,
1888
+ lineStyle: {
1889
+ color: textSecondaryDark
1890
+ }
1891
+ },
1892
+ axisTick: {
1893
+ show: false,
1894
+ lineStyle: {
1895
+ color: textSecondaryDark
1896
+ }
1897
+ },
1898
+ axisLabel: {
1899
+ show: true,
1900
+ color: textSecondaryDark
1901
+ },
1902
+ splitLine: {
1903
+ show: true,
1904
+ lineStyle: {
1905
+ // softer gridline on the new dark canvas — barely visible
1906
+ color: "rgba(255, 255, 255, 0.05)",
1907
+ width: 1,
1908
+ opacity: 0.4
1909
+ }
1910
+ },
1911
+ splitArea: {
1912
+ show: false,
1913
+ areaStyle: {
1914
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1915
+ }
1916
+ }
1917
+ },
1918
+ logAxis: {
1919
+ axisLine: {
1920
+ show: false,
1921
+ lineStyle: {
1922
+ color: textSecondaryDark
1923
+ }
1924
+ },
1925
+ axisTick: {
1926
+ show: false,
1927
+ lineStyle: {
1928
+ color: textSecondaryDark
1929
+ }
1930
+ },
1931
+ axisLabel: {
1932
+ show: true,
1933
+ color: textSecondaryDark,
1934
+ fontWeight: "normal"
1935
+ },
1936
+ splitLine: {
1937
+ show: true,
1938
+ lineStyle: {
1939
+ // softer gridline on the new dark canvas
1940
+ color: ["rgba(255, 255, 255, 0.05)"],
1941
+ width: 1,
1942
+ opacity: 0.4
1943
+ }
1944
+ },
1945
+ splitArea: {
1946
+ show: false,
1947
+ areaStyle: {
1948
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1949
+ }
1950
+ }
1951
+ },
1952
+ timeAxis: {
1953
+ axisLine: {
1954
+ show: true,
1955
+ lineStyle: {
1956
+ // matches CSS --border-color in dark mode (gray-100 = rgb(66,66,72))
1957
+ color: "#424248"
1958
+ }
1959
+ },
1960
+ axisTick: {
1961
+ show: true,
1962
+ lineStyle: {
1963
+ color: "#424248"
1964
+ }
1965
+ },
1966
+ axisLabel: {
1967
+ show: true,
1968
+ color: textSecondaryDark
1969
+ },
1970
+ splitLine: {
1971
+ show: false,
1972
+ lineStyle: {
1973
+ color: ["#5d6165"]
1974
+ }
1975
+ },
1976
+ splitArea: {
1977
+ show: false,
1978
+ areaStyle: {
1979
+ color: ["rgba(250,250,250,0.2)", "rgba(210,219,238,0.2)"]
1980
+ }
1981
+ }
1982
+ },
1983
+ toolbox: {
1984
+ iconStyle: {
1985
+ borderColor: "#999999"
1986
+ },
1987
+ emphasis: {
1988
+ iconStyle: {
1989
+ borderColor: "#666666"
1990
+ }
1991
+ }
1992
+ },
1993
+ legend: {
1994
+ textStyle: {
1995
+ color: textSecondaryDark
1996
+ },
1997
+ pageIconColor: "#909399",
1998
+ pageIconInactiveColor: "#606266",
1999
+ pageTextStyle: {
2000
+ color: textSecondaryDark
2001
+ }
2002
+ },
2003
+ tooltip: {
2004
+ axisPointer: {
2005
+ lineStyle: {
2006
+ color: "#e0e0e0",
2007
+ width: 1
2008
+ },
2009
+ crossStyle: {
2010
+ color: "#e0e0e0",
2011
+ width: 1
2012
+ }
2013
+ },
2014
+ backgroundColor: "#202020",
2015
+ textStyle: {
2016
+ color: textSecondaryDark
2017
+ }
2018
+ },
2019
+ timeline: {
2020
+ lineStyle: {
2021
+ color: "#dae1f5",
2022
+ width: 2
2023
+ },
2024
+ itemStyle: {
2025
+ color: "#a4b1d7",
2026
+ borderWidth: 1
2027
+ },
2028
+ controlStyle: {
2029
+ color: "#a4b1d7",
2030
+ borderColor: "#a4b1d7",
2031
+ borderWidth: 1
2032
+ },
2033
+ checkpointStyle: {
2034
+ color: "#316bf3",
2035
+ borderColor: "#ffffff"
2036
+ },
2037
+ label: {
2038
+ color: "#a4b1d7"
2039
+ },
2040
+ emphasis: {
2041
+ itemStyle: {
2042
+ color: "#ffffff"
2043
+ },
2044
+ controlStyle: {
2045
+ color: "#a4b1d7",
2046
+ borderColor: "#a4b1d7",
2047
+ borderWidth: 1
2048
+ },
2049
+ label: {
2050
+ color: "#a4b1d7"
2051
+ }
2052
+ }
2053
+ },
2054
+ visualMap: {
2055
+ color: ["#bf444c", "#d88273", "#f6efa6"]
2056
+ },
2057
+ dataZoom: {
2058
+ handleSize: "undefined%",
2059
+ textStyle: {}
2060
+ },
2061
+ markPoint: {
2062
+ label: {
2063
+ color: "#ebeff3"
2064
+ },
2065
+ emphasis: {
2066
+ label: {
2067
+ color: "#ebeff3"
2068
+ }
2069
+ }
2070
+ }
2071
+ };
2072
+
2073
+ // src/charts/theme/register.ts
2074
+ var registered = false;
2075
+ function registerSentioTheme() {
2076
+ if (registered) return;
2077
+ registered = true;
2078
+ (0, import_core.registerTheme)("sentio", sentioTheme);
2079
+ (0, import_core.registerTheme)("sentio-dark", sentioThemeDark);
2080
+ }
2081
+
2082
+ // src/utils/use-dark-mode.ts
2083
+ var import_react11 = require("react");
2084
+ var DarkModeListener = class _DarkModeListener {
2085
+ constructor() {
2086
+ this.isDarkMode = false;
2087
+ this.listeners = [];
2088
+ this.init();
2089
+ }
2090
+ static get instance() {
2091
+ if (!this._instance) {
2092
+ this._instance = new _DarkModeListener();
2093
+ }
2094
+ return this._instance;
2095
+ }
2096
+ addListener(listener) {
2097
+ this.listeners.push(listener);
2098
+ }
2099
+ removeListener(listener) {
2100
+ this.listeners = this.listeners.filter((l) => l !== listener);
2101
+ }
2102
+ get darkMode() {
2103
+ return this.isDarkMode;
2104
+ }
2105
+ _sync(theme = "system") {
2106
+ let isDarkMode = false;
2107
+ if (theme === "system") {
2108
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2109
+ isDarkMode = mediaQuery.matches;
2110
+ localStorage.setItem("theme", "system");
2111
+ } else if (theme === "light") {
2112
+ isDarkMode = false;
2113
+ localStorage.removeItem("theme");
2114
+ } else {
2115
+ isDarkMode = theme === "dark";
2116
+ localStorage.setItem("theme", "dark");
2117
+ }
2118
+ this.isDarkMode = isDarkMode;
2119
+ document.body.classList.remove("light", "dark");
2120
+ document.body.classList.add(isDarkMode ? "dark" : "light");
2121
+ this.listeners.forEach((listener) => listener(isDarkMode));
2122
+ }
2123
+ toggleDarkMode() {
2124
+ this.isDarkMode = document.body.classList.contains("dark");
2125
+ this._sync(this.isDarkMode ? "light" : "dark");
2126
+ }
2127
+ setDarkMode(value) {
2128
+ this._sync(value);
2129
+ }
2130
+ init() {
2131
+ this.isDarkMode = document.body.classList.contains("dark");
2132
+ const observer = new MutationObserver((mutationsList) => {
2133
+ for (const mutation of mutationsList) {
2134
+ if (mutation.type === "attributes" && mutation.attributeName === "class") {
2135
+ const isDarkMode = document.body.classList.contains("dark");
2136
+ if (this.isDarkMode !== isDarkMode) {
2137
+ this.isDarkMode = isDarkMode;
2138
+ this.listeners.forEach((listener) => listener(isDarkMode));
2139
+ }
2140
+ }
2141
+ }
2142
+ });
2143
+ const config = {
2144
+ attributes: true,
2145
+ // Observe attribute changes
2146
+ attributeFilter: ["class"]
2147
+ // Only observe changes to the 'class' attribute
2148
+ };
2149
+ observer.observe(document.body, config);
2150
+ }
2151
+ };
2152
+ var useDarkMode = (defaultValue = false) => {
2153
+ const [isDarkMode, setIsDarkMode] = (0, import_react11.useState)(defaultValue);
2154
+ (0, import_react11.useEffect)(() => {
2155
+ const instance = DarkModeListener.instance;
2156
+ setIsDarkMode(instance.darkMode);
2157
+ instance.addListener(setIsDarkMode);
2158
+ }, []);
2159
+ return isDarkMode;
2160
+ };
2161
+
2162
+ // src/charts/EchartsBase.tsx
2163
+ var import_jsx_runtime9 = require("react/jsx-runtime");
2164
+ (0, import_core2.use)([
2165
+ import_components.LegendComponent,
2166
+ import_charts.PieChart,
2167
+ import_charts.LineChart,
2168
+ import_charts.ScatterChart,
2169
+ import_components.MarkLineComponent,
2170
+ import_components.MarkAreaComponent,
2171
+ import_charts.BarChart,
2172
+ import_charts.SankeyChart,
2173
+ import_components.GridComponent,
2174
+ import_components.TooltipComponent,
2175
+ import_components.BrushComponent,
2176
+ import_components.TitleComponent,
2177
+ import_components.ToolboxComponent,
2178
+ // A group of utility tools, which includes export, data view, dynamic type switching, data area zooming, and reset.
2179
+ import_components.DataZoomComponent,
2180
+ // Used in Line Graph Charts
2181
+ import_renderers.CanvasRenderer,
2182
+ // If you only need to use the canvas rendering mode, the bundle will not include the SVGRenderer module, which is not needed.
2183
+ import_components.GraphicComponent,
2184
+ import_renderers.SVGRenderer,
2185
+ import_components.VisualMapComponent
2186
+ ]);
2187
+ registerSentioTheme();
2188
+ var ReactEChartsBaseComponent = ({
2189
+ group,
2190
+ option,
2191
+ style,
2192
+ settings,
2193
+ loading,
2194
+ theme: _theme,
2195
+ // minHeight,
2196
+ returnedSeries,
2197
+ totalSeries,
2198
+ onSelect,
2199
+ noLegend,
2200
+ onZoom,
2201
+ onClick,
2202
+ onSeriesEvent,
2203
+ onInitChart
2204
+ }, forwardedRef) => {
2205
+ const isDarkMode = useDarkMode();
2206
+ const theme = _theme || (isDarkMode ? "sentio-dark" : "sentio");
2207
+ const [legendSelected, setLegendSelected] = (0, import_react12.useState)(
2208
+ {}
2209
+ );
2210
+ const [chart, setChart] = (0, import_react12.useState)();
2211
+ const echartInstanceRef = (0, import_react12.useRef)();
2212
+ const [legendRendered, setLegendRendered] = (0, import_react12.useState)(false);
2213
+ const chartRender = "canvas";
2214
+ const frameRef = (0, import_react12.useRef)(null);
2215
+ const chartHandle = (0, import_react12.useMemo)(() => {
2216
+ return {
2217
+ getEChart: () => echartInstanceRef.current,
2218
+ highlightSeries(highlighted) {
2219
+ const chart2 = echartInstanceRef.current;
2220
+ if (chart2) {
2221
+ const { series: s } = chart2.getOption();
2222
+ const series = s;
2223
+ if (highlighted) {
2224
+ for (let i = 0; i < series.length; i++) {
2225
+ const s2 = series[i];
2226
+ if (s2.id == highlighted.seriesId || highlighted.seriesIndex == i) {
2227
+ s2.lineStyle = s2.lineStyle || {};
2228
+ s2.lineStyle.opacity = 1;
2229
+ } else {
2230
+ s2.lineStyle = s2.lineStyle || {};
2231
+ s2.lineStyle.opacity = 0.2;
2232
+ }
2233
+ }
2234
+ } else {
2235
+ series.forEach((s2) => {
2236
+ s2.lineStyle = s2.lineStyle || {};
2237
+ s2.lineStyle.opacity = 1;
2238
+ });
2239
+ }
2240
+ chart2.setOption({ series });
2241
+ }
2242
+ },
2243
+ getSeriesColor(s) {
2244
+ const chart2 = echartInstanceRef.current;
2245
+ if (chart2) {
2246
+ try {
2247
+ const { series: optionSeries } = chart2.getOption();
2248
+ const seriesList = optionSeries || [];
2249
+ let resolvedIndex = s.seriesIndex;
2250
+ if ((resolvedIndex == null || resolvedIndex < 0) && s.seriesId) {
2251
+ resolvedIndex = seriesList.findIndex(
2252
+ (serie) => serie.id === s.seriesId
2253
+ );
2254
+ }
2255
+ if ((resolvedIndex == null || resolvedIndex < 0) && s.seriesName) {
2256
+ resolvedIndex = seriesList.findIndex(
2257
+ (serie) => serie.name === s.seriesName
2258
+ );
2259
+ }
2260
+ if (resolvedIndex != null && resolvedIndex >= 0 && resolvedIndex < seriesList.length) {
2261
+ return chart2.getVisual(
2262
+ { seriesIndex: resolvedIndex },
2263
+ "color"
2264
+ );
2265
+ }
2266
+ return void 0;
2267
+ } catch (e) {
2268
+ }
2269
+ }
2270
+ },
2271
+ getFrame() {
2272
+ return frameRef.current;
2273
+ },
2274
+ toggleLegend(name, selected) {
2275
+ const chart2 = echartInstanceRef.current;
2276
+ if (selected == null) {
2277
+ chart2?.dispatchAction({
2278
+ type: "legendToggleSelect",
2279
+ name
2280
+ });
2281
+ } else {
2282
+ chart2?.dispatchAction({
2283
+ type: selected ? "legendSelect" : "legendUnSelect",
2284
+ name
2285
+ });
2286
+ }
2287
+ },
2288
+ getSeries(seriesId) {
2289
+ const chart2 = echartInstanceRef.current;
2290
+ if (chart2) {
2291
+ const { series: s } = chart2.getOption();
2292
+ const series = s;
2293
+ return series?.find((s2) => s2.id == seriesId);
2294
+ }
2295
+ },
2296
+ resize: (size) => {
2297
+ const chart2 = echartInstanceRef.current;
2298
+ chart2?.resize(size);
2299
+ }
2300
+ };
2301
+ }, []);
2302
+ (0, import_react12.useImperativeHandle)(forwardedRef, () => {
2303
+ return chartHandle;
2304
+ }, [chartHandle]);
2305
+ const onResize = (0, import_react12.useCallback)(({ width, height }) => {
2306
+ const chart2 = echartInstanceRef.current;
2307
+ chart2?.resize({
2308
+ width: width ?? void 0,
2309
+ height: height ?? void 0
2310
+ });
2311
+ }, []);
2312
+ const {
2313
+ // width,
2314
+ // height,
2315
+ ref: chartRef
2316
+ } = (0, import_react_resize_detector.useResizeDetector)({
2317
+ onResize,
2318
+ refreshMode: "throttle",
2319
+ refreshRate: 100
2320
+ });
2321
+ (0, import_react12.useEffect)(() => {
2322
+ let instance;
2323
+ const containerNode = frameRef.current?.querySelector(".echart-container");
2324
+ if (containerNode) {
2325
+ instance = (0, import_core2.init)(containerNode, theme, {
2326
+ renderer: chartRender,
2327
+ locale: "EN"
2328
+ });
2329
+ echartInstanceRef.current = instance;
2330
+ setChart(instance);
2331
+ }
2332
+ return () => {
2333
+ echartInstanceRef.current = void 0;
2334
+ instance?.dispose();
2335
+ };
2336
+ }, [theme, chartRender]);
2337
+ (0, import_react12.useEffect)(() => {
2338
+ if (!chart || chart.isDisposed()) {
2339
+ return;
2340
+ }
2341
+ chart.on("legendselected", (event) => {
2342
+ setLegendSelected(event.selected);
2343
+ });
2344
+ chart.on("legendunselected", (event) => {
2345
+ setLegendSelected(event.selected);
2346
+ });
2347
+ chart.on("legendselectchanged", (event) => {
2348
+ setLegendSelected(event.selected);
2349
+ });
2350
+ chart.on("brushEnd", (params) => {
2351
+ const areas = params.areas[0];
2352
+ if (areas) {
2353
+ const start = areas.coordRange[0];
2354
+ const end = areas.coordRange[1];
2355
+ onSelect && onSelect(start, end);
2356
+ }
2357
+ });
2358
+ if (onZoom) {
2359
+ chart.on("dataZoom", (params) => {
2360
+ onZoom(params.start, params.end);
2361
+ });
2362
+ }
2363
+ return () => {
2364
+ if (chart.isDisposed()) return;
2365
+ chart.off("legendselectchanged");
2366
+ chart.off("brushEnd");
2367
+ chart.off("dataZoom");
2368
+ };
2369
+ }, [chart, onSelect, onZoom]);
2370
+ (0, import_react12.useEffect)(() => {
2371
+ if (!chart || chart.isDisposed() || !onClick) {
2372
+ return;
2373
+ }
2374
+ chart.getZr()?.on("click", (params) => {
2375
+ const pointInPixel = [params.offsetX, params.offsetY];
2376
+ const pointInGrid = chart.convertFromPixel("grid", pointInPixel);
2377
+ onClick(pointInGrid, params);
2378
+ });
2379
+ if (onSeriesEvent) {
2380
+ chart.on("click", "series", (params) => {
2381
+ onSeriesEvent?.("click", params);
2382
+ });
2383
+ chart.on("mouseover", "series", (params) => {
2384
+ onSeriesEvent?.("mouseover", params);
2385
+ });
2386
+ chart.on("mouseout", "series", (params) => {
2387
+ onSeriesEvent?.("mouseout", params);
2388
+ });
2389
+ }
2390
+ return () => {
2391
+ if (chart.isDisposed()) return;
2392
+ chart.getZr()?.off("click");
2393
+ if (onSeriesEvent) {
2394
+ chart.off("click");
2395
+ chart.off("mouseout");
2396
+ chart.off("mouseover");
2397
+ }
2398
+ };
2399
+ }, [chart, onClick, onSeriesEvent, onInitChart]);
2400
+ const processedOption = (0, import_react12.useMemo)(() => {
2401
+ if (!option) return option;
2402
+ const processedOpt = { ...option };
2403
+ const graphicElements = [];
2404
+ let hasYAxisName = false;
2405
+ let hasXAxisName = false;
2406
+ const textColor = isDarkMode ? "#A6A6A6" : "#6E7079";
2407
+ const createAxisNameElement = (name, isYAxis, axisIndex = 0) => {
2408
+ const baseStyle = {
2409
+ text: name,
2410
+ fontSize: 11,
2411
+ fontFamily: sansFontFamily,
2412
+ fontWeight: 600,
2413
+ fill: textColor,
2414
+ textAlign: "center",
2415
+ textVerticalAlign: "middle"
2416
+ };
2417
+ if (isYAxis) {
2418
+ return {
2419
+ type: "text",
2420
+ left: axisIndex === 0 ? 8 : "right",
2421
+ top: "middle",
2422
+ rotation: Math.PI / 2,
2423
+ style: baseStyle,
2424
+ z: 100,
2425
+ silent: true
2426
+ };
2427
+ } else {
2428
+ return {
2429
+ type: "text",
2430
+ left: "center",
2431
+ bottom: axisIndex === 0 ? 8 : "top",
2432
+ style: baseStyle,
2433
+ z: 100,
2434
+ silent: true
2435
+ };
2436
+ }
2437
+ };
2438
+ const processAxisName = (axisConfig, isYAxis, axisIndex = 0) => {
2439
+ if (axisConfig && typeof axisConfig === "object" && axisConfig.name) {
2440
+ if (isYAxis) {
2441
+ hasYAxisName = true;
2442
+ } else {
2443
+ hasXAxisName = true;
2444
+ }
2445
+ const { name, ...restAxis } = axisConfig;
2446
+ const graphicElement = createAxisNameElement(name, isYAxis, axisIndex);
2447
+ graphicElements.push(graphicElement);
2448
+ return restAxis;
2449
+ }
2450
+ return axisConfig;
2451
+ };
2452
+ const processAxisArray = (axisOption, isYAxis) => {
2453
+ if (!axisOption) return axisOption;
2454
+ if (Array.isArray(axisOption)) {
2455
+ return axisOption.map(
2456
+ (axis, index) => processAxisName(axis, isYAxis, index)
2457
+ );
2458
+ } else {
2459
+ return processAxisName(axisOption, isYAxis, 0);
2460
+ }
2461
+ };
2462
+ processedOpt.yAxis = processAxisArray(option.yAxis, true);
2463
+ processedOpt.xAxis = processAxisArray(option.xAxis, false);
2464
+ if (hasYAxisName || hasXAxisName) {
2465
+ const originalGrid = processedOpt.grid || {};
2466
+ const adjustGridSpacing = (gridItem) => ({
2467
+ ...gridItem,
2468
+ left: hasYAxisName ? typeof gridItem.left === "number" ? gridItem.left + 20 : 32 : gridItem.left,
2469
+ bottom: hasXAxisName ? typeof gridItem.bottom === "number" ? gridItem.bottom + 20 : 28 : gridItem.bottom
2470
+ });
2471
+ processedOpt.grid = Array.isArray(originalGrid) ? originalGrid.map(adjustGridSpacing) : adjustGridSpacing(originalGrid);
2472
+ }
2473
+ if (graphicElements.length > 0) {
2474
+ const existingGraphic = processedOpt.graphic;
2475
+ if (existingGraphic) {
2476
+ processedOpt.graphic = Array.isArray(existingGraphic) ? [...existingGraphic, ...graphicElements] : [existingGraphic, ...graphicElements];
2477
+ } else {
2478
+ processedOpt.graphic = graphicElements;
2479
+ }
2480
+ }
2481
+ return processedOpt;
2482
+ }, [option, isDarkMode]);
2483
+ (0, import_react12.useEffect)(() => {
2484
+ if (!chart || chart.isDisposed()) {
2485
+ return;
2486
+ }
2487
+ try {
2488
+ chart.setOption(
2489
+ {
2490
+ ...processedOption,
2491
+ legend: {
2492
+ ...processedOption.legend,
2493
+ // Persist legend selected state between re-render.
2494
+ ...legendSelected ? { selected: legendSelected } : {}
2495
+ }
2496
+ },
2497
+ { ...settings, notMerge: true }
2498
+ );
2499
+ } catch (e) {
2500
+ console.error("echarts set option failed", e, processedOption);
2501
+ }
2502
+ onInitChart?.(chart);
2503
+ if (!isMobile()) {
2504
+ chart.dispatchAction({
2505
+ type: "brush",
2506
+ command: "clear",
2507
+ areas: []
2508
+ });
2509
+ chart.dispatchAction({
2510
+ type: "takeGlobalCursor",
2511
+ key: "brush",
2512
+ brushOption: {
2513
+ brushType: "lineX",
2514
+ brushMode: "single"
2515
+ }
2516
+ });
2517
+ }
2518
+ }, [
2519
+ chart,
2520
+ processedOption,
2521
+ settings,
2522
+ theme,
2523
+ onSelect,
2524
+ legendSelected,
2525
+ onInitChart
2526
+ ]);
2527
+ (0, import_react12.useEffect)(() => {
2528
+ if (loading) {
2529
+ setLegendRendered(false);
2530
+ }
2531
+ }, [loading]);
2532
+ (0, import_react12.useEffect)(() => {
2533
+ if (chart && !chart.isDisposed()) {
2534
+ chart.group = group || "";
2535
+ }
2536
+ }, [chart, group]);
2537
+ const onMouseDown = (0, import_react12.useCallback)(
2538
+ (event) => {
2539
+ if (event.button !== 0 && chartRef.current) {
2540
+ chartRef.current.querySelector(chartRender)?.dispatchEvent(
2541
+ new MouseEvent("mouseup", event)
2542
+ );
2543
+ }
2544
+ },
2545
+ [chartRef, chartRender]
2546
+ );
2547
+ const legends = noLegend ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: chart && !loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2548
+ ChartLegend,
2549
+ {
2550
+ legend: option?.legend?.data || [],
2551
+ chartHandle,
2552
+ legendSelected,
2553
+ returnedSeries,
2554
+ totalSeries,
2555
+ onRendered: setLegendRendered
2556
+ }
2557
+ ) });
2558
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2559
+ "div",
2560
+ {
2561
+ className: "relative mb-1 grid h-full",
2562
+ style: { gridTemplateRows: "1fr max-content", height: "270px", ...style },
2563
+ onMouseDown,
2564
+ ref: frameRef,
2565
+ children: [
2566
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2567
+ "div",
2568
+ {
2569
+ ref: chartRef,
2570
+ className: "echart-container min-h-0 w-full min-w-0"
2571
+ }
2572
+ ),
2573
+ legends,
2574
+ loading && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2575
+ import_ui_core6.BarLoading,
2576
+ {
2577
+ className: "bg-default-bg absolute w-full",
2578
+ hint: "Loading",
2579
+ width: 100
2580
+ }
2581
+ )
2582
+ ]
2583
+ }
2584
+ );
2585
+ };
2586
+ var ReactEChartsBase = (0, import_react12.forwardRef)(ReactEChartsBaseComponent);
2587
+
2588
+ // src/charts/RefreshContext.tsx
2589
+ var import_react13 = require("react");
2590
+ var import_ui_core7 = require("@sentio/ui-core");
2591
+ var import_io = require("react-icons/io");
2592
+ var import_jsx_runtime10 = require("react/jsx-runtime");
2593
+ var RefreshContext = (0, import_react13.createContext)({});
2594
+ var RefreshButton = (props) => {
2595
+ const { refresh, isRefreshing } = (0, import_react13.useContext)(RefreshContext);
2596
+ if (!refresh) return null;
2597
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "grid items-center justify-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2598
+ import_ui_core7.Button,
2599
+ {
2600
+ size: "sm",
2601
+ role: "text",
2602
+ onClick: (evt) => {
2603
+ evt.preventDefault();
2604
+ refresh();
2605
+ },
2606
+ processing: isRefreshing,
2607
+ icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_io.IoMdRefresh, {}),
2608
+ className: "text-text-foreground-secondary!",
2609
+ ...props,
2610
+ children: "Retry"
2611
+ }
2612
+ ) });
2613
+ };
2614
+
2615
+ // src/charts/options/LineControls.tsx
2616
+ var import_immer4 = require("immer");
2617
+ var import_ui_core8 = require("@sentio/ui-core");
2618
+ var import_jsx_runtime11 = require("react/jsx-runtime");
2619
+ var lineStyles = [
2620
+ { label: "Solid", value: "Solid" },
2621
+ { label: "Dotted", value: "Dotted" }
2622
+ ];
2623
+ var LineControls = ({ config, defaultOpen, onChange }) => {
2624
+ const setStyle = (style) => {
2625
+ onChange(
2626
+ (0, import_immer4.produce)(config || {}, (draft) => {
2627
+ draft.style = style;
2628
+ })
2629
+ );
2630
+ };
2631
+ const setSmooth = (smooth) => {
2632
+ onChange(
2633
+ (0, import_immer4.produce)(config || {}, (draft) => {
2634
+ draft.smooth = smooth;
2635
+ })
2636
+ );
2637
+ };
2638
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2639
+ import_ui_core8.DisclosurePanel,
2640
+ {
2641
+ title: "Line style",
2642
+ containerClassName: "w-full bg-default-bg",
2643
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-4", children: [
2644
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2645
+ import_ui_core8.NewButtonGroup,
2646
+ {
2647
+ buttons: lineStyles,
2648
+ value: config?.style || "Solid",
2649
+ onChange: setStyle
2650
+ }
2651
+ ),
2652
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2653
+ import_ui_core8.Checkbox,
2654
+ {
2655
+ label: "Smooth Curves",
2656
+ checked: config?.smooth,
2657
+ onChange: setSmooth
2658
+ }
2659
+ )
2660
+ ] })
2661
+ }
2662
+ );
2663
+ };
2664
+
2665
+ // src/charts/options/LabelControls.tsx
2666
+ var import_react14 = require("react");
2667
+ var import_immer5 = require("immer");
2668
+ var import_ui_core9 = require("@sentio/ui-core");
2669
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2670
+ var initialConfig = {
2671
+ columns: [],
2672
+ alias: ""
2673
+ };
2674
+ var LabelControls = ({ config, setConfig, defaultOpen }) => {
2675
+ (0, import_react14.useEffect)(() => {
2676
+ if (config?.columns && config.columns.length > 0 && !config.alias) {
2677
+ const aliasParts = [];
2678
+ config.columns.forEach((colConfig) => {
2679
+ if (!colConfig.name) return;
2680
+ if (colConfig.showLabel === false && colConfig.showValue === false) {
2681
+ } else if (colConfig.showValue === false) {
2682
+ aliasParts.push(colConfig.name);
2683
+ } else {
2684
+ aliasParts.push(`{{${colConfig.name}}}`);
2685
+ }
2686
+ });
2687
+ if (aliasParts.length > 0) {
2688
+ const migratedAlias = aliasParts.join(", ");
2689
+ setConfig(
2690
+ (0, import_immer5.produce)(config, (draft) => {
2691
+ draft.alias = migratedAlias;
2692
+ draft.columns = [];
2693
+ })
2694
+ );
2695
+ }
2696
+ }
2697
+ }, [config, setConfig]);
2698
+ const onAliasChanged = (alias) => {
2699
+ setConfig(
2700
+ (0, import_immer5.produce)(config ?? initialConfig, (draft) => {
2701
+ draft.alias = alias;
2702
+ })
2703
+ );
2704
+ };
2705
+ const _defaultOpen = (0, import_react14.useMemo)(() => {
2706
+ if (defaultOpen) {
2707
+ return true;
2708
+ }
2709
+ return config?.alias !== "" || config?.columns && config.columns.length > 0;
2710
+ }, [config, defaultOpen]);
2711
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2712
+ import_ui_core9.DisclosurePanel,
2713
+ {
2714
+ title: "Label Controls",
2715
+ defaultOpen: _defaultOpen,
2716
+ containerClassName: "w-full bg-default-bg",
2717
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex items-center gap-2", children: [
2718
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "inline-flex h-8", children: [
2719
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "sm:text-icontent border-main inline-flex items-center rounded-l-md border border-r-0 bg-gray-50 px-2 font-medium", children: [
2720
+ "Label Alias",
2721
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2722
+ import_ui_core9.HelpIcon,
2723
+ {
2724
+ text: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-icontent text-text-foreground", children: [
2725
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { children: "Series name override or template." }),
2726
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
2727
+ "Ex.",
2728
+ " ",
2729
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-primary mx-1 font-semibold italic", children: "{{contract}}" }),
2730
+ " ",
2731
+ "will be replaced with the value of the contract label."
2732
+ ] })
2733
+ ] })
2734
+ }
2735
+ )
2736
+ ] }),
2737
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2738
+ "input",
2739
+ {
2740
+ type: "text",
2741
+ value: config?.alias || "",
2742
+ onChange: (e) => onAliasChanged(e.target.value),
2743
+ placeholder: "Enter alias...",
2744
+ className: "focus:border-primary-500 sm:text-icontent border-main inline-flex w-64 items-center rounded-r-md border px-2"
2745
+ }
2746
+ )
2747
+ ] }),
2748
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2749
+ import_ui_core9.Button,
2750
+ {
2751
+ type: "button",
2752
+ role: "link",
2753
+ onClick: () => {
2754
+ setConfig(initialConfig);
2755
+ },
2756
+ children: "Reset"
2757
+ }
2758
+ )
2759
+ ] })
2760
+ }
2761
+ );
2762
+ };
2763
+
2764
+ // src/charts/options/PieChartControls.tsx
2765
+ var import_immer6 = require("immer");
2766
+ var import_lodash3 = require("lodash");
2767
+ var import_ui_core10 = require("@sentio/ui-core");
2768
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2769
+ var defaultConfig = {
2770
+ pieType: "Pie",
2771
+ calculation: "LAST",
2772
+ showPercent: true,
2773
+ showValue: true,
2774
+ absValue: false
2775
+ };
2776
+ var CalculationItems = [
2777
+ { label: "Last", value: "LAST" },
2778
+ { label: "First", value: "FIRST" },
2779
+ { label: "Total", value: "TOTAL" },
2780
+ { label: "Mean", value: "MEAN" },
2781
+ { label: "Max", value: "MAX" },
2782
+ { label: "Min", value: "MIN" }
2783
+ ];
2784
+ var PieTypeItems = [
2785
+ { label: "Pie", value: "Pie" },
2786
+ { label: "Donut", value: "Donut" }
2787
+ ];
2788
+ function PieChartControls({ config, defaultOpen, onChange }) {
2789
+ config = (0, import_lodash3.defaults)(config, defaultConfig);
2790
+ function onCalculationChange(cal) {
2791
+ config && onChange((0, import_immer6.produce)(config, (draft) => void (draft.calculation = cal)));
2792
+ }
2793
+ function onPieTypeChange(pieType) {
2794
+ config && onChange((0, import_immer6.produce)(config, (draft) => void (draft.pieType = pieType)));
2795
+ }
2796
+ function toggle(field, value) {
2797
+ config && onChange(
2798
+ (0, import_immer6.produce)(config, (draft) => {
2799
+ draft[field] = value;
2800
+ })
2801
+ );
2802
+ }
2803
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2804
+ import_ui_core10.DisclosurePanel,
2805
+ {
2806
+ title: "Pie Chart Options",
2807
+ defaultOpen,
2808
+ containerClassName: "w-full bg-default-bg",
2809
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex items-center gap-4", children: [
2810
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "shadow-xs flex rounded-md", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2811
+ import_ui_core10.NewButtonGroup,
2812
+ {
2813
+ small: true,
2814
+ buttons: PieTypeItems,
2815
+ value: config.pieType,
2816
+ onChange: onPieTypeChange
2817
+ }
2818
+ ) }),
2819
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2820
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Calculation" }),
2821
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2822
+ "select",
2823
+ {
2824
+ value: config.calculation,
2825
+ className: "sm:text-ilabel text-text-foreground border-main inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2826
+ onChange: (e) => onCalculationChange(e.target.value),
2827
+ children: CalculationItems.map((d) => {
2828
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: d.value, children: d.label }, d.value);
2829
+ })
2830
+ }
2831
+ )
2832
+ ] }),
2833
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2834
+ import_ui_core10.Checkbox,
2835
+ {
2836
+ checked: config?.showValue,
2837
+ onChange: (v) => toggle("showValue", v),
2838
+ label: "Show value",
2839
+ labelClassName: "whitespace-nowrap"
2840
+ }
2841
+ ),
2842
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2843
+ import_ui_core10.Checkbox,
2844
+ {
2845
+ checked: config?.showPercent,
2846
+ onChange: (v) => toggle("showPercent", v),
2847
+ label: "Show percent",
2848
+ labelClassName: "whitespace-nowrap"
2849
+ }
2850
+ ),
2851
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2852
+ import_ui_core10.Checkbox,
2853
+ {
2854
+ checked: config?.absValue,
2855
+ onChange: (v) => toggle("absValue", v),
2856
+ label: "Use absolute values",
2857
+ labelClassName: "whitespace-nowrap"
2858
+ }
2859
+ )
2860
+ ] })
2861
+ }
2862
+ );
2863
+ }
2864
+
2865
+ // src/charts/options/BarGaugeControls.tsx
2866
+ var import_immer7 = require("immer");
2867
+ var import_lodash4 = require("lodash");
2868
+ var import_ui_core11 = require("@sentio/ui-core");
2869
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2870
+ var defaultConfig2 = {
2871
+ direction: "HORIZONTAL",
2872
+ calculation: "LAST",
2873
+ sort: {
2874
+ sortBy: "ByName",
2875
+ orderDesc: true
2876
+ }
2877
+ };
2878
+ var directionItems = [
2879
+ { label: "Horizontal", value: "HORIZONTAL" },
2880
+ { label: "Vertical", value: "VERTICAL" }
2881
+ ];
2882
+ var CalculationItems2 = [
2883
+ { label: "Last", value: "LAST" },
2884
+ { label: "First", value: "FIRST" },
2885
+ { label: "Total", value: "TOTAL" },
2886
+ { label: "Mean", value: "MEAN" },
2887
+ { label: "Max", value: "MAX" },
2888
+ { label: "Min", value: "MIN" }
2889
+ ];
2890
+ var sortByItems = [
2891
+ { label: "Name", value: "ByName" },
2892
+ { label: "Value", value: "ByValue" }
2893
+ ];
2894
+ var orderItems = [
2895
+ { label: "Ascendant", value: "false" },
2896
+ { label: "Descendant", value: "true" }
2897
+ ];
2898
+ function BarGaugeControls({ config, defaultOpen, onChange }) {
2899
+ config = (0, import_lodash4.defaults)(config, defaultConfig2);
2900
+ function onCalculationChange(cal) {
2901
+ config && onChange((0, import_immer7.produce)(config, (draft) => void (draft.calculation = cal)));
2902
+ }
2903
+ function onDirectionChange(dir) {
2904
+ config && onChange((0, import_immer7.produce)(config, (draft) => void (draft.direction = dir)));
2905
+ }
2906
+ function onOrderChange(orderDesc) {
2907
+ config && onChange(
2908
+ (0, import_immer7.produce)(config, (draft) => {
2909
+ draft.sort = draft.sort || {};
2910
+ draft.sort.orderDesc = orderDesc;
2911
+ })
2912
+ );
2913
+ }
2914
+ function onSortByChange(sortBy2) {
2915
+ config && onChange(
2916
+ (0, import_immer7.produce)(config, (draft) => {
2917
+ draft.sort = draft.sort || {};
2918
+ draft.sort.sortBy = sortBy2;
2919
+ })
2920
+ );
2921
+ }
2922
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2923
+ import_ui_core11.DisclosurePanel,
2924
+ {
2925
+ title: "Bar Gauge Options",
2926
+ defaultOpen,
2927
+ containerClassName: "w-full bg-default-bg",
2928
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex items-center gap-4", children: [
2929
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2930
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Direction" }),
2931
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2932
+ "select",
2933
+ {
2934
+ value: config.direction,
2935
+ className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2936
+ onChange: (e) => onDirectionChange(e.target.value),
2937
+ children: directionItems.map((d) => {
2938
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
2939
+ })
2940
+ }
2941
+ )
2942
+ ] }),
2943
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2944
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center rounded-l-md border bg-gray-50 px-3 ", children: "Calculation" }),
2945
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2946
+ "select",
2947
+ {
2948
+ value: config.calculation,
2949
+ className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2950
+ onChange: (e) => onCalculationChange(e.target.value),
2951
+ children: CalculationItems2.map((d) => {
2952
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
2953
+ })
2954
+ }
2955
+ )
2956
+ ] }),
2957
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "shadow-xs flex rounded-md", children: [
2958
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "sm:text-ilabel border-main inline-flex items-center whitespace-nowrap rounded-l-md border bg-gray-50 px-3", children: "Sort by" }),
2959
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2960
+ "select",
2961
+ {
2962
+ value: config?.sort?.sortBy,
2963
+ className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center border border-l-0 pl-4 pr-7",
2964
+ onChange: (e) => onSortByChange(e.target.value),
2965
+ children: sortByItems.map((d) => {
2966
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value, children: d.label }, d.value);
2967
+ })
2968
+ }
2969
+ ),
2970
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2971
+ "select",
2972
+ {
2973
+ value: config?.sort?.orderDesc + "",
2974
+ className: "sm:text-ilabel border-main text-text-foreground inline-flex items-center rounded-r-md border border-l-0 pl-4 pr-7",
2975
+ onChange: (e) => onOrderChange(e.target.value === "true"),
2976
+ children: orderItems.map((d) => {
2977
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { value: d.value + "", children: d.label }, d.label);
2978
+ })
2979
+ }
2980
+ )
2981
+ ] })
2982
+ ] })
2983
+ }
2984
+ );
2985
+ }
2986
+
2987
+ // src/charts/icons/LineIcon.tsx
2988
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2989
+ var SvgIcon = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
2990
+ "svg",
2991
+ {
2992
+ width: "14",
2993
+ height: "14",
2994
+ viewBox: "0 0 14 14",
2995
+ fill: "none",
2996
+ xmlns: "http://www.w3.org/2000/svg",
2997
+ className,
2998
+ children: [
2999
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("g", { clipPath: "url(#clip0_1774_9563)", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3000
+ "path",
3001
+ {
3002
+ d: "M12.6191 13.1249H1.35352C1.21672 13.1249 1.10049 13.0771 1.00483 12.9814C0.909161 12.8857 0.861328 12.7695 0.861328 12.6327V1.35352C0.861328 1.21672 0.909161 1.10049 1.00483 1.00483C1.10049 0.909161 1.21672 0.861328 1.35352 0.861328C1.49031 0.861328 1.60654 0.909161 1.7022 1.00483C1.79787 1.10049 1.8457 1.21672 1.8457 1.35352V12.1405H12.6191C12.7559 12.1405 12.8722 12.1883 12.9678 12.284C13.0635 12.3797 13.1113 12.4959 13.1113 12.6327C13.1113 12.7695 13.0635 12.8857 12.9678 12.9814C12.8722 13.0771 12.7559 13.1249 12.6191 13.1249ZM5.26345 10.1582C5.0902 10.1582 4.95341 10.0853 4.85308 9.93945L2.7067 6.52127C2.63379 6.40285 2.61104 6.27758 2.63845 6.14545C2.66587 6.01333 2.73645 5.91081 2.8502 5.83789C2.96395 5.76497 3.08704 5.74222 3.21945 5.76964C3.35187 5.79706 3.45439 5.86545 3.52702 5.97483L5.05827 8.46333L5.68739 6.04352C5.72385 5.89768 5.81047 5.79283 5.94727 5.72895L8.43576 4.52583C8.55418 4.47099 8.67274 4.45962 8.79145 4.4917C8.91016 4.52379 9.00583 4.59437 9.07845 4.70345L10.3227 6.72689L12.155 1.21702C12.2005 1.08927 12.2826 0.993599 12.4013 0.930016C12.52 0.866432 12.6431 0.857245 12.7705 0.902453C12.898 0.947661 12.9936 1.02977 13.0575 1.14877C13.1214 1.26777 13.1306 1.39085 13.0851 1.51802L10.9247 8.03939C10.8608 8.24006 10.724 8.35177 10.5143 8.37452C10.3046 8.39727 10.1451 8.32202 10.0357 8.14877L8.46333 5.60558L6.59039 6.50814L5.74252 9.78939C5.68768 9.9991 5.55556 10.1177 5.34614 10.1451C5.31872 10.1541 5.29131 10.1586 5.26389 10.1586L5.26345 10.1582Z",
3003
+ fill: "currentColor"
3004
+ }
3005
+ ) }),
3006
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("clipPath", { id: "clip0_1774_9563", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3007
+ ]
3008
+ }
3009
+ );
3010
+ var LineIcon_default = SvgIcon;
3011
+
3012
+ // src/charts/icons/AreaIcon.tsx
3013
+ var import_jsx_runtime16 = require("react/jsx-runtime");
3014
+ var SvgIcon2 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3015
+ "svg",
3016
+ {
3017
+ width: "14",
3018
+ height: "14",
3019
+ viewBox: "0 0 14 14",
3020
+ fill: "none",
3021
+ xmlns: "http://www.w3.org/2000/svg",
3022
+ className,
3023
+ children: [
3024
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("g", { clipPath: "url(#clip0_1774_9545)", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3025
+ "path",
3026
+ {
3027
+ d: "M12.6193 13.1249H1.35364C1.21685 13.1249 1.10062 13.0771 1.00495 12.9814C0.909284 12.8857 0.86145 12.7695 0.86145 12.6327V1.35352C0.86145 1.21672 0.909284 1.10049 1.00495 1.00483C1.10062 0.909161 1.21685 0.861328 1.35364 0.861328C1.49043 0.861328 1.60666 0.909161 1.70233 1.00483C1.79799 1.10049 1.84583 1.21672 1.84583 1.35352V12.1405H12.6193C12.7561 12.1405 12.8723 12.1883 12.968 12.284C13.0636 12.3797 13.1115 12.4959 13.1115 12.6327C13.1115 12.7695 13.0636 12.8857 12.968 12.9814C12.8723 13.0771 12.7561 13.1249 12.6193 13.1249ZM2.62501 10.9374L4.22451 8.08008C4.26097 8.0162 4.31566 7.97289 4.38858 7.95014C4.46149 7.92739 4.53441 7.92972 4.60733 7.95714L6.12501 8.66808L7.73851 6.33008C7.83885 6.19329 7.96193 6.16135 8.10776 6.23427L9.61189 6.99989L11.7994 3.56814C11.8633 3.46781 11.9521 3.43368 12.0658 3.46577C12.1796 3.49785 12.2366 3.5731 12.2369 3.69152V10.8009C12.2369 10.9467 12.1845 11.072 12.0798 11.1767C11.9751 11.2814 11.8498 11.3338 11.704 11.3338H2.87176C2.77143 11.3338 2.69399 11.2905 2.63945 11.2038C2.58491 11.1172 2.58039 11.0284 2.62589 10.9374H2.62501Z",
3028
+ fill: "currentColor"
3029
+ }
3030
+ ) }),
3031
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("clipPath", { id: "clip0_1774_9545", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3032
+ ]
3033
+ }
3034
+ );
3035
+ var AreaIcon_default = SvgIcon2;
3036
+
3037
+ // src/charts/icons/BarIcon.tsx
3038
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3039
+ var SvgIcon3 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3040
+ "svg",
3041
+ {
3042
+ width: "14",
3043
+ height: "14",
3044
+ viewBox: "0 0 14 14",
3045
+ fill: "none",
3046
+ xmlns: "http://www.w3.org/2000/svg",
3047
+ className,
3048
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3049
+ "path",
3050
+ {
3051
+ d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875ZM5.12014 4.578V10.375C5.12014 10.5313 5.06534 10.6642 4.95572 10.7735C4.8461 10.8828 4.71293 10.9375 4.55619 10.9375C4.39945 10.9375 4.26627 10.8828 4.15665 10.7735C4.04704 10.6642 3.99223 10.5313 3.99223 10.375V4.578C3.99223 4.42167 4.04704 4.28883 4.15665 4.1795C4.26627 4.07017 4.39945 4.0155 4.55619 4.0155C4.71293 4.0155 4.8461 4.07017 4.95572 4.1795C5.06534 4.28883 5.12014 4.42167 5.12014 4.578ZM11.1196 2.5465V10.3745C11.1196 10.5308 11.0648 10.6637 10.9552 10.773C10.8456 10.8823 10.7124 10.937 10.5557 10.937C10.3989 10.937 10.2658 10.8823 10.1562 10.773C10.0465 10.6637 9.99173 10.5308 9.99173 10.3745V2.5465C9.99173 2.39017 10.0465 2.25733 10.1562 2.148C10.2658 2.03867 10.3989 1.984 10.5557 1.984C10.7124 1.984 10.8456 2.03867 10.9552 2.148C11.0648 2.25733 11.1196 2.39017 11.1196 2.5465ZM8.11187 6.5465V10.3745C8.11187 10.5308 8.05706 10.6637 7.94745 10.773C7.83783 10.8823 7.70465 10.937 7.54792 10.937C7.39118 10.937 7.258 10.8823 7.14838 10.773C7.03877 10.6637 6.98396 10.5308 6.98396 10.3745V6.5465C6.98396 6.39017 7.03877 6.25733 7.14838 6.148C7.258 6.03867 7.39118 5.984 7.54792 5.984C7.69429 5.984 7.8248 6.03867 7.93943 6.148C8.05406 6.25733 8.11154 6.39017 8.11187 6.5465Z",
3052
+ fill: "currentColor"
3053
+ }
3054
+ )
3055
+ }
3056
+ );
3057
+ var BarIcon_default = SvgIcon3;
3058
+
3059
+ // src/charts/icons/BarGuageIcon.tsx
3060
+ var import_jsx_runtime18 = require("react/jsx-runtime");
3061
+ var SvgIcon4 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3062
+ "svg",
3063
+ {
3064
+ width: "14",
3065
+ height: "14",
3066
+ viewBox: "0 0 14 14",
3067
+ fill: "currentColor",
3068
+ className,
3069
+ xmlns: "http://www.w3.org/2000/svg",
3070
+ children: [
3071
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3072
+ "path",
3073
+ {
3074
+ d: "M2.12791 1.5625V12.4375C2.12791 12.5938 2.07311 12.7267 1.96349 12.836C1.85387 12.9453 1.7207 13 1.56396 13C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375V1.5625C1 1.40617 1.05481 1.27333 1.16442 1.164C1.27404 1.05467 1.40722 1 1.56396 1C1.7207 1 1.85387 1.05467 1.96349 1.164C2.07311 1.27333 2.12791 1.40617 2.12791 1.5625ZM1.56396 11.875H12.436C12.5928 11.875 12.726 11.9297 12.8356 12.039C12.9452 12.1483 13 12.2812 13 12.4375C13 12.5938 12.9452 12.7267 12.8356 12.836C12.726 12.9453 12.5928 13 12.436 13H1.56396C1.40722 13 1.27404 12.9453 1.16442 12.836C1.05481 12.7267 1 12.5938 1 12.4375C1 12.2812 1.05481 12.1483 1.16442 12.039C1.27404 11.9297 1.40722 11.875 1.56396 11.875Z",
3075
+ fill: "currentColor"
3076
+ }
3077
+ ),
3078
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3079
+ "path",
3080
+ {
3081
+ d: "M3.64159 4.02495H9.43859C9.59493 4.02495 9.72776 3.97014 9.83709 3.86052C9.94643 3.75091 10.0011 3.61773 10.0011 3.46099C10.0011 3.30425 9.94643 3.17108 9.83709 3.06146C9.72776 2.95184 9.59493 2.89703 9.43859 2.89703L3.64159 2.89703C3.48526 2.89703 3.35243 2.95184 3.24309 3.06146C3.13376 3.17108 3.07909 3.30425 3.07909 3.46099C3.07909 3.61773 3.13376 3.75091 3.24309 3.86052C3.35243 3.97014 3.48526 4.02495 3.64159 4.02495Z",
3082
+ fill: "currentColor"
3083
+ }
3084
+ ),
3085
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3086
+ "path",
3087
+ {
3088
+ d: "M3.64209 10.0244H11.4701C11.6264 10.0244 11.7593 9.96964 11.8686 9.86002C11.9779 9.7504 12.0326 9.61723 12.0326 9.46049C12.0326 9.30375 11.9779 9.17057 11.8686 9.06096C11.7593 8.95134 11.6264 8.89653 11.4701 8.89653H3.64209C3.48576 8.89653 3.35293 8.95134 3.24359 9.06096C3.13426 9.17057 3.07959 9.30375 3.07959 9.46049C3.07959 9.61723 3.13426 9.7504 3.24359 9.86002C3.35293 9.96964 3.48576 10.0244 3.64209 10.0244Z",
3089
+ fill: "currentColor"
3090
+ }
3091
+ ),
3092
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3093
+ "path",
3094
+ {
3095
+ d: "M3.64209 7.01668L7.47009 7.01668C7.62643 7.01634 7.75926 6.95886 7.86859 6.84423C7.97793 6.7296 8.03259 6.5991 8.03259 6.45272C8.03259 6.29598 7.97793 6.1628 7.86859 6.05319C7.75926 5.94357 7.62643 5.88876 7.47009 5.88876H3.64209C3.48576 5.88876 3.35293 5.94357 3.24359 6.05319C3.13426 6.1628 3.07959 6.29598 3.07959 6.45272C3.07959 6.60946 3.13426 6.74263 3.24359 6.85225C3.35293 6.96187 3.48576 7.01668 3.64209 7.01668Z",
3096
+ fill: "currentColor"
3097
+ }
3098
+ )
3099
+ ]
3100
+ }
3101
+ );
3102
+ var BarGuageIcon_default = SvgIcon4;
3103
+
3104
+ // src/charts/icons/PieIcon.tsx
3105
+ var import_jsx_runtime19 = require("react/jsx-runtime");
3106
+ var SvgIcon5 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3107
+ "svg",
3108
+ {
3109
+ width: "14",
3110
+ height: "14",
3111
+ viewBox: "0 0 14 14",
3112
+ fill: "none",
3113
+ xmlns: "http://www.w3.org/2000/svg",
3114
+ className,
3115
+ children: [
3116
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("g", { clipPath: "url(#clip0_28267_7202)", children: [
3117
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3118
+ "path",
3119
+ {
3120
+ d: "M5.83329 1.86662C4.92079 2.07816 4.08149 2.52998 3.40247 3.17523C2.72345 3.82048 2.22942 4.63564 1.97164 5.53618C1.71386 6.43671 1.70171 7.38982 1.93644 8.29663C2.17118 9.20345 2.64426 10.0309 3.30661 10.6933C3.96896 11.3556 4.79646 11.8287 5.70327 12.0635C6.61009 12.2982 7.56319 12.286 8.46373 12.0283C9.36426 11.7705 10.1794 11.2765 10.8247 10.5974C11.4699 9.91841 11.9217 9.07912 12.1333 8.16662C12.1333 8.01191 12.0718 7.86353 11.9624 7.75414C11.853 7.64474 11.7047 7.58328 11.55 7.58328H7.58329C7.27387 7.58328 6.97713 7.46037 6.75833 7.24157C6.53954 7.02278 6.41662 6.72604 6.41662 6.41662V2.33328C6.40938 2.26417 6.38848 2.19719 6.35515 2.13621C6.32182 2.07524 6.27671 2.02149 6.22245 1.97808C6.16819 1.93467 6.10585 1.90247 6.03905 1.88333C5.97224 1.8642 5.90231 1.85852 5.83329 1.86662Z",
3121
+ stroke: "currentColor",
3122
+ strokeWidth: "1.16667",
3123
+ strokeLinecap: "round",
3124
+ strokeLinejoin: "round"
3125
+ }
3126
+ ),
3127
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3128
+ "path",
3129
+ {
3130
+ d: "M8.75 2.04175C9.49067 2.30255 10.1634 2.72617 10.7187 3.28142C11.2739 3.83668 11.6975 4.50941 11.9583 5.25008H9.33333C9.17862 5.25008 9.03025 5.18862 8.92085 5.07923C8.81146 4.96983 8.75 4.82146 8.75 4.66675V2.04175Z",
3131
+ stroke: "currentColor",
3132
+ strokeWidth: "1.16667",
3133
+ strokeLinecap: "round",
3134
+ strokeLinejoin: "round"
3135
+ }
3136
+ )
3137
+ ] }),
3138
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("clipPath", { id: "clip0_28267_7202", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3139
+ ]
3140
+ }
3141
+ );
3142
+ var PieIcon_default = SvgIcon5;
3143
+
3144
+ // src/charts/icons/QueryValueIcon.tsx
3145
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3146
+ var SvgIcon6 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3147
+ "svg",
3148
+ {
3149
+ width: "14",
3150
+ height: "14",
3151
+ viewBox: "0 0 14 14",
3152
+ fill: "none",
3153
+ className,
3154
+ xmlns: "http://www.w3.org/2000/svg",
3155
+ children: [
3156
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("g", { clipPath: "url(#clip0_3670_4424)", children: [
3157
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3158
+ "path",
3159
+ {
3160
+ d: "M11.5 1.5H2.5C1.67157 1.5 1 2.11561 1 2.875V11.125C1 11.8844 1.67157 12.5 2.5 12.5H11.5C12.3284 12.5 13 11.8844 13 11.125V2.875C13 2.11561 12.3284 1.5 11.5 1.5Z",
3161
+ stroke: "currentColor",
3162
+ strokeWidth: "1.16667",
3163
+ strokeLinecap: "round",
3164
+ strokeLinejoin: "round"
3165
+ }
3166
+ ),
3167
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3168
+ "path",
3169
+ {
3170
+ d: "M7.98188 5.77273H6.39097L5.75461 5.13636L6.39097 4.5H7.98188L8.61824 5.13636L7.98188 5.77273Z",
3171
+ fill: "currentColor"
3172
+ }
3173
+ ),
3174
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3175
+ "path",
3176
+ {
3177
+ d: "M7.98188 11.5H6.39097L5.75461 10.8637L6.39097 10.2273H7.98188L8.61824 10.8637L7.98188 11.5Z",
3178
+ fill: "currentColor"
3179
+ }
3180
+ ),
3181
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3182
+ "path",
3183
+ {
3184
+ d: "M8.30005 9.90907V6.09089L8.93641 5.45453L9.57278 6.09089V9.90907L8.93641 10.5454L8.30005 9.90907Z",
3185
+ fill: "currentColor"
3186
+ }
3187
+ ),
3188
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3189
+ "path",
3190
+ {
3191
+ d: "M4.80005 9.90907V6.09089L5.43641 5.45453L6.07278 6.09089V9.90907L5.43641 10.5454L4.80005 9.90907Z",
3192
+ fill: "currentColor"
3193
+ }
3194
+ ),
3195
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3196
+ "path",
3197
+ {
3198
+ d: "M1 3.5L13 3.5",
3199
+ stroke: "currentColor",
3200
+ strokeWidth: "1.16667",
3201
+ strokeLinecap: "round",
3202
+ strokeLinejoin: "round"
3203
+ }
3204
+ )
3205
+ ] }),
3206
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("clipPath", { id: "clip0_3670_4424", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3207
+ ]
3208
+ }
3209
+ );
3210
+ var QueryValueIcon_default = SvgIcon6;
3211
+
3212
+ // src/charts/icons/ScatterIcon.tsx
3213
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3214
+ var SvgIcon7 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3215
+ "svg",
3216
+ {
3217
+ width: "14",
3218
+ height: "14",
3219
+ viewBox: "0 0 14 14",
3220
+ fill: "none",
3221
+ xmlns: "http://www.w3.org/2000/svg",
3222
+ className,
3223
+ children: [
3224
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("g", { clipPath: "url(#clip0_28248_7302)", children: [
3225
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3226
+ "path",
3227
+ {
3228
+ d: "M1.75 1.75V12.25H12.25",
3229
+ stroke: "currentColor",
3230
+ strokeWidth: "1.16667",
3231
+ strokeLinecap: "round",
3232
+ strokeLinejoin: "round"
3233
+ }
3234
+ ),
3235
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3236
+ "path",
3237
+ {
3238
+ d: "M4.66663 8.75879V8.76754",
3239
+ stroke: "currentColor",
3240
+ strokeWidth: "1.16667",
3241
+ strokeLinecap: "round",
3242
+ strokeLinejoin: "round"
3243
+ }
3244
+ ),
3245
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3246
+ "path",
3247
+ {
3248
+ d: "M9.33337 9.34204V9.35079",
3249
+ stroke: "currentColor",
3250
+ strokeWidth: "1.16667",
3251
+ strokeLinecap: "round",
3252
+ strokeLinejoin: "round"
3253
+ }
3254
+ ),
3255
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3256
+ "path",
3257
+ {
3258
+ d: "M4.66663 4.10083V4.10958",
3259
+ stroke: "currentColor",
3260
+ strokeWidth: "1.16667",
3261
+ strokeLinecap: "round",
3262
+ strokeLinejoin: "round"
3263
+ }
3264
+ ),
3265
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3266
+ "path",
3267
+ {
3268
+ d: "M7 6.43408V6.44283",
3269
+ stroke: "currentColor",
3270
+ strokeWidth: "1.16667",
3271
+ strokeLinecap: "round",
3272
+ strokeLinejoin: "round"
3273
+ }
3274
+ ),
3275
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3276
+ "path",
3277
+ {
3278
+ d: "M11.0834 6.43408V6.44283",
3279
+ stroke: "currentColor",
3280
+ strokeWidth: "1.16667",
3281
+ strokeLinecap: "round",
3282
+ strokeLinejoin: "round"
3283
+ }
3284
+ )
3285
+ ] }),
3286
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("clipPath", { id: "clip0_28248_7302", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3287
+ ]
3288
+ }
3289
+ );
3290
+ var ScatterIcon_default = SvgIcon7;
3291
+
3292
+ // src/charts/icons/TableIcon.tsx
3293
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3294
+ var SvgIcon8 = ({ className }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3295
+ "svg",
3296
+ {
3297
+ width: "14",
3298
+ height: "14",
3299
+ viewBox: "0 0 14 14",
3300
+ fill: "none",
3301
+ xmlns: "http://www.w3.org/2000/svg",
3302
+ className,
3303
+ children: [
3304
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("g", { clipPath: "url(#clip0_3670_4416)", children: [
3305
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3306
+ "path",
3307
+ {
3308
+ d: "M11.5 2H2.5C1.67157 2 1 2.55964 1 3.25V10.75C1 11.4404 1.67157 12 2.5 12H11.5C12.3284 12 13 11.4404 13 10.75V3.25C13 2.55964 12.3284 2 11.5 2Z",
3309
+ stroke: "currentColor",
3310
+ strokeWidth: "1.16667",
3311
+ strokeLinecap: "round",
3312
+ strokeLinejoin: "round"
3313
+ }
3314
+ ),
3315
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3316
+ "path",
3317
+ {
3318
+ d: "M1 5L13 5",
3319
+ stroke: "currentColor",
3320
+ strokeWidth: "1.16667",
3321
+ strokeLinecap: "round",
3322
+ strokeLinejoin: "round"
3323
+ }
3324
+ ),
3325
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3326
+ "path",
3327
+ {
3328
+ d: "M6 2L6 12",
3329
+ stroke: "currentColor",
3330
+ strokeWidth: "1.16667",
3331
+ strokeLinecap: "round",
3332
+ strokeLinejoin: "round"
3333
+ }
3334
+ )
3335
+ ] }),
3336
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("clipPath", { id: "clip0_3670_4416", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("rect", { width: "14", height: "14", fill: "white" }) }) })
3337
+ ]
3338
+ }
3339
+ );
3340
+ var TableIcon_default = SvgIcon8;
1055
3341
  // Annotate the CommonJS export names for ESM import in node:
1056
3342
  0 && (module.exports = {
1057
3343
  AggregateInput,
3344
+ AreaIcon,
1058
3345
  ArgumentInput,
1059
3346
  ArgumentType,
3347
+ BarGaugeControls,
3348
+ BarGuageIcon,
3349
+ BarIcon,
3350
+ ChartLegend,
1060
3351
  EventsFunctionCategories,
1061
3352
  EventsFunctionMap,
1062
3353
  FunctionInput,
1063
3354
  FunctionMap,
1064
3355
  FunctionsCategories,
1065
3356
  FunctionsPanel,
3357
+ LabelControls,
1066
3358
  LabelSearchProvider,
1067
3359
  LabelsInput,
3360
+ LineControls,
3361
+ LineIcon,
3362
+ PieChartControls,
3363
+ PieIcon,
3364
+ QueryValueIcon,
3365
+ ReactEChartsBase,
3366
+ RefreshButton,
3367
+ RefreshContext,
3368
+ ScatterIcon,
1068
3369
  SystemLabels,
3370
+ TableIcon,
3371
+ defaultBarGaugeConfig,
3372
+ defaultPieConfig,
1069
3373
  isAggrOrRollupFunction,
3374
+ sentioColors,
3375
+ sentioTheme,
3376
+ sentioThemeDark,
1070
3377
  sortMetricByName,
1071
3378
  useLabelSearch,
1072
3379
  useLabelSearchContext