@burdenoff/microfe-bigconsole 2026.1012.4 → 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 (129) hide show
  1. package/dist/bigconsole/BigConsoleRoutes.js +149 -140
  2. package/dist/bigconsole/assistant/assistantProduct.js +4 -1
  3. package/dist/bigconsole/assistant/displayCopy.d.ts +32 -0
  4. package/dist/bigconsole/assistant/pageContext.d.ts +14 -0
  5. package/dist/bigconsole/assistant/pageContext.js +6 -1
  6. package/dist/bigconsole/assistant/pageControls.d.ts +81 -0
  7. package/dist/bigconsole/assistant/pageControls.js +169 -0
  8. package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
  9. package/dist/bigconsole/assistant/previewControl.js +10 -0
  10. package/dist/bigconsole/assistant/recordAdapters.js +27 -26
  11. package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
  12. package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
  13. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +9 -9
  14. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  15. package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
  16. package/dist/bigconsole/components/common/SortBySelect.js +29 -0
  17. package/dist/bigconsole/components/common/index.d.ts +1 -0
  18. package/dist/bigconsole/components/common/index.js +1 -0
  19. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  20. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  21. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  22. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +15 -15
  23. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  24. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  25. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  26. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  27. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +153 -153
  28. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  29. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  30. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +134 -134
  31. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  32. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  33. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  34. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  35. package/dist/bigconsole/components/dashboard/WidgetPalette.js +46 -46
  36. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  37. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  38. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  39. package/dist/bigconsole/components/datasink/DataSinkCard.js +51 -50
  40. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  41. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  42. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  43. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  44. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  45. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  46. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  47. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  48. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  49. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
  50. package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
  51. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  52. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  53. package/dist/bigconsole/components/widgets/PropertiesPanel.js +507 -499
  54. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +14 -14
  55. package/dist/bigconsole/components/widgets/advanced/AdvancedWidgets.js +68 -67
  56. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.d.ts +7 -0
  57. package/dist/bigconsole/components/widgets/advanced/boxPlotDescription.js +12 -0
  58. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  59. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  60. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  61. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  62. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  63. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  64. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  65. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  66. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  67. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  68. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  69. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  70. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  71. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  72. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  73. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  74. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  75. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  76. package/dist/bigconsole/constants/backendErrors.js +94 -0
  77. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
  78. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +67 -67
  79. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +14 -0
  80. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +32 -0
  81. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +23 -0
  82. package/dist/bigconsole/hooks/useDataSinkAlerts.js +138 -113
  83. package/dist/bigconsole/hooks/useDrilldown.js +3 -3
  84. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  85. package/dist/bigconsole/pages/AdminPage.js +130 -130
  86. package/dist/bigconsole/pages/DashboardBuilderPage.js +72 -60
  87. package/dist/bigconsole/pages/DashboardViewPage.js +244 -221
  88. package/dist/bigconsole/pages/DashboardsPage.js +269 -221
  89. package/dist/bigconsole/pages/DataParsersPage.js +180 -157
  90. package/dist/bigconsole/pages/DataSinkAlertsPage.js +62 -55
  91. package/dist/bigconsole/pages/DataSinkBuilderPage.js +252 -234
  92. package/dist/bigconsole/pages/DataSinkViewPage.js +1 -1
  93. package/dist/bigconsole/pages/DataSinksPage.js +335 -299
  94. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  95. package/dist/bigconsole/pages/InsightsPage.js +279 -265
  96. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  97. package/dist/bigconsole/pages/ParserBuilderPage.js +229 -213
  98. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  99. package/dist/bigconsole/pages/PipelineBuilderPage.js +256 -214
  100. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  101. package/dist/bigconsole/pages/PipelinesPage.js +107 -88
  102. package/dist/bigconsole/pages/SettingsPage.js +179 -173
  103. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  104. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  105. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  106. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  107. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
  108. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +69 -69
  109. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  110. package/dist/bigconsole/store/widgetStore.d.ts +12 -0
  111. package/dist/bigconsole/store/widgetStore.js +3 -1
  112. package/dist/bigconsole/utils/backendError.d.ts +18 -0
  113. package/dist/bigconsole/utils/backendError.js +42 -0
  114. package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
  115. package/dist/bigconsole/utils/dashboardList.js +15 -0
  116. package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
  117. package/dist/bigconsole/utils/dataSinkList.js +15 -0
  118. package/dist/bigconsole/utils/formDirty.d.ts +82 -0
  119. package/dist/bigconsole/utils/formDirty.js +21 -0
  120. package/dist/bigconsole/utils/insightsDraft.d.ts +29 -0
  121. package/dist/bigconsole/utils/insightsDraft.js +8 -0
  122. package/dist/bigconsole/utils/layoutBaseline.d.ts +130 -0
  123. package/dist/bigconsole/utils/layoutBaseline.js +96 -0
  124. package/dist/bigconsole/utils/listSort.d.ts +80 -0
  125. package/dist/bigconsole/utils/listSort.js +85 -0
  126. package/dist/bigconsole/utils/widgetFormDirty.d.ts +16 -0
  127. package/dist/bigconsole/utils/widgetFormDirty.js +13 -0
  128. package/dist/bigconsole/workflowOpen.js +15 -14
  129. package/package.json +3 -3
