@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.2
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/README.md +19 -0
- package/dist/bigconsole/BigConsoleRoot.js +88 -82
- package/dist/bigconsole/BigConsoleRoutes.js +163 -136
- package/dist/bigconsole/assistant/assistantProduct.js +1 -4
- package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
- package/dist/bigconsole/assistant/pageContext.js +1 -6
- package/dist/bigconsole/assistant/recordAdapters.js +26 -27
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
- package/dist/bigconsole/components/common/index.d.ts +0 -1
- package/dist/bigconsole/components/common/index.js +0 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +357 -337
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
- package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +17 -17
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/chart/ChartWidget.js +125 -129
- package/dist/bigconsole/components/widgets/chart/charts/AreaChart.js +50 -45
- package/dist/bigconsole/components/widgets/chart/charts/BarChart.js +40 -35
- package/dist/bigconsole/components/widgets/chart/charts/ComboChart.js +41 -48
- package/dist/bigconsole/components/widgets/chart/charts/LineChart.js +41 -36
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.d.ts +6 -0
- package/dist/bigconsole/components/widgets/chart/charts/numericSeries.js +26 -0
- package/dist/bigconsole/components/widgets/chart/charts/types.d.ts +2 -0
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
- package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
- package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
- package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
- package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
- package/dist/bigconsole/context/BigConsoleContext.js +47 -30
- package/dist/bigconsole/context/index.d.ts +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
- package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
- package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
- package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
- package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
- package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
- package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
- package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
- package/dist/bigconsole/hooks/useDrilldown.js +68 -67
- package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
- package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
- package/dist/bigconsole/pages/AdminPage.js +130 -130
- package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
- package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
- package/dist/bigconsole/pages/DashboardsPage.js +221 -269
- package/dist/bigconsole/pages/DataParsersPage.js +157 -180
- package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
- package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
- package/dist/bigconsole/pages/DataSinksPage.js +216 -251
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +265 -279
- package/dist/bigconsole/pages/OverviewPage.js +47 -47
- package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
- package/dist/bigconsole/pages/ParserViewPage.js +97 -97
- package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
- package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
- package/dist/bigconsole/pages/PipelinesPage.js +88 -107
- package/dist/bigconsole/pages/SettingsPage.js +173 -179
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
- package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
- package/dist/bigconsole/store/widgetStore.d.ts +0 -12
- package/dist/bigconsole/store/widgetStore.js +1 -3
- package/dist/bigconsole/types/index.d.ts +17 -2
- package/dist/bigconsole/utils/backendError.d.ts +0 -18
- package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
- package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
- package/dist/bigconsole/utils/index.d.ts +2 -0
- package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
- package/dist/bigconsole/utils/safeUrl.js +93 -0
- package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
- package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
- package/dist/bigconsole/workflowOpen.js +14 -15
- package/dist/generated/wspace-operations.d.ts +138 -8
- package/dist/generated/wspace-operations.js +281 -240
- package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
- package/package.json +9 -5
- package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
- package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
- package/dist/bigconsole/assistant/pageControls.js +0 -169
- package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
- package/dist/bigconsole/assistant/previewControl.js +0 -10
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
- package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
- package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
- package/dist/bigconsole/components/common/SortBySelect.js +0 -29
- package/dist/bigconsole/constants/backendErrors.js +0 -94
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
- package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
- package/dist/bigconsole/utils/backendError.js +0 -42
- package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
- package/dist/bigconsole/utils/dashboardList.js +0 -15
- package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
- package/dist/bigconsole/utils/dataSinkList.js +0 -15
- package/dist/bigconsole/utils/formDirty.d.ts +0 -82
- package/dist/bigconsole/utils/formDirty.js +0 -21
- package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
- package/dist/bigconsole/utils/insightsDraft.js +0 -8
- package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
- package/dist/bigconsole/utils/layoutBaseline.js +0 -96
- package/dist/bigconsole/utils/listSort.d.ts +0 -80
- package/dist/bigconsole/utils/listSort.js +0 -85
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
- package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { numericSeriesKeys as e } from "./numericSeries.js";
|
|
2
|
+
import t from "../ChartTooltip.js";
|
|
3
|
+
import { buildReferenceElements as n } from "./referenceElements.js";
|
|
4
|
+
import { memo as r, useMemo as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Area as s, AreaChart as c, CartesianGrid as l, Legend as u, ResponsiveContainer as d, Tooltip as f, XAxis as p, YAxis as m } from "recharts";
|
|
6
7
|
//#region src/bigconsole/components/widgets/chart/charts/AreaChart.tsx
|
|
7
|
-
var
|
|
8
|
+
var h = [
|
|
8
9
|
"var(--color-chart-1)",
|
|
9
10
|
"var(--color-chart-2)",
|
|
10
11
|
"var(--color-chart-3)",
|
|
11
12
|
"var(--color-chart-4)",
|
|
12
13
|
"var(--color-chart-5)"
|
|
13
|
-
],
|
|
14
|
-
let
|
|
14
|
+
], g = r(function({ data: r = [], config: g, hiddenSeries: _ = [], onDataClick: v }) {
|
|
15
|
+
let y = i(() => e(r, g.xAxisKey, g.selectedFields), [
|
|
16
|
+
r,
|
|
17
|
+
g.xAxisKey,
|
|
18
|
+
g.selectedFields
|
|
19
|
+
]), b = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
|
|
15
20
|
notation: e >= 1e4 ? "compact" : "standard",
|
|
16
21
|
maximumFractionDigits: 2
|
|
17
|
-
}).format(e) : String(e),
|
|
18
|
-
return
|
|
22
|
+
}).format(e) : String(e), x = (e) => `gradient-${e}`;
|
|
23
|
+
return r?.length ? /* @__PURE__ */ a(d, {
|
|
19
24
|
width: "100%",
|
|
20
25
|
height: "100%",
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
data:
|
|
26
|
+
children: /* @__PURE__ */ o(c, {
|
|
27
|
+
data: r,
|
|
23
28
|
margin: {
|
|
24
29
|
top: 10,
|
|
25
30
|
right: 10,
|
|
@@ -27,93 +32,93 @@ var m = [
|
|
|
27
32
|
bottom: 0
|
|
28
33
|
},
|
|
29
34
|
onClick: (e) => {
|
|
30
|
-
e?.activePayload?.[0] &&
|
|
35
|
+
e?.activePayload?.[0] && v && v(e.activePayload[0].payload, e.activeTooltipIndex || 0);
|
|
31
36
|
},
|
|
32
37
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
let n =
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
id:
|
|
38
|
+
/* @__PURE__ */ a("defs", { children: y.map((e, t) => {
|
|
39
|
+
let n = g.colors?.[t] || h[t % h.length];
|
|
40
|
+
return /* @__PURE__ */ o("linearGradient", {
|
|
41
|
+
id: x(e),
|
|
37
42
|
x1: "0",
|
|
38
43
|
y1: "0",
|
|
39
44
|
x2: "0",
|
|
40
45
|
y2: "1",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ a("stop", {
|
|
42
47
|
offset: "0%",
|
|
43
48
|
stopColor: n,
|
|
44
49
|
stopOpacity: .4
|
|
45
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ a("stop", {
|
|
46
51
|
offset: "95%",
|
|
47
52
|
stopColor: n,
|
|
48
53
|
stopOpacity: .05
|
|
49
54
|
})]
|
|
50
55
|
}, e);
|
|
51
56
|
}) }),
|
|
52
|
-
|
|
57
|
+
g.showGrid !== !1 && /* @__PURE__ */ a(l, {
|
|
53
58
|
strokeDasharray: "3 3",
|
|
54
59
|
stroke: "var(--color-border-default)",
|
|
55
60
|
opacity: .5
|
|
56
61
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
dataKey:
|
|
62
|
+
/* @__PURE__ */ a(p, {
|
|
63
|
+
dataKey: g.xAxisKey || "name",
|
|
59
64
|
tick: {
|
|
60
65
|
fill: "var(--color-text-secondary)",
|
|
61
66
|
fontSize: 12
|
|
62
67
|
},
|
|
63
68
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
64
69
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
70
|
+
label: g.xAxisLabel ? {
|
|
71
|
+
value: g.xAxisLabel,
|
|
67
72
|
position: "insideBottom",
|
|
68
73
|
offset: -5,
|
|
69
74
|
fill: "var(--color-text-secondary)"
|
|
70
75
|
} : void 0
|
|
71
76
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ a(m, {
|
|
73
78
|
tick: {
|
|
74
79
|
fill: "var(--color-text-secondary)",
|
|
75
80
|
fontSize: 12
|
|
76
81
|
},
|
|
77
82
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
78
83
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
79
|
-
tickFormatter:
|
|
80
|
-
scale:
|
|
81
|
-
domain:
|
|
82
|
-
allowDataOverflow:
|
|
83
|
-
label:
|
|
84
|
-
value:
|
|
84
|
+
tickFormatter: b,
|
|
85
|
+
scale: g.logScale ? "log" : "auto",
|
|
86
|
+
domain: g.logScale ? ["auto", "auto"] : void 0,
|
|
87
|
+
allowDataOverflow: g.logScale || void 0,
|
|
88
|
+
label: g.yAxisLabel ? {
|
|
89
|
+
value: g.yAxisLabel,
|
|
85
90
|
angle: -90,
|
|
86
91
|
position: "insideLeft",
|
|
87
92
|
fill: "var(--color-text-secondary)"
|
|
88
93
|
} : void 0
|
|
89
94
|
}),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
content: /* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ a(f, {
|
|
96
|
+
content: /* @__PURE__ */ a(t, { valueFormatter: b }),
|
|
92
97
|
cursor: { stroke: "var(--color-border-default)" }
|
|
93
98
|
}),
|
|
94
|
-
|
|
99
|
+
g.showLegend !== !1 && /* @__PURE__ */ a(u, {
|
|
95
100
|
wrapperStyle: { paddingTop: 20 },
|
|
96
|
-
formatter: (e) => /* @__PURE__ */
|
|
101
|
+
formatter: (e) => /* @__PURE__ */ a("span", {
|
|
97
102
|
style: { color: "var(--color-text-primary)" },
|
|
98
103
|
children: e
|
|
99
104
|
})
|
|
100
105
|
}),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
type:
|
|
106
|
+
n(g.referenceLines),
|
|
107
|
+
y.map((e, t) => /* @__PURE__ */ a(s, {
|
|
108
|
+
type: g.curveType || "monotone",
|
|
104
109
|
dataKey: e,
|
|
105
|
-
name:
|
|
106
|
-
stroke:
|
|
110
|
+
name: g.seriesNames?.[e] || e,
|
|
111
|
+
stroke: g.colors?.[t] || h[t % h.length],
|
|
107
112
|
strokeWidth: 2,
|
|
108
|
-
fill: `url(#${
|
|
109
|
-
dot:
|
|
113
|
+
fill: `url(#${x(e)})`,
|
|
114
|
+
dot: g.showDots,
|
|
110
115
|
activeDot: { r: 6 },
|
|
111
|
-
hide:
|
|
112
|
-
stackId:
|
|
116
|
+
hide: _.includes(e),
|
|
117
|
+
stackId: g.stacked ? "stack" : void 0
|
|
113
118
|
}, e))
|
|
114
119
|
]
|
|
115
120
|
})
|
|
116
121
|
}) : null;
|
|
117
122
|
});
|
|
118
123
|
//#endregion
|
|
119
|
-
export {
|
|
124
|
+
export { g as default };
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { numericSeriesKeys as e } from "./numericSeries.js";
|
|
2
|
+
import t from "../ChartTooltip.js";
|
|
3
|
+
import { buildReferenceElements as n } from "./referenceElements.js";
|
|
4
|
+
import { memo as r, useMemo as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Bar as s, BarChart as c, CartesianGrid as l, Legend as u, ResponsiveContainer as d, Tooltip as f, XAxis as p, YAxis as m } from "recharts";
|
|
6
7
|
//#region src/bigconsole/components/widgets/chart/charts/BarChart.tsx
|
|
7
|
-
var
|
|
8
|
+
var h = [
|
|
8
9
|
"var(--color-chart-1)",
|
|
9
10
|
"var(--color-chart-2)",
|
|
10
11
|
"var(--color-chart-3)",
|
|
11
12
|
"var(--color-chart-4)",
|
|
12
13
|
"var(--color-chart-5)"
|
|
13
|
-
],
|
|
14
|
-
let
|
|
14
|
+
], g = r(function({ data: r = [], config: g, hiddenSeries: _ = [], onDataClick: v }) {
|
|
15
|
+
let y = i(() => e(r, g.xAxisKey, g.selectedFields), [
|
|
16
|
+
r,
|
|
17
|
+
g.xAxisKey,
|
|
18
|
+
g.selectedFields
|
|
19
|
+
]), b = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
|
|
15
20
|
notation: e >= 1e4 ? "compact" : "standard",
|
|
16
21
|
maximumFractionDigits: 2
|
|
17
22
|
}).format(e) : String(e);
|
|
18
|
-
return
|
|
23
|
+
return r?.length ? /* @__PURE__ */ a(d, {
|
|
19
24
|
width: "100%",
|
|
20
25
|
height: "100%",
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
data:
|
|
26
|
+
children: /* @__PURE__ */ o(c, {
|
|
27
|
+
data: r,
|
|
23
28
|
margin: {
|
|
24
29
|
top: 10,
|
|
25
30
|
right: 10,
|
|
@@ -27,79 +32,79 @@ var m = [
|
|
|
27
32
|
bottom: 0
|
|
28
33
|
},
|
|
29
34
|
onClick: (e) => {
|
|
30
|
-
e?.activePayload?.[0] &&
|
|
35
|
+
e?.activePayload?.[0] && v && v(e.activePayload[0].payload, e.activeTooltipIndex || 0);
|
|
31
36
|
},
|
|
32
37
|
children: [
|
|
33
|
-
|
|
38
|
+
g.showGrid !== !1 && /* @__PURE__ */ a(l, {
|
|
34
39
|
strokeDasharray: "3 3",
|
|
35
40
|
stroke: "var(--color-border-default)",
|
|
36
41
|
opacity: .5,
|
|
37
42
|
vertical: !1
|
|
38
43
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
dataKey:
|
|
44
|
+
/* @__PURE__ */ a(p, {
|
|
45
|
+
dataKey: g.xAxisKey || "name",
|
|
41
46
|
tick: {
|
|
42
47
|
fill: "var(--color-text-secondary)",
|
|
43
48
|
fontSize: 12
|
|
44
49
|
},
|
|
45
50
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
46
51
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
47
|
-
label:
|
|
48
|
-
value:
|
|
52
|
+
label: g.xAxisLabel ? {
|
|
53
|
+
value: g.xAxisLabel,
|
|
49
54
|
position: "insideBottom",
|
|
50
55
|
offset: -5,
|
|
51
56
|
fill: "var(--color-text-secondary)"
|
|
52
57
|
} : void 0
|
|
53
58
|
}),
|
|
54
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ a(m, {
|
|
55
60
|
tick: {
|
|
56
61
|
fill: "var(--color-text-secondary)",
|
|
57
62
|
fontSize: 12
|
|
58
63
|
},
|
|
59
64
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
60
65
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
61
|
-
tickFormatter:
|
|
62
|
-
scale:
|
|
63
|
-
domain:
|
|
64
|
-
allowDataOverflow:
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
66
|
+
tickFormatter: b,
|
|
67
|
+
scale: g.logScale ? "log" : "auto",
|
|
68
|
+
domain: g.logScale ? ["auto", "auto"] : void 0,
|
|
69
|
+
allowDataOverflow: g.logScale || void 0,
|
|
70
|
+
label: g.yAxisLabel ? {
|
|
71
|
+
value: g.yAxisLabel,
|
|
67
72
|
angle: -90,
|
|
68
73
|
position: "insideLeft",
|
|
69
74
|
fill: "var(--color-text-secondary)"
|
|
70
75
|
} : void 0
|
|
71
76
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
content: /* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ a(f, {
|
|
78
|
+
content: /* @__PURE__ */ a(t, { valueFormatter: b }),
|
|
74
79
|
cursor: {
|
|
75
80
|
fill: "var(--color-bg-muted)",
|
|
76
81
|
opacity: .5
|
|
77
82
|
}
|
|
78
83
|
}),
|
|
79
|
-
|
|
84
|
+
g.showLegend !== !1 && /* @__PURE__ */ a(u, {
|
|
80
85
|
wrapperStyle: { paddingTop: 20 },
|
|
81
|
-
formatter: (e) => /* @__PURE__ */
|
|
86
|
+
formatter: (e) => /* @__PURE__ */ a("span", {
|
|
82
87
|
style: { color: "var(--color-text-primary)" },
|
|
83
88
|
children: e
|
|
84
89
|
})
|
|
85
90
|
}),
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
n(g.referenceLines),
|
|
92
|
+
y.map((e, t) => /* @__PURE__ */ a(s, {
|
|
88
93
|
dataKey: e,
|
|
89
|
-
name:
|
|
90
|
-
fill:
|
|
94
|
+
name: g.seriesNames?.[e] || e,
|
|
95
|
+
fill: g.colors?.[t] || h[t % h.length],
|
|
91
96
|
radius: [
|
|
92
97
|
4,
|
|
93
98
|
4,
|
|
94
99
|
0,
|
|
95
100
|
0
|
|
96
101
|
],
|
|
97
|
-
hide:
|
|
98
|
-
stackId:
|
|
102
|
+
hide: _.includes(e),
|
|
103
|
+
stackId: g.stacked ? "stack" : void 0
|
|
99
104
|
}, e))
|
|
100
105
|
]
|
|
101
106
|
})
|
|
102
107
|
}) : null;
|
|
103
108
|
});
|
|
104
109
|
//#endregion
|
|
105
|
-
export {
|
|
110
|
+
export { g as default };
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { configuredNumericSeries as e } from "./numericSeries.js";
|
|
2
|
+
import t from "../ChartTooltip.js";
|
|
3
|
+
import { buildReferenceElements as n } from "./referenceElements.js";
|
|
4
|
+
import { memo as r, useMemo as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { Bar as s, CartesianGrid as c, ComposedChart as l, Legend as u, Line as d, ResponsiveContainer as f, Tooltip as p, XAxis as m, YAxis as h } from "recharts";
|
|
6
7
|
//#region src/bigconsole/components/widgets/chart/charts/ComboChart.tsx
|
|
7
|
-
var
|
|
8
|
+
var g = [
|
|
8
9
|
"var(--color-chart-1)",
|
|
9
10
|
"var(--color-chart-2)",
|
|
10
11
|
"var(--color-chart-3)",
|
|
11
12
|
"var(--color-chart-4)",
|
|
12
13
|
"var(--color-chart-5)"
|
|
13
|
-
],
|
|
14
|
-
let
|
|
15
|
-
field: e,
|
|
16
|
-
type: t === 0 ? "bar" : "line",
|
|
17
|
-
axis: t === 0 ? "left" : "right"
|
|
18
|
-
})) : [], [
|
|
19
|
-
g.series,
|
|
20
|
-
n,
|
|
21
|
-
g.xAxisKey
|
|
22
|
-
]), b = r(() => y.some((e) => e.axis === "right"), [y]), x = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
|
|
14
|
+
], _ = r(function({ data: r = [], config: _, hiddenSeries: v = [], onDataClick: y }) {
|
|
15
|
+
let b = i(() => e(r, _), [_, r]), x = i(() => b.some((e) => e.axis === "right"), [b]), S = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
|
|
23
16
|
notation: e >= 1e4 ? "compact" : "standard",
|
|
24
17
|
maximumFractionDigits: 2
|
|
25
18
|
}).format(e) : String(e);
|
|
26
|
-
return
|
|
19
|
+
return r?.length ? /* @__PURE__ */ a(f, {
|
|
27
20
|
width: "100%",
|
|
28
21
|
height: "100%",
|
|
29
|
-
children: /* @__PURE__ */
|
|
30
|
-
data:
|
|
22
|
+
children: /* @__PURE__ */ o(l, {
|
|
23
|
+
data: r,
|
|
31
24
|
margin: {
|
|
32
25
|
top: 10,
|
|
33
26
|
right: 10,
|
|
@@ -35,17 +28,17 @@ var h = [
|
|
|
35
28
|
bottom: 0
|
|
36
29
|
},
|
|
37
30
|
onClick: (e) => {
|
|
38
|
-
e?.activePayload?.[0] &&
|
|
31
|
+
e?.activePayload?.[0] && y && y(e.activePayload[0].payload, e.activeTooltipIndex || 0);
|
|
39
32
|
},
|
|
40
33
|
children: [
|
|
41
|
-
|
|
34
|
+
_.showGrid !== !1 && /* @__PURE__ */ a(c, {
|
|
42
35
|
strokeDasharray: "3 3",
|
|
43
36
|
stroke: "var(--color-border-default)",
|
|
44
37
|
opacity: .5,
|
|
45
38
|
vertical: !1
|
|
46
39
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
dataKey:
|
|
40
|
+
/* @__PURE__ */ a(m, {
|
|
41
|
+
dataKey: _.xAxisKey || "name",
|
|
49
42
|
tick: {
|
|
50
43
|
fill: "var(--color-text-secondary)",
|
|
51
44
|
fontSize: 12
|
|
@@ -53,7 +46,7 @@ var h = [
|
|
|
53
46
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
54
47
|
axisLine: { stroke: "var(--color-border-default)" }
|
|
55
48
|
}),
|
|
56
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ a(h, {
|
|
57
50
|
yAxisId: "left",
|
|
58
51
|
tick: {
|
|
59
52
|
fill: "var(--color-text-secondary)",
|
|
@@ -61,15 +54,15 @@ var h = [
|
|
|
61
54
|
},
|
|
62
55
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
63
56
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
64
|
-
tickFormatter:
|
|
65
|
-
label:
|
|
66
|
-
value:
|
|
57
|
+
tickFormatter: S,
|
|
58
|
+
label: _.yAxisLabel ? {
|
|
59
|
+
value: _.yAxisLabel,
|
|
67
60
|
angle: -90,
|
|
68
61
|
position: "insideLeft",
|
|
69
62
|
fill: "var(--color-text-secondary)"
|
|
70
63
|
} : void 0
|
|
71
64
|
}),
|
|
72
|
-
|
|
65
|
+
x && /* @__PURE__ */ a(h, {
|
|
73
66
|
yAxisId: "right",
|
|
74
67
|
orientation: "right",
|
|
75
68
|
tick: {
|
|
@@ -78,45 +71,45 @@ var h = [
|
|
|
78
71
|
},
|
|
79
72
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
80
73
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
81
|
-
tickFormatter:
|
|
82
|
-
label:
|
|
83
|
-
value:
|
|
74
|
+
tickFormatter: S,
|
|
75
|
+
label: _.yAxisRightLabel ? {
|
|
76
|
+
value: _.yAxisRightLabel,
|
|
84
77
|
angle: 90,
|
|
85
78
|
position: "insideRight",
|
|
86
79
|
fill: "var(--color-text-secondary)"
|
|
87
80
|
} : void 0
|
|
88
81
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
content: /* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ a(p, {
|
|
83
|
+
content: /* @__PURE__ */ a(t, { valueFormatter: S }),
|
|
91
84
|
cursor: {
|
|
92
85
|
fill: "var(--color-bg-muted)",
|
|
93
86
|
opacity: .5
|
|
94
87
|
}
|
|
95
88
|
}),
|
|
96
|
-
|
|
89
|
+
_.showLegend !== !1 && /* @__PURE__ */ a(u, {
|
|
97
90
|
wrapperStyle: { paddingTop: 20 },
|
|
98
|
-
formatter: (e) => /* @__PURE__ */
|
|
91
|
+
formatter: (e) => /* @__PURE__ */ a("span", {
|
|
99
92
|
style: { color: "var(--color-text-primary)" },
|
|
100
93
|
children: e
|
|
101
94
|
})
|
|
102
95
|
}),
|
|
103
|
-
|
|
104
|
-
let n = e.color ||
|
|
105
|
-
return e.type === "line" ? /* @__PURE__ */
|
|
96
|
+
b.map((e, t) => {
|
|
97
|
+
let n = e.color || _.colors?.[t] || g[t % g.length], r = e.axis === "right" && x ? "right" : "left", i = e.label || _.seriesNames?.[e.field] || e.field, o = v.includes(e.field);
|
|
98
|
+
return e.type === "line" ? /* @__PURE__ */ a(d, {
|
|
106
99
|
yAxisId: r,
|
|
107
|
-
type:
|
|
100
|
+
type: _.curveType || "monotone",
|
|
108
101
|
dataKey: e.field,
|
|
109
|
-
name:
|
|
102
|
+
name: i,
|
|
110
103
|
stroke: n,
|
|
111
104
|
strokeWidth: 2,
|
|
112
|
-
dot:
|
|
105
|
+
dot: _.showDots !== !1,
|
|
113
106
|
activeDot: { r: 6 },
|
|
114
|
-
hide:
|
|
107
|
+
hide: o,
|
|
115
108
|
connectNulls: !0
|
|
116
|
-
}, e.field) : /* @__PURE__ */
|
|
109
|
+
}, e.field) : /* @__PURE__ */ a(s, {
|
|
117
110
|
yAxisId: r,
|
|
118
111
|
dataKey: e.field,
|
|
119
|
-
name:
|
|
112
|
+
name: i,
|
|
120
113
|
fill: n,
|
|
121
114
|
radius: [
|
|
122
115
|
4,
|
|
@@ -124,14 +117,14 @@ var h = [
|
|
|
124
117
|
0,
|
|
125
118
|
0
|
|
126
119
|
],
|
|
127
|
-
hide:
|
|
128
|
-
stackId:
|
|
120
|
+
hide: o,
|
|
121
|
+
stackId: _.stacked ? "stack" : void 0
|
|
129
122
|
}, e.field);
|
|
130
123
|
}),
|
|
131
|
-
|
|
124
|
+
n(_.referenceLines, { yAxisId: "left" })
|
|
132
125
|
]
|
|
133
126
|
})
|
|
134
127
|
}) : null;
|
|
135
128
|
});
|
|
136
129
|
//#endregion
|
|
137
|
-
export {
|
|
130
|
+
export { _ as default };
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { numericSeriesKeys as e } from "./numericSeries.js";
|
|
2
|
+
import t from "../ChartTooltip.js";
|
|
3
|
+
import { buildReferenceElements as n } from "./referenceElements.js";
|
|
4
|
+
import { memo as r, useMemo as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
import { CartesianGrid as s, Legend as c, Line as l, LineChart as u, ResponsiveContainer as d, Tooltip as f, XAxis as p, YAxis as m } from "recharts";
|
|
6
7
|
//#region src/bigconsole/components/widgets/chart/charts/LineChart.tsx
|
|
7
|
-
var
|
|
8
|
+
var h = [
|
|
8
9
|
"var(--color-chart-1)",
|
|
9
10
|
"var(--color-chart-2)",
|
|
10
11
|
"var(--color-chart-3)",
|
|
11
12
|
"var(--color-chart-4)",
|
|
12
13
|
"var(--color-chart-5)"
|
|
13
|
-
],
|
|
14
|
-
let
|
|
14
|
+
], g = r(function({ data: r = [], config: g, hiddenSeries: _ = [], onDataClick: v }) {
|
|
15
|
+
let y = i(() => e(r, g.xAxisKey, g.selectedFields), [
|
|
16
|
+
r,
|
|
17
|
+
g.xAxisKey,
|
|
18
|
+
g.selectedFields
|
|
19
|
+
]), b = (e) => typeof e == "number" ? new Intl.NumberFormat("en-US", {
|
|
15
20
|
notation: e >= 1e4 ? "compact" : "standard",
|
|
16
21
|
maximumFractionDigits: 2
|
|
17
22
|
}).format(e) : String(e);
|
|
18
|
-
return
|
|
23
|
+
return r?.length ? /* @__PURE__ */ a(d, {
|
|
19
24
|
width: "100%",
|
|
20
25
|
height: "100%",
|
|
21
|
-
children: /* @__PURE__ */
|
|
22
|
-
data:
|
|
26
|
+
children: /* @__PURE__ */ o(u, {
|
|
27
|
+
data: r,
|
|
23
28
|
margin: {
|
|
24
29
|
top: 10,
|
|
25
30
|
right: 10,
|
|
@@ -27,68 +32,68 @@ var m = [
|
|
|
27
32
|
bottom: 0
|
|
28
33
|
},
|
|
29
34
|
onClick: (e) => {
|
|
30
|
-
e?.activePayload?.[0] &&
|
|
35
|
+
e?.activePayload?.[0] && v && v(e.activePayload[0].payload, e.activeTooltipIndex || 0);
|
|
31
36
|
},
|
|
32
37
|
children: [
|
|
33
|
-
|
|
38
|
+
g.showGrid !== !1 && /* @__PURE__ */ a(s, {
|
|
34
39
|
strokeDasharray: "3 3",
|
|
35
40
|
stroke: "var(--color-border-default)",
|
|
36
41
|
opacity: .5
|
|
37
42
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
dataKey:
|
|
43
|
+
/* @__PURE__ */ a(p, {
|
|
44
|
+
dataKey: g.xAxisKey || "name",
|
|
40
45
|
tick: {
|
|
41
46
|
fill: "var(--color-text-secondary)",
|
|
42
47
|
fontSize: 12
|
|
43
48
|
},
|
|
44
49
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
45
50
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
46
|
-
label:
|
|
47
|
-
value:
|
|
51
|
+
label: g.xAxisLabel ? {
|
|
52
|
+
value: g.xAxisLabel,
|
|
48
53
|
position: "insideBottom",
|
|
49
54
|
offset: -5,
|
|
50
55
|
fill: "var(--color-text-secondary)"
|
|
51
56
|
} : void 0
|
|
52
57
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ a(m, {
|
|
54
59
|
tick: {
|
|
55
60
|
fill: "var(--color-text-secondary)",
|
|
56
61
|
fontSize: 12
|
|
57
62
|
},
|
|
58
63
|
tickLine: { stroke: "var(--color-border-default)" },
|
|
59
64
|
axisLine: { stroke: "var(--color-border-default)" },
|
|
60
|
-
tickFormatter:
|
|
61
|
-
scale:
|
|
62
|
-
domain:
|
|
63
|
-
allowDataOverflow:
|
|
64
|
-
label:
|
|
65
|
-
value:
|
|
65
|
+
tickFormatter: b,
|
|
66
|
+
scale: g.logScale ? "log" : "auto",
|
|
67
|
+
domain: g.logScale ? ["auto", "auto"] : void 0,
|
|
68
|
+
allowDataOverflow: g.logScale || void 0,
|
|
69
|
+
label: g.yAxisLabel ? {
|
|
70
|
+
value: g.yAxisLabel,
|
|
66
71
|
angle: -90,
|
|
67
72
|
position: "insideLeft",
|
|
68
73
|
fill: "var(--color-text-secondary)"
|
|
69
74
|
} : void 0
|
|
70
75
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
content: /* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ a(f, {
|
|
77
|
+
content: /* @__PURE__ */ a(t, { valueFormatter: b }),
|
|
73
78
|
cursor: { stroke: "var(--color-border-default)" }
|
|
74
79
|
}),
|
|
75
|
-
|
|
80
|
+
g.showLegend !== !1 && /* @__PURE__ */ a(c, {
|
|
76
81
|
wrapperStyle: { paddingTop: 20 },
|
|
77
|
-
formatter: (e) => /* @__PURE__ */
|
|
82
|
+
formatter: (e) => /* @__PURE__ */ a("span", {
|
|
78
83
|
style: { color: "var(--color-text-primary)" },
|
|
79
84
|
children: e
|
|
80
85
|
})
|
|
81
86
|
}),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
type:
|
|
87
|
+
n(g.referenceLines),
|
|
88
|
+
y.map((e, t) => /* @__PURE__ */ a(l, {
|
|
89
|
+
type: g.curveType || "monotone",
|
|
85
90
|
dataKey: e,
|
|
86
|
-
name:
|
|
87
|
-
stroke:
|
|
91
|
+
name: g.seriesNames?.[e] || e,
|
|
92
|
+
stroke: g.colors?.[t] || h[t % h.length],
|
|
88
93
|
strokeWidth: 2,
|
|
89
|
-
dot:
|
|
94
|
+
dot: g.showDots !== !1,
|
|
90
95
|
activeDot: { r: 6 },
|
|
91
|
-
hide:
|
|
96
|
+
hide: _.includes(e),
|
|
92
97
|
connectNulls: !0
|
|
93
98
|
}, e))
|
|
94
99
|
]
|
|
@@ -96,4 +101,4 @@ var m = [
|
|
|
96
101
|
}) : null;
|
|
97
102
|
});
|
|
98
103
|
//#endregion
|
|
99
|
-
export {
|
|
104
|
+
export { g as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ChartConfig, ChartData, SeriesConfig } from './types';
|
|
2
|
+
|
|
3
|
+
/** Use the saved field order and never turn an explicit empty selection into all metrics. */
|
|
4
|
+
export declare function numericSeriesKeys(data: readonly ChartData[], xAxisKey?: string, selectedFields?: readonly string[]): string[];
|
|
5
|
+
/** Keep explicit combo descriptors, but apply a saved numeric selection in its persisted order. */
|
|
6
|
+
export declare function configuredNumericSeries(data: readonly ChartData[], config: ChartConfig): SeriesConfig[];
|