@burdenoff/microfe-bigconsole 2026.1012.3 → 2026.1012.5

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 (158) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +149 -140
  2. package/dist/bigconsole/assistant/assistantApi.js +5 -5
  3. package/dist/bigconsole/assistant/assistantProduct.js +4 -1
  4. package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
  5. package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
  6. package/dist/bigconsole/assistant/pageContext.js +6 -1
  7. package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
  8. package/dist/bigconsole/assistant/pageControls.js +169 -0
  9. package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
  10. package/dist/bigconsole/assistant/previewControl.js +10 -0
  11. package/dist/bigconsole/assistant/recordAdapters.js +27 -26
  12. package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
  13. package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
  14. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +33 -18
  15. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  16. package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
  17. package/dist/bigconsole/components/common/SortBySelect.js +29 -0
  18. package/dist/bigconsole/components/common/index.d.ts +1 -0
  19. package/dist/bigconsole/components/common/index.js +1 -0
  20. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  21. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  22. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  23. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  27. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  28. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
  29. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  30. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  31. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
  32. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  33. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  34. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  35. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  36. package/dist/bigconsole/components/dashboard/WidgetPalette.js +154 -150
  37. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  38. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  39. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  40. package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
  41. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  42. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  43. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  44. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  45. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  46. package/dist/bigconsole/components/embed/renderer-manifest.js +12 -0
  47. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  48. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  49. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  50. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  51. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
  52. package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
  53. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  54. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  55. package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
  56. package/dist/bigconsole/components/widgets/WidgetRegistry.js +122 -1
  57. package/dist/bigconsole/components/widgets/WidgetWrapper.js +227 -224
  58. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.d.ts +10 -0
  59. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +113 -0
  60. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.d.ts +10 -0
  61. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +187 -0
  62. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
  63. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
  64. package/dist/bigconsole/components/widgets/advanced/data.d.ts +36 -0
  65. package/dist/bigconsole/components/widgets/advanced/data.js +113 -0
  66. package/dist/bigconsole/components/widgets/advanced/mapData.d.ts +10 -0
  67. package/dist/bigconsole/components/widgets/advanced/mapData.js +22 -0
  68. package/dist/bigconsole/components/widgets/advanced/waterfallData.d.ts +15 -0
  69. package/dist/bigconsole/components/widgets/advanced/waterfallData.js +28 -0
  70. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  71. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  72. package/dist/bigconsole/components/widgets/chart/charts/WaterfallChart.js +34 -37
  73. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  74. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  75. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  76. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  77. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  78. package/dist/bigconsole/components/widgets/index.js +1 -1
  79. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  80. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  81. package/dist/bigconsole/components/widgets/map-widget/MapWidget.d.ts +2 -0
  82. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +64 -63
  83. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  84. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  85. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  86. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  87. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  88. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  89. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  90. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  91. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  92. package/dist/bigconsole/constants/backendErrors.js +94 -0
  93. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  94. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  95. package/dist/bigconsole/graphql/widgetCapabilities.d.ts +7 -0
  96. package/dist/bigconsole/graphql/widgetCapabilities.js +37 -0
  97. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
  98. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
  99. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
  100. package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
  101. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  102. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  103. package/dist/bigconsole/hooks/useWidgetCatalog.js +46 -41
  104. package/dist/bigconsole/hooks/useWidgetOperations.js +113 -88
  105. package/dist/bigconsole/pages/AdminPage.js +130 -130
  106. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  107. package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
  108. package/dist/bigconsole/pages/DashboardsPage.js +269 -221
  109. package/dist/bigconsole/pages/DataParsersPage.js +180 -157
  110. package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
  111. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
  112. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  113. package/dist/bigconsole/pages/DataSinksPage.js +335 -299
  114. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  115. package/dist/bigconsole/pages/InsightsPage.js +279 -265
  116. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  117. package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
  118. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  119. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  120. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  121. package/dist/bigconsole/pages/PipelinesPage.js +107 -88
  122. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  123. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  124. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  125. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  126. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  127. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  128. package/dist/bigconsole/renderers/adapters/BigConsoleRenderer.js +8 -5
  129. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
  130. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  131. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  132. package/dist/bigconsole/store/widgetStore.js +3 -1
  133. package/dist/bigconsole/types/index.d.ts +1 -1
  134. package/dist/bigconsole/utils/advancedWidgetCapabilities.d.ts +14 -0
  135. package/dist/bigconsole/utils/advancedWidgetCapabilities.js +36 -0
  136. package/dist/bigconsole/utils/backendError.d.ts +18 -0
  137. package/dist/bigconsole/utils/backendError.js +42 -0
  138. package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
  139. package/dist/bigconsole/utils/dashboardList.js +15 -0
  140. package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
  141. package/dist/bigconsole/utils/dataSinkList.js +15 -0
  142. package/dist/bigconsole/utils/formDirty.d.ts +82 -0
  143. package/dist/bigconsole/utils/formDirty.js +21 -0
  144. package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
  145. package/dist/bigconsole/utils/insightsDraft.js +8 -0
  146. package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
  147. package/dist/bigconsole/utils/layoutBaseline.js +96 -0
  148. package/dist/bigconsole/utils/listSort.d.ts +80 -0
  149. package/dist/bigconsole/utils/listSort.js +85 -0
  150. package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
  151. package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
  152. package/dist/bigconsole/utils/widgetTypeMapping.d.ts +1 -1
  153. package/dist/bigconsole/utils/widgetTypeMapping.js +13 -2
  154. package/dist/bigconsole/workflowOpen.js +15 -14
  155. package/dist/generated/wspace-operations.d.ts +61 -2
  156. package/dist/generated/wspace-operations.js +44 -18
  157. package/dist/generated/wspace-types.d.ts +34 -3
  158. package/package.json +3 -3