@@ -0,0 +1,169 @@
1
+ import { LIST_SORT_COPY as e } from "../utils/listSort.js";
2
+ import { enumFilter as t, filtersOf as n, searchOf as r, sortOf as i, tabsOf as a } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
3
+ //#region src/bigconsole/assistant/pageControls.ts
4
+ var o = (e) => e.filter.options().length > 0;
5
+ function s(t) {
6
+ return i({
7
+ fields: [{
8
+ id: "name",
9
+ label: t.tr(e.fieldName.key, e.fieldName.en),
10
+ asc: "name-asc",
11
+ desc: "name-desc"
12
+ }, {
13
+ id: "updated",
14
+ label: t.tr(e.fieldUpdated.key, e.fieldUpdated.en),
15
+ asc: "updated-asc",
16
+ desc: "updated-desc"
17
+ }],
18
+ value: t.value,
19
+ set: t.set
20
+ });
21
+ }
22
+ function c(e, t, i, a) {
23
+ let s = t.filter(o);
24
+ return {
25
+ page: e,
26
+ ...s.length > 0 ? { filters: n(s) } : {},
27
+ ...a ? { sort: a } : {},
28
+ search: r(i)
29
+ };
30
+ }
31
+ function l(e) {
32
+ let n = t({
33
+ id: "category",
34
+ label: e.tr("bigconsole.dashboards.filters.category", "Category"),
35
+ options: [{
36
+ value: "",
37
+ label: e.tr("bigconsole.dashboards.filters.allCategories", "All categories")
38
+ }, ...e.categories.map((e) => ({
39
+ value: e,
40
+ label: e
41
+ }))],
42
+ neutral: "",
43
+ value: e.category,
44
+ set: e.setCategory
45
+ }), r = t({
46
+ id: "status",
47
+ label: e.tr("bigconsole.dashboards.filters.status", "Status"),
48
+ options: [{
49
+ value: "",
50
+ label: e.tr("bigconsole.dashboards.filters.allStatuses", "All statuses")
51
+ }, ...e.statuses],
52
+ neutral: "",
53
+ value: e.status,
54
+ set: e.setStatus
55
+ });
56
+ return c(e.tr("bigconsole.dashboards.title", "Dashboards"), [n, r], e.setSearch, s({
57
+ tr: e.tr,
58
+ value: e.sort,
59
+ set: e.setSort
60
+ }));
61
+ }
62
+ function u(e) {
63
+ let n = t({
64
+ id: "setupState",
65
+ label: e.tr("bigconsole.dataSinks.filters.setupState.label", "Setup state"),
66
+ options: e.setupStateOptions,
67
+ neutral: "all",
68
+ value: e.setupState,
69
+ set: e.setSetupState
70
+ }), r = t({
71
+ id: "status",
72
+ label: e.tr("bigconsole.dataSinks.table.status", "Status"),
73
+ options: [
74
+ {
75
+ value: "all",
76
+ label: e.tr("bigconsole.dataSinks.filters.status.all", "All Statuses")
77
+ },
78
+ {
79
+ value: "ready",
80
+ label: e.tr("bigconsole.dataSinks.filters.status.ready", "Ready")
81
+ },
82
+ {
83
+ value: "error",
84
+ label: e.tr("bigconsole.dataSinks.filters.status.error", "Error")
85
+ },
86
+ {
87
+ value: "stale",
88
+ label: e.tr("bigconsole.dataSinks.filters.status.stale", "Stale")
89
+ },
90
+ {
91
+ value: "refreshing",
92
+ label: e.tr("bigconsole.dataSinks.filters.status.refreshing", "Refreshing")
93
+ }
94
+ ],
95
+ neutral: "all",
96
+ value: e.status ?? "all",
97
+ set: (t) => e.setStatus(t === "all" ? null : t)
98
+ }), i = t({
99
+ id: "active",
100
+ label: e.tr("bigconsole.dataSinks.table.active", "Active"),
101
+ options: [
102
+ {
103
+ value: "all",
104
+ label: e.tr("bigconsole.dataSinks.filters.active.all", "All")
105
+ },
106
+ {
107
+ value: "true",
108
+ label: e.tr("bigconsole.dataSinks.filters.active.active", "Active")
109
+ },
110
+ {
111
+ value: "false",
112
+ label: e.tr("bigconsole.dataSinks.filters.active.inactive", "Inactive")
113
+ }
114
+ ],
115
+ neutral: "all",
116
+ value: e.active === null ? "all" : e.active ? "true" : "false",
117
+ set: (t) => e.setActive(t === "all" ? null : t === "true")
118
+ });
119
+ return c(e.tr("bigconsole.dataSinks.title", "Data Sinks"), [
120
+ n,
121
+ r,
122
+ i
123
+ ], e.setSearch, s({
124
+ tr: e.tr,
125
+ value: e.sort,
126
+ set: e.setSort
127
+ }));
128
+ }
129
+ function d(e) {
130
+ let n = t({
131
+ id: "type",
132
+ label: e.tr("bigconsole.parsers.view.type", "Type"),
133
+ options: e.typeOptions,
134
+ neutral: "all",
135
+ value: e.type,
136
+ set: e.setType
137
+ }), r = t({
138
+ id: "status",
139
+ label: e.tr("bigconsole.parsers.view.status", "Status"),
140
+ options: e.statusOptions,
141
+ neutral: "all",
142
+ value: e.status,
143
+ set: e.setStatus
144
+ });
145
+ return c(e.tr("bigconsole.parsers.list.title", "Data Parsers"), [n, r], e.setSearch, void 0);
146
+ }
147
+ function f(e) {
148
+ let n = t({
149
+ id: "status",
150
+ label: e.tr("bigconsole.pipelines.view.detailStatus", "Status"),
151
+ options: e.statusOptions,
152
+ neutral: "all",
153
+ value: e.status,
154
+ set: e.setStatus
155
+ });
156
+ return c(e.tr("bigconsole.pipelines.list.heading", "Pipelines"), [n], e.setSearch, void 0);
157
+ }
158
+ function p(e) {
159
+ return e.tabs.length === 0 || e.current === null ? null : {
160
+ page: e.dashboardName,
161
+ tabs: a({
162
+ items: e.tabs,
163
+ value: e.current,
164
+ set: e.select
165
+ })
166
+ };
167
+ }
168
+ //#endregion
169
+ export { p as dashboardPageTabs, l as dashboardsListControls, u as dataSinksListControls, d as parsersListControls, f as pipelinesListControls };
@@ -0,0 +1,16 @@
1
+ import { PreviewControl } from '@burdenoff/fe-libs/shared/assistant/appControls/types';
2
+
3
+ /** What the control needs from the run store. `isOpen` is read FRESH on every call. */
4
+ export interface PreviewRunPort {
5
+ hasRun: boolean;
6
+ isOpen: () => boolean;
7
+ open: () => void;
8
+ close: () => void;
9
+ }
10
+ /**
11
+ * Null without a run: no Preview button is on screen then, so "open the AI
12
+ * preview" goes to the model. Drawn on the page beside the assistant, so the
13
+ * surface is "page" (Voice may open it). Open and close are SET: `already`
14
+ * when it is in the state asked for.
15
+ */
16
+ export declare function previewControlOf(run: PreviewRunPort): PreviewControl | null;
@@ -0,0 +1,10 @@
1
+ //#region src/bigconsole/assistant/previewControl.ts
2
+ function e(e) {
3
+ return e.hasRun ? {
4
+ surface: "page",
5
+ run: () => e.isOpen() ? { status: "already" } : (e.open(), { status: "done" }),
6
+ close: () => e.isOpen() ? (e.close(), { status: "done" }) : { status: "already" }
7
+ } : null;
8
+ }
9
+ //#endregion
10
+ export { e as previewControlOf };
@@ -1,19 +1,20 @@
1
1
  import { getStoredWorkspaceId as e, graphqlFetch as t } from "@burdenoff/fe-libs/shared/graphql";
