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