@@ -0,0 +1,10 @@
1
+ import { WidgetType } from '../../../types';
2
+
3
+ interface Props {
4
+ type: WidgetType;
5
+ config: Record<string, unknown>;
6
+ onChange: (config: Record<string, unknown>) => void;
7
+ }
8
+ /** Field mappings are data contracts, not source fetches or transform expressions. */
9
+ export declare function AdvancedWidgetConfig({ type, config, onChange }: Props): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,113 @@
1
+ import { useI18n as e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ //#region src/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.tsx
4
+ function i({ type: i, config: a, onChange: o }) {
5
+ let { t: s } = e();
6
+ return /* @__PURE__ */ r("div", {
7
+ className: "space-y-form-gap",
8
+ children: [
9
+ (i === "map" ? [
10
+ [
11
+ "latitudeField",
12
+ "Latitude field",
13
+ "lat"
14
+ ],
15
+ [
16
+ "longitudeField",
17
+ "Longitude field",
18
+ "lng"
19
+ ],
20
+ [
21
+ "labelField",
22
+ "Label field",
23
+ "name"
24
+ ],
25
+ [
26
+ "valueField",
27
+ "Value field",
28
+ "value"
29
+ ]
30
+ ] : i === "sankey" ? [
31
+ [
32
+ "sourceField",
33
+ "Source field",
34
+ "source"
35
+ ],
36
+ [
37
+ "targetField",
38
+ "Target field",
39
+ "target"
40
+ ],
41
+ [
42
+ "valueField",
43
+ "Value field",
44
+ "value"
45
+ ]
46
+ ] : i === "waterfall" ? [[
47
+ "labelField",
48
+ "Label field",
49
+ "name"
50
+ ], [
51
+ "valueField",
52
+ "Value field",
53
+ "value"
54
+ ]] : [[
55
+ "groupField",
56
+ "Group field",
57
+ "group"
58
+ ], [
59
+ "valueField",
60
+ "Value field",
61
+ "value"
62
+ ]]).map(([e = "", t = "", i = ""]) => /* @__PURE__ */ r("label", {
63
+ className: "block text-sm text-text-primary",
64
+ children: [s(`bigconsole.widget.advanced.${e}`, t), /* @__PURE__ */ n("input", {
65
+ className: "mt-1 w-full rounded-md border border-border-default bg-bg-base px-3 py-2",
66
+ value: typeof a[e] == "string" ? a[e] : i,
67
+ onChange: (t) => o({
68
+ ...a,
69
+ [e]: t.target.value
70
+ })
71
+ })]
72
+ }, e)),
73
+ i === "box_plot" && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("label", {
74
+ className: "block text-sm text-text-primary",
75
+ children: [s("bigconsole.widget.boxPlot.mode", "Input format"), /* @__PURE__ */ r("select", {
76
+ className: "mt-1 w-full rounded-md border border-border-default bg-bg-base px-3 py-2",
77
+ value: a.mode === "summary" ? "summary" : "observations",
78
+ onChange: (e) => o({
79
+ ...a,
80
+ mode: e.target.value
81
+ }),
82
+ children: [/* @__PURE__ */ n("option", {
83
+ value: "observations",
84
+ children: s("bigconsole.widget.boxPlot.observations", "Individual observations")
85
+ }), /* @__PURE__ */ n("option", {
86
+ value: "summary",
87
+ children: s("bigconsole.widget.boxPlot.summary", "Five-number summaries")
88
+ })]
89
+ })]
90
+ }), /* @__PURE__ */ n("p", {
91
+ className: "text-xs text-text-secondary",
92
+ children: s("bigconsole.widget.boxPlot.summaryHelp", "Summary rows require min, q1, median, q3 and max. Observation rows require the configured group and numeric value fields.")
93
+ })] }),
94
+ i === "waterfall" && /* @__PURE__ */ r("label", {
95
+ className: "flex items-center gap-2 text-sm text-text-primary",
96
+ children: [/* @__PURE__ */ n("input", {
97
+ type: "checkbox",
98
+ checked: a.showTotal !== !1,
99
+ onChange: (e) => o({
100
+ ...a,
101
+ showTotal: e.target.checked
102
+ })
103
+ }), s("bigconsole.widget.waterfall.showTotal", "Show cumulative total")]
104
+ }),
105
+ i === "sankey" && /* @__PURE__ */ n("p", {
106
+ className: "text-xs text-text-secondary",
107
+ children: s("bigconsole.widget.sankey.inputHelp", "Each row connects a source to a target with a nonnegative numeric value. Circular flows cannot be displayed.")
108
+ })
109
+ ]
110
+ });
111
+ }
112
+ //#endregion
113
+ export { i as AdvancedWidgetConfig };
@@ -0,0 +1,10 @@
1
+ import { Widget } from '../../../types';
2
+
3
+ interface Props {
4
+ widget: Widget;
5
+ data?: unknown;
6
+ }
7
+ export declare const SankeyWidget: import('react').NamedExoticComponent<Props>;
8
+ export declare const BoxPlotWidget: import('react').NamedExoticComponent<Props>;
9
+ export declare const WaterfallWidget: import('react').NamedExoticComponent<Props>;
10
+ export {};
@@ -0,0 +1,187 @@
1
+ import e from "../chart/ChartWidget.js";
2
+ import { normalizeBoxPlot as t, normalizeSankey as n } from "./data.js";
3
+ import { boxPlotDescription as r } from "./boxPlotDescription.js";
4
+ import { memo as i, useMemo as a } from "react";
5
+ import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { ResponsiveContainer as l, Sankey as u, Tooltip as d } from "recharts";
8
+ //#region src/bigconsole/components/widgets/advanced/AdvancedWidgets.tsx
9
+ function f(e) {
10
+ try {
11
+ return { data: e() };
12
+ } catch (e) {
13
+ return { error: e instanceof Error ? e.message : "Invalid chart data." };
14
+ }
15
+ }
16
+ function p({ message: e, error: t = !1 }) {
17
+ return /* @__PURE__ */ s("div", {
18
+ role: t ? "alert" : "status",
19
+ className: "h-full flex items-center justify-center p-4 text-sm text-secondary",
20
+ children: e
21
+ });
22
+ }
23
+ function m({ x: e, y: t, width: n, height: r, payload: i }) {
24
+ return /* @__PURE__ */ c("g", { children: [/* @__PURE__ */ s("rect", {
25
+ x: e,
26
+ y: t,
27
+ width: n,
28
+ height: r,
29
+ fill: "var(--color-chart-1)"
30
+ }), /* @__PURE__ */ c("text", {
31
+ x: e + n + 6,
32
+ y: t + r / 2,
33
+ dominantBaseline: "middle",
34
+ fill: "var(--color-text-primary)",
35
+ fontSize: 12,
36
+ children: [i.name.length > 24 ? i.name.slice(0, 23) + "…" : i.name, /* @__PURE__ */ s("title", { children: i.name })]
37
+ })] });
38
+ }
39
+ var h = i(function({ widget: e, data: t = [] }) {
40
+ let { t: r } = o(), i = e.config, h = a(() => f(() => n(t, i)), [t, i]);
41
+ return h.error ? /* @__PURE__ */ s(p, {
42
+ message: h.error,
43
+ error: !0
44
+ }) : h.data?.links.length ? /* @__PURE__ */ c("div", {
45
+ role: "img",
46
+ "aria-label": `${r("bigconsole.widget.sankey.label", "Sankey flow chart")}: ${e.title}`,
47
+ className: "h-full w-full",
48
+ children: [/* @__PURE__ */ s(l, {
49
+ width: "100%",
50
+ height: "100%",
51
+ children: /* @__PURE__ */ s(u, {
52
+ data: h.data,
53
+ nodePadding: 24,
54
+ nodeWidth: 12,
55
+ margin: {
56
+ top: 20,
57
+ bottom: 20,
58
+ left: 100,
59
+ right: 100
60
+ },
61
+ link: {
62
+ stroke: "var(--color-chart-1)",
63
+ strokeOpacity: .35
64
+ },
65
+ node: m,
66
+ children: /* @__PURE__ */ s(d, {})
67
+ })
68
+ }), /* @__PURE__ */ s("span", {
69
+ className: "sr-only",
70
+ children: h.data.links.map((e) => `${h.data.nodes[e.source]?.name} to ${h.data.nodes[e.target]?.name}: ${e.value}`).join("; ")
71
+ })]
72
+ }) : /* @__PURE__ */ s(p, { message: r("bigconsole.widget.sankey.empty", "No positive flows to display.") });
73
+ }), g = i(function({ widget: e, data: n = [] }) {
74
+ let { t: i } = o(), l = e.config, u = r(l.mode), d = a(() => f(() => t(n, l)), [n, l]);
75
+ if (d.error) return /* @__PURE__ */ s(p, {
76
+ message: d.error,
77
+ error: !0
78
+ });
79
+ if (!d.data?.length) return /* @__PURE__ */ s(p, { message: i("bigconsole.widget.boxPlot.empty", "No observations to display.") });
80
+ let m = d.data, h = m.flatMap((e) => [
81
+ e.min,
82
+ e.max,
83
+ ...e.outliers
84
+ ]), g = h.reduce((e, t) => Math.min(e, t), Infinity), _ = h.reduce((e, t) => Math.max(e, t), -Infinity), v = _ / 2 - g / 2 || 1, y = (e) => 140 + (e / 2 - g / 2) / v * 610, b = Math.max(160, m.length * 65 + 55);
85
+ return /* @__PURE__ */ c("svg", {
86
+ role: "img",
87
+ "aria-label": `${i("bigconsole.widget.boxPlot.label", "Box plot")}: ${e.title}`,
88
+ viewBox: `0 0 800 ${b}`,
89
+ className: "h-full w-full",
90
+ preserveAspectRatio: "xMidYMid meet",
91
+ children: [
92
+ /* @__PURE__ */ s("title", { children: e.title }),
93
+ /* @__PURE__ */ s("desc", { children: i(u.key, u.fallback) }),
94
+ m.map((e, t) => {
95
+ let n = t * 65 + 40;
96
+ return /* @__PURE__ */ c("g", { children: [
97
+ /* @__PURE__ */ s("title", { children: `${e.label}: min ${e.min}, Q1 ${e.q1}, median ${e.median}, Q3 ${e.q3}, max ${e.max}${e.count === void 0 ? "" : `; ${e.count} observations`}` }),
98
+ /* @__PURE__ */ s("text", {
99
+ x: 130,
100
+ y: n + 5,
101
+ textAnchor: "end",
102
+ fill: "var(--color-text-secondary)",
103
+ fontSize: 13,
104
+ children: e.label
105
+ }),
106
+ /* @__PURE__ */ s("line", {
107
+ x1: y(e.min),
108
+ x2: y(e.max),
109
+ y1: n,
110
+ y2: n,
111
+ stroke: "var(--color-chart-1)"
112
+ }),
113
+ /* @__PURE__ */ s("line", {
114
+ x1: y(e.min),
115
+ x2: y(e.min),
116
+ y1: n - 10,
117
+ y2: n + 10,
118
+ stroke: "var(--color-chart-1)"
119
+ }),
120
+ /* @__PURE__ */ s("line", {
121
+ x1: y(e.max),
122
+ x2: y(e.max),
123
+ y1: n - 10,
124
+ y2: n + 10,
125
+ stroke: "var(--color-chart-1)"
126
+ }),
127
+ /* @__PURE__ */ s("rect", {
128
+ x: y(e.q1),
129
+ y: n - 16,
130
+ width: Math.max(1, y(e.q3) - y(e.q1)),
131
+ height: 32,
132
+ fill: "var(--color-chart-1)",
133
+ fillOpacity: .25,
134
+ stroke: "var(--color-chart-1)"
135
+ }),
136
+ /* @__PURE__ */ s("line", {
137
+ x1: y(e.median),
138
+ x2: y(e.median),
139
+ y1: n - 16,
140
+ y2: n + 16,
141
+ stroke: "var(--color-text-primary)",
142
+ strokeWidth: 2
143
+ }),
144
+ e.outliers.map((e, t) => /* @__PURE__ */ s("circle", {
145
+ cx: y(e),
146
+ cy: n,
147
+ r: 3,
148
+ fill: "var(--color-chart-2)",
149
+ children: /* @__PURE__ */ s("title", { children: `${i("bigconsole.widget.boxPlot.outlier", "Outlier")}: ${e}` })
150
+ }, t))
151
+ ] }, `${e.label}-${t}`);
152
+ }),
153
+ /* @__PURE__ */ s("text", {
154
+ x: 140,
155
+ y: b - 12,
156
+ fill: "var(--color-text-secondary)",
157
+ fontSize: 12,
158
+ children: g
159
+ }),
160
+ /* @__PURE__ */ s("text", {
161
+ x: 750,
162
+ y: b - 12,
163
+ textAnchor: "end",
164
+ fill: "var(--color-text-secondary)",
165
+ fontSize: 12,
166
+ children: _
167
+ })
168
+ ]
169
+ });
170
+ }), _ = i(function({ widget: t, data: n = [] }) {
171
+ let { t: r } = o(), i = a(() => ({
172
+ ...t,
173
+ config: {
174
+ ...t.config,
175
+ chartType: "waterfall"
176
+ }
177
+ }), [t]), c = n && typeof n == "object" && !Array.isArray(n) && "rows" in n ? n.rows : n;
178
+ return Array.isArray(c) ? /* @__PURE__ */ s(e, {
179
+ widget: i,
180
+ data: c
181
+ }) : /* @__PURE__ */ s(p, {
182
+ message: r("bigconsole.widget.waterfall.invalidData", "Waterfall data must be an array of rows."),
183
+ error: !0
184
+ });
185
+ });
186
+ //#endregion
187
+ export { g as BoxPlotWidget, h as SankeyWidget, _ as WaterfallWidget };
@@ -0,0 +1,7 @@
1
+ import { BoxPlotFields } from './data';
2
+
3
+ /** Explain the same input mode used by the governed-row normalizer. */
4
+ export declare function boxPlotDescription(mode: BoxPlotFields['mode']): {
5
+ key: string;
6
+ fallback: string;
7
+ };
@@ -0,0 +1,12 @@
1
+ //#region src/bigconsole/components/widgets/advanced/boxPlotDescription.ts
2
+ function e(e) {
3
+ return e === "summary" ? {
4
+ key: "bigconsole.widget.boxPlot.summaryDescription",
5
+ fallback: "Boxes use the supplied first quartile, median and third quartile. Whiskers use the supplied minimum and maximum; no outliers are inferred."
6
+ } : {
7
+ key: "bigconsole.widget.boxPlot.description",
8
+ fallback: "Boxes show the first and third quartiles with the median. Whiskers use the 1.5 interquartile-range rule; circles show outliers."
9
+ };
10
+ }
11
+ //#endregion
12
+ export { e as boxPlotDescription };
@@ -0,0 +1,36 @@
1
+ /** Normalizers operate only on rows already supplied by the governed widget data hub. */
2
+ export interface SankeyNode {
3
+ name: string;
4
+ }
5
+ export interface SankeyLink {
6
+ source: number;
7
+ target: number;
8
+ value: number;
9
+ }
10
+ export interface SankeyData {
11
+ nodes: SankeyNode[];
12
+ links: SankeyLink[];
13
+ }
14
+ export interface SankeyFields {
15
+ sourceField?: string;
16
+ targetField?: string;
17
+ valueField?: string;
18
+ }
19
+ export interface BoxPlotFields {
20
+ groupField?: string;
21
+ valueField?: string;
22
+ mode?: 'observations' | 'summary';
23
+ }
24
+ export interface BoxPlotRow {
25
+ label: string;
26
+ min: number;
27
+ q1: number;
28
+ median: number;
29
+ q3: number;
30
+ max: number;
31
+ outliers: number[];
32
+ count?: number;
33
+ }
34
+ /** Recharts Sankey requires a directed acyclic graph, so reject cycles before layout. */
35
+ export declare function normalizeSankey(data: unknown, fields?: SankeyFields): SankeyData;
36
+ export declare function normalizeBoxPlot(data: unknown, fields?: BoxPlotFields): BoxPlotRow[];
@@ -0,0 +1,113 @@
1
+ //#region src/bigconsole/components/widgets/advanced/data.ts
2
+ function e(e) {
3
+ if (e && typeof e == "object" && !Array.isArray(e) && "rows" in e && (e = e.rows), !Array.isArray(e)) throw Error("Expected an array of data rows.");
4
+ if (e.length > 1e5) throw Error("Too many chart rows; aggregate the source before displaying it.");
5
+ if (!e.every((e) => typeof e == "object" && !!e && !Array.isArray(e))) throw Error("Every data row must be an object.");
6
+ return e;
7
+ }
8
+ function t(e) {
9
+ return typeof e == "number" && Number.isFinite(e);
10
+ }
11
+ function n(e) {
12
+ if (typeof e != "string" && typeof e != "number") throw Error("Labels must be text or numbers.");
13
+ let t = String(e).trim();
14
+ if (!t) throw Error("Labels cannot be empty.");
15
+ return t;
16
+ }
17
+ function r(r, i = {}) {
18
+ let a = i.sourceField || "source", o = i.targetField || "target", s = i.valueField || "value", c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
19
+ function u(e) {
20
+ let t = c.get(e);
21
+ if (t !== void 0) return t;
22
+ let n = c.size;
23
+ if (n >= 200) throw Error("Too many Sankey nodes; aggregate categories before displaying them.");
24
+ return c.set(e, n), n;
25
+ }
26
+ for (let i of e(r)) {
27
+ let e = u(n(i[a])), r = u(n(i[o])), c = i[s];
28
+ if (!t(c) || c < 0) throw Error("Flow values must be finite nonnegative numbers.");
29
+ if (e === r) throw Error("A flow cannot connect a node to itself.");
30
+ let d = `${e}:${r}`, f = l.get(d), p = (f?.value ?? 0) + c;
31
+ if (!Number.isFinite(p)) throw Error("Combined flow value is too large.");
32
+ if (!f && l.size >= 1e3) throw Error("Too many Sankey links; aggregate flows before displaying them.");
33
+ l.set(d, {
34
+ source: e,
35
+ target: r,
36
+ value: p
37
+ });
38
+ }
39
+ let d = [...l.values()].filter((e) => e.value > 0), f = /* @__PURE__ */ new Map();
40
+ for (let e of d) for (let t of [`${e.source}:out`, `${e.target}:in`]) {
41
+ let n = (f.get(t) ?? 0) + e.value;
42
+ if (!Number.isFinite(n)) throw Error("Total flow value is too large.");
43
+ f.set(t, n);
44
+ }
45
+ let p = Array.from({ length: c.size }, () => /* @__PURE__ */ new Set()), m = Array.from({ length: c.size }, () => 0);
46
+ for (let e of d) p[e.source]?.add(e.target), m[e.target] = (m[e.target] ?? 0) + 1;
47
+ let h = m.flatMap((e, t) => e === 0 ? [t] : []), g = 0;
48
+ for (let e = 0; e < h.length; e++) {
49
+ let t = h[e];
50
+ if (t !== void 0) {
51
+ g++;
52
+ for (let e of p[t] ?? []) m[e] = (m[e] ?? 0) - 1, m[e] === 0 && h.push(e);
53
+ }
54
+ }
55
+ if (g !== c.size) throw Error("Sankey data must not contain cycles.");
56
+ return {
57
+ nodes: [...c.keys()].map((e) => ({ name: e })),
58
+ links: d
59
+ };
60
+ }
61
+ function i(e, t) {
62
+ let n = (e.length - 1) * t, r = Math.floor(n), i = e[r] ?? 0, a = n - r;
63
+ return i * (1 - a) + (e[r + 1] ?? i) * a;
64
+ }
65
+ function a(r, a = {}) {
66
+ let o = a.groupField || "group", s = a.valueField || "value", c = e(r);
67
+ if (a.mode === "summary" && c.length > 50) throw Error("Too many box plot groups; filter to 50 groups or fewer.");
68
+ if (a.mode === "summary") return c.map((e) => {
69
+ let r = [
70
+ e.min,
71
+ e.q1,
72
+ e.median,
73
+ e.q3,
74
+ e.max
75
+ ];
76
+ if (!r.every(t)) throw Error("Box plot summaries require five finite numeric values.");
77
+ if (r.some((e, t) => t > 0 && e < (r[t - 1] ?? e))) throw Error("Box plot summary values must satisfy min ≤ q1 ≤ median ≤ q3 ≤ max.");
78
+ let [i = 0, a = 0, s = 0, c = 0, l = 0] = r;
79
+ return {
80
+ label: n(e[o]),
81
+ min: i,
82
+ q1: a,
83
+ median: s,
84
+ q3: c,
85
+ max: l,
86
+ outliers: []
87
+ };
88
+ });
89
+ let l = /* @__PURE__ */ new Map();
90
+ for (let e of c) {
91
+ let r = n(e[o]), i = e[s];
92
+ if (!t(i)) throw Error("Box plot observations must be finite numbers.");
93
+ let a = l.get(r) ?? [];
94
+ if (a.push(i), !l.has(r) && l.size >= 50) throw Error("Too many box plot groups; filter to 50 groups or fewer.");
95
+ l.set(r, a);
96
+ }
97
+ return [...l].map(([e, t]) => {
98
+ t.sort((e, t) => e - t);
99
+ let n = i(t, .25), r = i(t, .5), a = i(t, .75), o = a - n, s = t.filter((e) => e >= n - 1.5 * o && e <= a + 1.5 * o);
100
+ return {
101
+ label: e,
102
+ min: s[0] ?? n,
103
+ q1: n,
104
+ median: r,
105
+ q3: a,
106
+ max: s[s.length - 1] ?? a,
107
+ outliers: t.filter((e) => e < n - 1.5 * o || e > a + 1.5 * o),
108
+ count: t.length
109
+ };
110
+ });
111
+ }
112
+ //#endregion
113
+ export { a as normalizeBoxPlot, r as normalizeSankey };
@@ -0,0 +1,10 @@
1
+ export interface BoundMapMarker {
2
+ name: string;
3
+ lat: number;
4
+ lng: number;
5
+ value?: number;
6
+ popup?: string;
7
+ color?: string;
8
+ }
9
+ /** Accept standard marker rows or configured raw source fields, without inventing coordinates. */
10
+ export declare function normalizeMapMarkers(input: unknown, config?: Record<string, unknown>): BoundMapMarker[];
@@ -0,0 +1,22 @@
1
+ //#region src/bigconsole/components/widgets/advanced/mapData.ts
2
+ function e(e, t = {}) {
3
+ if (!Array.isArray(e)) return [];
4
+ let n = typeof t.latitudeField == "string" ? t.latitudeField : "lat", r = typeof t.longitudeField == "string" ? t.longitudeField : "lng", i = typeof t.labelField == "string" ? t.labelField : "name", a = typeof t.valueField == "string" ? t.valueField : "value", o = [];
5
+ for (let t of e) {
6
+ if (!t || typeof t != "object" || Array.isArray(t)) continue;
7
+ let e = t[n], s = t[r];
8
+ if (typeof e != "number" || typeof s != "number" || !Number.isFinite(e) || !Number.isFinite(s) || Math.abs(e) > 90 || Math.abs(s) > 180) continue;
9
+ let c = t[i], l = t[a];
10
+ o.push({
11
+ name: typeof c == "string" || typeof c == "number" ? String(c) : "",
12
+ lat: e,
13
+ lng: s,
14
+ value: typeof l == "number" && Number.isFinite(l) ? l : void 0,
15
+ popup: typeof t.popup == "string" ? t.popup : void 0,
16
+ color: typeof t.color == "string" ? t.color : void 0
17
+ });
18
+ }
19
+ return o;
20
+ }
21
+ //#endregion
22
+ export { e as normalizeMapMarkers };
@@ -0,0 +1,15 @@
1
+ export interface WaterfallRow {
2
+ name: string;
3
+ range: [number, number];
4
+ delta: number;
5
+ cumulative: number;
6
+ isTotal: boolean;
7
+ sign: 'up' | 'down' | 'total';
8
+ original?: Record<string, unknown>;
9
+ }
10
+ export declare function buildWaterfallRows(data: Record<string, unknown>[], options?: {
11
+ labelField?: string;
12
+ valueField?: string;
13
+ showTotal?: boolean;
14
+ totalLabel?: string;
15
+ }): WaterfallRow[];
@@ -0,0 +1,28 @@
1
+ //#region src/bigconsole/components/widgets/advanced/waterfallData.ts
2
+ function e(e, t = {}) {
3
+ let n = t.labelField || "name", r = t.valueField || "value", i = 0, a = e.map((e) => {
4
+ let t = e[r], a = typeof t == "number" ? t : typeof t == "string" && t.trim() ? Number(t) : NaN;
5
+ if (!Number.isFinite(a)) throw Error("Waterfall changes must be finite numbers.");
6
+ let o = i;
7
+ if (i += a, !Number.isFinite(i)) throw Error("The cumulative waterfall value is too large.");
8
+ return {
9
+ name: String(e[n] ?? ""),
10
+ range: [Math.min(o, i), Math.max(o, i)],
11
+ delta: a,
12
+ cumulative: i,
13
+ isTotal: !1,
14
+ sign: a >= 0 ? "up" : "down",
15
+ original: e
16
+ };
17
+ });
18
+ return t.showTotal && a.length && a.push({
19
+ name: t.totalLabel || "Total",
20
+ range: [Math.min(0, i), Math.max(0, i)],
21
+ delta: i,
22
+ cumulative: i,
23
+ isTotal: !0,
24
+ sign: "total"
25
+ }), a;
26
+ }
27
+ //#endregion
28
+ export { e as buildWaterfallRows };
@@ -1,11 +1,11 @@
1
1
  import e from "./CalendarView.js";
2
2
  import { memo as t } from "react";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import { useI18n as r } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
3
+ import { useI18n as n } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
4
+ import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/bigconsole/components/widgets/calendar/CalendarWidget.tsx
6
6
  var i = t(function(t) {
7
- let { t: i } = r();
8
- return /* @__PURE__ */ n(e, {
7
+ let { t: i } = n();
8
+ return /* @__PURE__ */ r(e, {
9
9
  ...t,
10
10
  t: i
11
11
  });