2
- var n = "\n query AssistantFindDashboards($search: String, $first: Int) {\n listDashboards(search: $search, first: $first, includeArchived: false) {\n edges { node { id name workspaceId } }\n }\n }\n", r = "\n query AssistantFindDataSinks($search: String, $first: Int) {\n listDataSinks(search: $search, first: $first) {\n edges { node { id name key workspaceId deletedAt } }\n }\n }\n", i = {
2
+ import { normaliseRecordName as n } from "@burdenoff/fe-libs/shared/assistant/uiActions/recordNames";
3
+ var r = "\n query AssistantFindDashboards($search: String, $first: Int) {\n listDashboards(search: $search, first: $first, includeArchived: false) {\n edges { node { id name workspaceId } }\n }\n }\n", i = "\n query AssistantFindDataSinks($search: String, $first: Int) {\n listDataSinks(search: $search, first: $first) {\n edges { node { id name key workspaceId deletedAt } }\n }\n }\n", a = {
3
4
  graphqlFetch: t,
4
5
  getWorkspaceId: e
5
- }, a = (e) => e.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\s+/g, " ").trim(), o = (e) => [...new Set(e.split(" ").filter((e) => e.length > 0))].sort((e, t) => [...t].length - [...e].length), s = (e) => {
6
- let t = e.filter((e) => [...e].length >= 3);
7
- return t.length > 0 ? t : e.filter((e) => [...e].length === 2);
6
+ }, o = n, s = (e) => [...new Set(e.split(" ").filter((e) => e.length > 0))].sort((e, t) => [...t].length - [...e].length), c = "and", l = (e) => {
7
+ let t = e.filter((e) => [...e].length >= 3), n = [...t.filter((e) => e !== c), ...t.filter((e) => e === c)];
8
+ return n.length > 0 ? n : e.filter((e) => [...e].length === 2);
8
9
  };
9
- async function c(e, t, n, r, i, c, l) {
10
+ async function u(e, t, n, r, i, a, c) {
10
11
  let u = e.getWorkspaceId();
11
12
  if (!u) return [];
12
- let d = a(i), f = o(d);
13
+ let d = o(i), f = s(d);
13
14
  if (f.length === 0) return [];
14
- let [p, m] = s(f), h = async (i) => {
15
- if (c.aborted) return null;
16
- let a = await e.graphqlFetch({
15
+ let [p, m] = l(f), h = async (i) => {
16
+ if (a.aborted) return null;
17
+ let o = await e.graphqlFetch({
17
18
  gateway: "workspace",
18
19
  query: t,
19
20
  operationName: n,
@@ -24,35 +25,35 @@ async function c(e, t, n, r, i, c, l) {
24
25
  workspaceToken: !0,
25
26
  workspaceId: u,
26
27
  organizationId: !0,
27
- signal: c,
28
+ signal: a,
28
29
  suppressGlobalErrorEvent: !0
29
30
  });
30
- if (a.errors?.length) return null;
31
- let o = a.data?.[r]?.edges;
32
- if (!Array.isArray(o)) return null;
33
- let s = [];
34
- for (let e of o) {
31
+ if (o.errors?.length) return null;
32
+ let s = o.data?.[r]?.edges;
33
+ if (!Array.isArray(s)) return null;
34
+ let l = [];
35
+ for (let e of s) {
35
36
  let t = e?.node;
36
37
  if (!t || typeof t.id != "string" || t.id.length === 0 || typeof t.workspaceId == "string" && t.workspaceId !== u) continue;
37
- let n = l(t);
38
- n !== null && s.push({
38
+ let n = c(t);
39
+ n !== null && l.push({
39
40
  params: { id: t.id },
40
41
  name: n
41
42
  });
42
43
  }
43
44
  return {
44
- rows: o.length,
45
- matches: s
45
+ rows: s.length,
46
+ matches: l
46
47
  };
47
- }, g = (e) => h(e).catch(() => null), _ = (e) => a(e.name) === d, [v, y] = await Promise.all([h(d), p !== void 0 && p !== d ? g(p) : null]);
48
+ }, g = (e) => h(e).catch(() => null), _ = (e) => o(e.name) === d, [v, y] = await Promise.all([h(d), p !== void 0 && p !== d ? g(p) : null]);
48
49
  if (v === null) return [];
49
50
  let b = [...v.matches], x = (e) => {
50
51
  for (let t of e?.matches ?? []) _(t) && !b.some((e) => e.params.id === t.params.id) && b.push(t);
51
52
  };
52
53
  return x(y), y !== null && y.rows >= 10 && !b.some(_) && m !== void 0 && e.getWorkspaceId() === u && x(await g(m)), b;
53
54
  }
54
- var l = (e) => typeof e == "string" && e.trim().length > 0 ? e.trim() : null;
55
- function u(e = i) {
55
+ var d = (e) => typeof e == "string" && e.trim().length > 0 ? e.trim() : null;
56
+ function f(e = a) {
56
57
  return [{
57
58
  id: "bigconsole-dashboard",
58
59
  nouns: ["dashboard", "dashboards"],
@@ -61,7 +62,7 @@ function u(e = i) {
61
62
  fallback: "dashboard"
62
63
  },
63
64
  entityRouteId: "bigconsole-dashboard",
64
- find: (t, r) => c(e, n, "AssistantFindDashboards", "listDashboards", t, r, (e) => l(e.name))
65
+ find: (t, n) => u(e, r, "AssistantFindDashboards", "listDashboards", t, n, (e) => d(e.name))
65
66
  }, {
66
67
  id: "bigconsole-datasink",
67
68
  nouns: [
@@ -77,9 +78,9 @@ function u(e = i) {
77
78
  fallback: "data source"
78
79
  },
79
80
  entityRouteId: "bigconsole-datasink",
80
- find: (t, n) => c(e, r, "AssistantFindDataSinks", "listDataSinks", t, n, (e) => e.deletedAt ? null : l(e.name) ?? l(e.key))
81
+ find: (t, n) => u(e, i, "AssistantFindDataSinks", "listDataSinks", t, n, (e) => e.deletedAt ? null : d(e.name) ?? d(e.key))
81
82
  }];
82
83
  }
83
- var d = u();
84
+ var p = f();
84
85
  //#endregion
85
- export { d as BIGCONSOLE_RECORD_ADAPTERS };
86
+ export { p as BIGCONSOLE_RECORD_ADAPTERS };
@@ -0,0 +1,2 @@
1
+ /** Call it BEFORE any early `return null` in the surface. */
2
+ export declare function useBigConsolePreviewControl(): void;
@@ -0,0 +1,20 @@
1
+ import { useAssistantRunStore as e } from "./assistantRunStore.js";
2
+ import { previewControlOf as t } from "./previewControl.js";
3
+ import { useMemo as n } from "react";
4
+ import { useAssistantControl as r } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
5
+ //#region src/bigconsole/assistant/usePreviewControl.ts
6
+ function i() {
7
+ let i = e((e) => e.hasRun), a = e((e) => e.openPreview), o = e((e) => e.closePreview);
8
+ r("assistant.preview", n(() => t({
9
+ hasRun: i,
10
+ isOpen: () => e.getState().previewOpen,
11
+ open: a,
12
+ close: o
13
+ }), [
14
+ i,
15
+ a,
16
+ o
17
+ ]));
18
+ }
19
+ //#endregion
20
+ export { i as useBigConsolePreviewControl };
@@ -9,8 +9,8 @@ import o from "../../widgets/progress/ProgressConfig.js";
9
9
  import s from "../../widgets/table/TableConfig.js";
10
10
  import { AdvancedWidgetConfig as c } from "../../widgets/advanced/AdvancedWidgetConfig.js";
11
11
  import { memo as l } from "react";
12
- import { jsx as u } from "react/jsx-runtime";
13
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { useI18n as u } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
+ import { jsx as d } from "react/jsx-runtime";
14
14
  //#region src/bigconsole/components/builder/inspector/AppearanceSection.tsx
15
15
  function f(e) {
16
16
  return e;
@@ -31,35 +31,35 @@ function p(e) {
31
31
  }
32
32
  }
33
33
  var m = l(function({ widgetType: t, config: n, onChange: r }) {
34
- let { t: i } = d(), a = p(t);
34
+ let { t: i } = u(), a = p(t);
35
35
  return [
36
36
  "map",
37
37
  "waterfall",
38
38
  "sankey",
39
39
  "box_plot"
40
- ].includes(t) ? /* @__PURE__ */ u(e, {
40
+ ].includes(t) ? /* @__PURE__ */ d(e, {
41
41
  title: i("bigconsole.widget.advanced.fieldMappings", "Field mappings"),
42
42
  "data-testid": "advanced-widget-config",
43
- children: /* @__PURE__ */ u(c, {
43
+ children: /* @__PURE__ */ d(c, {
44
44
  type: t,
45
45
  config: n,
46
46
  onChange: r
47
47
  })
48
- }) : a ? /* @__PURE__ */ u(e, {
48
+ }) : a ? /* @__PURE__ */ d(e, {
49
49
  title: "Style",
50
50
  description: "Presentation options for this widget type. Data and identity live on the other tabs.",
51
51
  "data-testid": "widget-inspector-style",
52
- children: /* @__PURE__ */ u(a, {
52
+ children: /* @__PURE__ */ d(a, {
53
53
  config: n,
54
54
  onChange: r
55
55
  })
56
- }) : /* @__PURE__ */ u(e, {
56
+ }) : /* @__PURE__ */ d(e, {
57
57
  tone: "info",
58
58
  padding: "compact",
59
59
  title: "No style options",
60
60
  headingLevel: 3,
61
61
  "data-testid": "widget-inspector-style-empty",
62
- children: /* @__PURE__ */ u("p", {
62
+ children: /* @__PURE__ */ d("p", {
63
63
  className: "text-sm text-text-secondary",
64
64
  children: "This widget type renders from its data and template, so there is nothing to style here."
65
65
  })
@@ -3,8 +3,8 @@ import "../../common/index.js";
3
3
  import n from "../../parser/DataSinkSelector.js";
4
4
  import r from "../../parser/ParserSelector.js";
5
5
  import { Input as i, Label as a, Spinner as o } from "@burdenoff/fe-libs/ui";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
8
  //#region src/bigconsole/components/builder/inspector/DataBindingSection.tsx
9
9
  var u = {
10
10
  unbound: "info",
@@ -14,7 +14,7 @@ var u = {
14
14
  parser_error: "danger",
15
15
  field_mismatch: "warning"
16
16
  }, d = ({ consoleId: d, binding: f, resolvedParser: p, dataSinkKey: m, dataPath: h, status: g, resolving: _ = !1, missingFields: v = [], preview: y, error: b, onDataSinkChange: x, onParserChange: S, onDataPathChange: C }) => {
17
- let { t: w } = l(), T = {
17
+ let { t: w } = s(), T = {
18
18
  unbound: w("bigconsole.builder.dataBinding.status.unbound", "Select a DataSink to begin"),
19
19
  loading: _ ? w("bigconsole.parsers.selector.loading", "Loading parsers...") : w("bigconsole.builder.dataBinding.status.loading", "Testing parser and detecting fields…"),
20
20
  bound: w("bigconsole.builder.dataBinding.status.bound", "Binding ready"),
@@ -22,33 +22,33 @@ var u = {
22
22
  parser_error: w("bigconsole.builder.dataBinding.status.parserError", "Parser test failed"),
23
23
  field_mismatch: w("bigconsole.builder.dataBinding.status.fieldMismatch", "Some mapped fields were not found")
24
24
  };
25
- return /* @__PURE__ */ c(t, { children: [
26
- /* @__PURE__ */ s(e, {
25
+ return /* @__PURE__ */ l(t, { children: [
26
+ /* @__PURE__ */ c(e, {
27
27
  title: "Data source",
28
28
  description: w("bigconsole.builder.dataBinding.intro", "Connect this widget to a DataSink and Parser to display transformed data."),
29
29
  "data-testid": "widget-inspector-data-source",
30
- children: /* @__PURE__ */ c("div", {
30
+ children: /* @__PURE__ */ l("div", {
31
31
  className: "flex flex-col gap-form-gap",
32
- children: [/* @__PURE__ */ c("div", {
32
+ children: [/* @__PURE__ */ l("div", {
33
33
  className: "space-y-2",
34
34
  children: [
35
- /* @__PURE__ */ s(a, { children: w("bigconsole.builder.dataBinding.dataSinkLabel", "DataSink") }),
36
- /* @__PURE__ */ s(n, {
35
+ /* @__PURE__ */ c(a, { children: w("bigconsole.builder.dataBinding.dataSinkLabel", "DataSink") }),
36
+ /* @__PURE__ */ c(n, {
37
37
  value: m,
38
38
  onChange: x,
39
39
  placeholder: w("bigconsole.builder.dataBinding.dataSinkPlaceholder", "Select a DataSink...")
40
40
  }),
41
- m && /* @__PURE__ */ c("p", {
41
+ m && /* @__PURE__ */ l("p", {
42
42
  className: "text-xs text-text-secondary",
43
- children: [w("bigconsole.builder.dataBinding.keyLabel", "Key: {{key}}", { key: m }), f.source.ref && /* @__PURE__ */ s("span", {
43
+ children: [w("bigconsole.builder.dataBinding.keyLabel", "Key: {{key}}", { key: m }), f.source.ref && /* @__PURE__ */ c("span", {
44
44
  className: "ml-2 text-text-muted",
45
45
  children: w("bigconsole.builder.dataBinding.idLabel", "ID: {{id}}...", { id: f.source.ref.slice(0, 8) })
46
46
  })]
47
47
  })
48
48
  ]
49
- }), /* @__PURE__ */ c("div", {
49
+ }), /* @__PURE__ */ l("div", {
50
50
  className: "space-y-2",
51
- children: [/* @__PURE__ */ s(a, { children: w("bigconsole.builder.dataBinding.parserLabel", "Parser") }), /* @__PURE__ */ s(r, {
51
+ children: [/* @__PURE__ */ c(a, { children: w("bigconsole.builder.dataBinding.parserLabel", "Parser") }), /* @__PURE__ */ c(r, {
52
52
  consoleId: d,
53
53
  value: f.parserId ?? null,
54
54
  resolvedParser: p,
@@ -61,53 +61,53 @@ var u = {
61
61
  })]
62
62
  })
63
63
  }),
64
- /* @__PURE__ */ s(e, {
64
+ /* @__PURE__ */ c(e, {
65
65
  title: T[g],
66
66
  tone: u[g],
67
67
  padding: "compact",
68
68
  headingLevel: 3,
69
- icon: g === "loading" ? /* @__PURE__ */ s(o, { style: {
69
+ icon: g === "loading" ? /* @__PURE__ */ c(o, { style: {
70
70
  width: "14px",
71
71
  height: "14px"
72
72
  } }) : void 0,
73
73
  "data-testid": "widget-inspector-binding-status",
74
- children: /* @__PURE__ */ c("div", {
74
+ children: /* @__PURE__ */ l("div", {
75
75
  role: "status",
76
76
  "aria-live": "polite",
77
77
  className: "min-w-0 space-y-1",
78
78
  children: [
79
- /* @__PURE__ */ s("p", {
79
+ /* @__PURE__ */ c("p", {
80
80
  className: "sr-only",
81
81
  children: T[g]
82
82
  }),
83
- b && /* @__PURE__ */ s("p", {
83
+ b && /* @__PURE__ */ c("p", {
84
84
  className: "break-words text-xs text-[var(--color-status-error-text)]",
85
85
  children: b
86
86
  }),
87
- v.length > 0 && /* @__PURE__ */ s("p", {
87
+ v.length > 0 && /* @__PURE__ */ c("p", {
88
88
  className: "break-words text-xs text-[var(--color-status-warning-text)]",
89
89
  children: w("bigconsole.builder.dataBinding.missingFields", "Missing: {{fields}}", { fields: v.join(", ") })
90
90
  }),
91
- !b && v.length === 0 && g === "bound" && y !== void 0 && /* @__PURE__ */ s("p", {
91
+ !b && v.length === 0 && g === "bound" && y !== void 0 && /* @__PURE__ */ c("p", {
92
92
  className: "text-xs text-text-secondary",
93
93
  children: "The parser ran and its output matches the fields this widget expects."
94
94
  })
95
95
  ]
96
96
  })
97
97
  }),
98
- f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */ s(e, {
98
+ f.parserId && Object.keys(f.fields).length > 0 && /* @__PURE__ */ c(e, {
99
99
  emphasis: "muted",
100
100
  padding: "compact",
101
101
  title: w("bigconsole.builder.dataBinding.fieldMappingsConfigured", "Field mappings configured"),
102
102
  headingLevel: 3,
103
- children: /* @__PURE__ */ s("div", {
103
+ children: /* @__PURE__ */ c("div", {
104
104
  className: "min-w-0 space-y-1 text-xs text-text-secondary",
105
- children: Object.entries(f.fields).map(([e, t]) => /* @__PURE__ */ c("p", {
105
+ children: Object.entries(f.fields).map(([e, t]) => /* @__PURE__ */ l("p", {
106
106
  className: "break-words",
107
107
  children: [
108
108
  e,
109
109
  ": ",
110
- /* @__PURE__ */ s("code", {
110
+ /* @__PURE__ */ c("code", {
111
111
  className: "rounded bg-bg-surface px-1 font-mono",
112
112
  children: t
113
113
  })
@@ -115,36 +115,36 @@ var u = {
115
115
  }, e))
116
116
  })
117
117
  }),
118
- y !== void 0 && /* @__PURE__ */ s(e, {
118
+ y !== void 0 && /* @__PURE__ */ c(e, {
119
119
  emphasis: "muted",
120
120
  padding: "compact",
121
121
  title: w("bigconsole.builder.dataBinding.livePreviewLabel", "Live Preview"),
122
122
  description: "Raw parser output, exactly as the widget receives it.",
123
123
  headingLevel: 3,
124
- children: /* @__PURE__ */ s("pre", {
124
+ children: /* @__PURE__ */ c("pre", {
125
125
  className: "max-h-40 min-w-0 overflow-auto rounded-input border border-[var(--color-border-subtle)] bg-bg-surface p-3 text-xs text-text-secondary",
126
126
  children: JSON.stringify(y, null, 2)
127
127
  })
128
128
  }),
129
- /* @__PURE__ */ s(e, {
129
+ /* @__PURE__ */ c(e, {
130
130
  emphasis: "muted",
131
131
  padding: "compact",
132
132
  title: "Data path",
133
133
  headingLevel: 3,
134
- children: /* @__PURE__ */ c("div", {
134
+ children: /* @__PURE__ */ l("div", {
135
135
  className: "space-y-2",
136
136
  children: [
137
- /* @__PURE__ */ s(a, {
137
+ /* @__PURE__ */ c(a, {
138
138
  htmlFor: "widget-inspector-data-path",
139
139
  children: w("bigconsole.builder.dataBinding.dataPathLabel", "Data Path (Optional)")
140
140
  }),
141
- /* @__PURE__ */ s(i, {
141
+ /* @__PURE__ */ c(i, {
142
142
  id: "widget-inspector-data-path",
143
143
  value: h ?? "",
144
144
  onChange: (e) => C(e.target.value || void 0),
145
145
  placeholder: w("bigconsole.builder.dataBinding.dataPathPlaceholder", "e.g., summary.totalRevenue")
146
146
  }),
147
- /* @__PURE__ */ s("p", {
147
+ /* @__PURE__ */ c("p", {
148
148
  className: "text-xs text-text-secondary",
149
149
  children: w("bigconsole.builder.dataBinding.dataPathHelp", "Path to extract specific data from the parser output (dot notation)")
150
150
  })
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { ListSortOption, ListSortValue } from '../../utils/listSort';
3
+
4
+ export interface SortBySelectProps {
5
+ /** The visible label, already translated ("Sort by"). */
6
+ label: string;
7
+ value: ListSortValue;
8
+ options: readonly ListSortOption[];
9
+ onChange: (value: ListSortValue) => void;
10
+ }
11
+ export declare const SortBySelect: FC<SortBySelectProps>;
@@ -0,0 +1,29 @@
1
+ import { memo as e } from "react";
2
+ import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "@burdenoff/fe-libs/ui";
3
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ //#region src/bigconsole/components/common/SortBySelect.tsx
5
+ var c = (e, t) => t.some((t) => t.value === e), l = e(function({ label: e, value: l, options: u, onChange: d }) {
6
+ return /* @__PURE__ */ s("div", {
7
+ className: "flex min-w-0 items-center gap-control-gap",
8
+ "data-testid": "sort-by",
9
+ children: [/* @__PURE__ */ o("span", {
10
+ className: "shrink-0 text-sm text-text-muted",
11
+ children: e
12
+ }), /* @__PURE__ */ s(t, {
13
+ value: l,
14
+ onValueChange: (e) => {
15
+ c(e, u) && d(e);
16
+ },
17
+ children: [/* @__PURE__ */ o(i, {
18
+ "aria-label": e,
19
+ style: { width: "min(100%, 210px)" },
20
+ children: /* @__PURE__ */ o(a, {})
21
+ }), /* @__PURE__ */ o(n, { children: u.map((e) => /* @__PURE__ */ o(r, {
22
+ value: e.value,
23
+ children: e.label
24
+ }, e.value)) })]
25
+ })]
26
+ });
27
+ });
28
+ //#endregion
29
+ export { l as SortBySelect };
@@ -1,3 +1,4 @@
1
1
  export { Section, SectionHeader, SectionStack } from './Section';
2
2
  export type { SectionHeadingLevel, SectionHeaderProps, SectionProps, SectionStackProps } from './Section';
3
3
  export { SECTION_FOCUS_RING, SECTION_MOTION, SECTION_STACK, sectionSurfaceClasses, sectionTitleClasses, type SectionEmphasis, type SectionPadding, type SectionTone, } from './sectionStyles';
4
+ export { SortBySelect, type SortBySelectProps } from './SortBySelect';
@@ -1,2 +1,3 @@
1
1
  import "./sectionStyles.js";
2
2
  import "./Section.js";
3
+ import "./SortBySelect.js";