@burdenoff/microfe-bigconsole 2026.805.2 → 2026.805.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +109 -113
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +115 -113
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +71 -62
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +90 -89
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +56 -54
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +126 -125
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +151 -150
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +77 -76
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +97 -96
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +172 -191
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +75 -83
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +151 -154
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +181 -190
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +110 -108
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +102 -103
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +36 -41
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +38 -37
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +113 -117
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +182 -197
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +166 -168
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +87 -86
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +196 -211
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +130 -128
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +66 -63
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -91
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +222 -215
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +149 -145
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +504 -470
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +44 -47
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +143 -142
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +101 -88
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +135 -134
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
- package/dist/bigconsole/components/widgets/form/FormWidget.js +167 -159
- package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +69 -68
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +64 -72
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +60 -59
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +57 -56
- package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +70 -69
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +35 -34
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +20 -19
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js.map +1 -1
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +178 -177
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +76 -75
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +183 -168
- package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +187 -180
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +40 -38
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +150 -148
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +181 -176
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +196 -192
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +223 -219
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +167 -170
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +204 -189
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +175 -169
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSourcesPage.js +8 -7
- package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +238 -208
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +464 -412
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +92 -90
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +221 -194
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +181 -184
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +128 -127
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +177 -172
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +121 -83
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +199 -193
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +129 -128
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +111 -109
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +127 -126
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +103 -103
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,41 +1,21 @@
|
|
|
1
1
|
import e from "../components/widgets/WidgetErrorBoundary.js";
|
|
2
2
|
import t from "../renderers/adapters/BigConsoleRenderer.js";
|
|
3
|
-
import { PROPOSABLE_WIDGET_TYPES as n, derivePreviewState as
|
|
4
|
-
import { localProposalSource as
|
|
5
|
-
import { memo as
|
|
6
|
-
import { AlertTriangle as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { PROPOSABLE_WIDGET_TYPES as n, derivePreviewState as r, validateProposal as i } from "./proposalContract.js";
|
|
4
|
+
import { localProposalSource as a } from "./proposalSource.js";
|
|
5
|
+
import { memo as o, useCallback as s, useEffect as c, useMemo as l, useState as u } from "react";
|
|
6
|
+
import { AlertTriangle as ee, Check as d, Loader2 as f, RefreshCw as p, Sparkles as m, X as te } from "lucide-react";
|
|
7
|
+
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
8
|
+
import { Button as g, Input as _, Label as v, Textarea as y } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
9
10
|
//#region src/bigconsole/customWidget/CustomWidgetProposalPanel.tsx
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
body: "Running the parser against the selected DataSink."
|
|
14
|
-
},
|
|
15
|
-
valid: {
|
|
16
|
-
title: "Preview",
|
|
17
|
-
body: ""
|
|
18
|
-
},
|
|
19
|
-
"no-data": {
|
|
20
|
-
title: "No data returned",
|
|
21
|
-
body: "The binding is valid but the parser returned no rows. The widget will render empty until the sink has data."
|
|
22
|
-
},
|
|
23
|
-
"field-mismatch": {
|
|
24
|
-
title: "Field mismatch",
|
|
25
|
-
body: "Some mapped fields are not present in the parser output. Fix the mapping below before approving."
|
|
26
|
-
},
|
|
27
|
-
"access-error": {
|
|
28
|
-
title: "Cannot read this data",
|
|
29
|
-
body: "You do not have access to the proposed DataSink or parser in this workspace."
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
function C(e) {
|
|
33
|
-
let t = (/* @__PURE__ */ new Date(0)).toISOString();
|
|
11
|
+
var ne = "w-full";
|
|
12
|
+
function C(e, t) {
|
|
13
|
+
let n = (/* @__PURE__ */ new Date(0)).toISOString();
|
|
34
14
|
return {
|
|
35
15
|
id: `preview-${e.id}`,
|
|
36
16
|
pageId: "preview",
|
|
37
17
|
type: e.widgetType,
|
|
38
|
-
title: e.presentation.title ||
|
|
18
|
+
title: e.presentation.title || t,
|
|
39
19
|
description: e.presentation.description,
|
|
40
20
|
dataSinkId: e.binding.dataSinkId || null,
|
|
41
21
|
parserId: e.binding.parserId || null,
|
|
@@ -53,18 +33,18 @@ function C(e) {
|
|
|
53
33
|
positionY: 0,
|
|
54
34
|
positionWidth: 6,
|
|
55
35
|
positionHeight: 4,
|
|
56
|
-
createdAt:
|
|
57
|
-
updatedAt:
|
|
36
|
+
createdAt: n,
|
|
37
|
+
updatedAt: n
|
|
58
38
|
};
|
|
59
39
|
}
|
|
60
|
-
function
|
|
40
|
+
function re(e) {
|
|
61
41
|
if (Array.isArray(e)) {
|
|
62
42
|
let t = e.find((e) => e && typeof e == "object");
|
|
63
43
|
return t ? Object.keys(t) : [];
|
|
64
44
|
}
|
|
65
45
|
if (e && typeof e == "object") return Object.keys(e);
|
|
66
46
|
}
|
|
67
|
-
function
|
|
47
|
+
function ie(e) {
|
|
68
48
|
if (Array.isArray(e)) return e.length;
|
|
69
49
|
if (e && typeof e == "object") {
|
|
70
50
|
let t = e.cells;
|
|
@@ -72,8 +52,29 @@ function T(e) {
|
|
|
72
52
|
}
|
|
73
53
|
return 0;
|
|
74
54
|
}
|
|
75
|
-
var
|
|
76
|
-
let
|
|
55
|
+
var w = o(function({ sinks: o, parsers: w, resolvePreviewData: T, onApprove: E, onClose: D, source: O = a }) {
|
|
56
|
+
let { t: k } = h(), A = l(() => ({
|
|
57
|
+
loading: {
|
|
58
|
+
title: k("bigconsole.widget.customWidget.preview.loading.title", "Building preview…"),
|
|
59
|
+
body: k("bigconsole.widget.customWidget.preview.loading.body", "Running the parser against the selected DataSink.")
|
|
60
|
+
},
|
|
61
|
+
valid: {
|
|
62
|
+
title: k("bigconsole.widget.customWidget.preview.valid.title", "Preview"),
|
|
63
|
+
body: ""
|
|
64
|
+
},
|
|
65
|
+
"no-data": {
|
|
66
|
+
title: k("bigconsole.widget.customWidget.preview.noData.title", "No data returned"),
|
|
67
|
+
body: k("bigconsole.widget.customWidget.preview.noData.body", "The binding is valid but the parser returned no rows. The widget will render empty until the sink has data.")
|
|
68
|
+
},
|
|
69
|
+
"field-mismatch": {
|
|
70
|
+
title: k("bigconsole.widget.customWidget.preview.fieldMismatch.title", "Field mismatch"),
|
|
71
|
+
body: k("bigconsole.widget.customWidget.preview.fieldMismatch.body", "Some mapped fields are not present in the parser output. Fix the mapping below before approving.")
|
|
72
|
+
},
|
|
73
|
+
"access-error": {
|
|
74
|
+
title: k("bigconsole.widget.customWidget.preview.accessError.title", "Cannot read this data"),
|
|
75
|
+
body: k("bigconsole.widget.customWidget.preview.accessError.body", "You do not have access to the proposed DataSink or parser in this workspace.")
|
|
76
|
+
}
|
|
77
|
+
}), [k]), [j, ae] = u(""), [M, N] = u(null), [P, F] = u(!1), [I, L] = u(!1), [R, z] = u(null), [B, V] = u(void 0), [H, U] = u(!1), [W, G] = u(!1), K = l(() => o.map((e) => e.id), [o]), q = l(() => w.map((e) => e.id), [w]), J = l(() => re(B), [B]), Y = l(() => M ? i(M, {
|
|
77
78
|
permittedDataSinkIds: K,
|
|
78
79
|
permittedParserIds: q,
|
|
79
80
|
availableFields: J
|
|
@@ -85,23 +86,23 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
85
86
|
K,
|
|
86
87
|
q,
|
|
87
88
|
J
|
|
88
|
-
]), X =
|
|
89
|
+
]), X = l(() => r(Y, {
|
|
89
90
|
loading: H,
|
|
90
91
|
accessError: W,
|
|
91
|
-
rowCount:
|
|
92
|
+
rowCount: ie(B)
|
|
92
93
|
}), [
|
|
93
94
|
Y,
|
|
94
95
|
H,
|
|
95
96
|
W,
|
|
96
97
|
B
|
|
97
98
|
]);
|
|
98
|
-
|
|
99
|
+
c(() => {
|
|
99
100
|
if (!M || !M.binding.dataSinkId) {
|
|
100
101
|
V(void 0);
|
|
101
102
|
return;
|
|
102
103
|
}
|
|
103
104
|
let e = !1;
|
|
104
|
-
return U(!0), G(!1),
|
|
105
|
+
return U(!0), G(!1), T(M).then((t) => {
|
|
105
106
|
e || V(t);
|
|
106
107
|
}).catch(() => {
|
|
107
108
|
e || (V(void 0), G(!0));
|
|
@@ -110,15 +111,15 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
110
111
|
}), () => {
|
|
111
112
|
e = !0;
|
|
112
113
|
};
|
|
113
|
-
}, [M ? `${M.binding.dataSinkId}|${M.binding.parserId ?? ""}|${M.binding.dataPath ?? ""}` : "",
|
|
114
|
-
let
|
|
114
|
+
}, [M ? `${M.binding.dataSinkId}|${M.binding.parserId ?? ""}|${M.binding.dataPath ?? ""}` : "", T]);
|
|
115
|
+
let oe = s(async () => {
|
|
115
116
|
if (j.trim()) {
|
|
116
117
|
F(!0), z(null);
|
|
117
118
|
try {
|
|
118
|
-
N(await
|
|
119
|
+
N(await O.propose({
|
|
119
120
|
prompt: j.trim(),
|
|
120
|
-
sinks:
|
|
121
|
-
parsers:
|
|
121
|
+
sinks: o,
|
|
122
|
+
parsers: w
|
|
122
123
|
}));
|
|
123
124
|
} finally {
|
|
124
125
|
F(!1);
|
|
@@ -126,20 +127,20 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
126
127
|
}
|
|
127
128
|
}, [
|
|
128
129
|
j,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
]), Z =
|
|
130
|
+
O,
|
|
131
|
+
o,
|
|
132
|
+
w
|
|
133
|
+
]), Z = s((e) => {
|
|
133
134
|
N((t) => t && e(t));
|
|
134
|
-
}, []),
|
|
135
|
+
}, []), se = s(() => {
|
|
135
136
|
N(null), V(void 0), G(!1), z(null);
|
|
136
|
-
}, []),
|
|
137
|
+
}, []), ce = s(async () => {
|
|
137
138
|
if (!(!M || !Y.canApprove)) {
|
|
138
139
|
L(!0), z(null);
|
|
139
140
|
try {
|
|
140
|
-
await
|
|
141
|
+
await E(M), D();
|
|
141
142
|
} catch (e) {
|
|
142
|
-
z(e instanceof Error ? e.message : "Could not save the widget.");
|
|
143
|
+
z(e instanceof Error ? e.message : k("bigconsole.widget.customWidget.error.couldNotSaveWidget", "Could not save the widget."));
|
|
143
144
|
} finally {
|
|
144
145
|
L(!1);
|
|
145
146
|
}
|
|
@@ -147,145 +148,146 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
147
148
|
}, [
|
|
148
149
|
M,
|
|
149
150
|
Y.canApprove,
|
|
150
|
-
|
|
151
|
+
E,
|
|
152
|
+
D,
|
|
151
153
|
k
|
|
152
154
|
]), Q = Y.issues.filter((e) => e.severity === "error"), $ = Y.issues.filter((e) => e.severity === "warning");
|
|
153
|
-
return /* @__PURE__ */
|
|
155
|
+
return /* @__PURE__ */ S("section", {
|
|
154
156
|
"data-testid": "custom-widget-proposal-panel",
|
|
155
|
-
"aria-label": "AI custom widget builder",
|
|
157
|
+
"aria-label": k("bigconsole.widget.customWidget.panel.ariaLabel", "AI custom widget builder"),
|
|
156
158
|
className: "flex h-full w-full flex-col gap-4 overflow-y-auto p-4",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ S("div", {
|
|
158
160
|
className: "flex flex-col gap-2",
|
|
159
161
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ S(v, {
|
|
161
163
|
htmlFor: "custom-widget-prompt",
|
|
162
164
|
className: "flex items-center gap-2",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ x(m, {
|
|
164
166
|
className: "size-4",
|
|
165
167
|
"aria-hidden": "true"
|
|
166
|
-
}), "Describe the widget you need"]
|
|
168
|
+
}), k("bigconsole.widget.customWidget.prompt.label", "Describe the widget you need")]
|
|
167
169
|
}),
|
|
168
|
-
/* @__PURE__ */ y
|
|
170
|
+
/* @__PURE__ */ x(y, {
|
|
169
171
|
id: "custom-widget-prompt",
|
|
170
172
|
"data-testid": "custom-widget-prompt",
|
|
171
173
|
value: j,
|
|
172
|
-
onChange: (e) =>
|
|
173
|
-
placeholder: "e.g. a funnel of signup conversion stages",
|
|
174
|
+
onChange: (e) => ae(e.target.value),
|
|
175
|
+
placeholder: k("bigconsole.widget.customWidget.prompt.placeholder", "e.g. a funnel of signup conversion stages"),
|
|
174
176
|
rows: 3
|
|
175
177
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ S("div", {
|
|
177
179
|
className: "flex flex-wrap gap-2",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ S(g, {
|
|
179
181
|
"data-testid": "custom-widget-generate",
|
|
180
|
-
onClick:
|
|
182
|
+
onClick: oe,
|
|
181
183
|
disabled: !j.trim() || P,
|
|
182
|
-
children: [P ? /* @__PURE__ */
|
|
184
|
+
children: [P ? /* @__PURE__ */ x(f, {
|
|
183
185
|
className: "mr-2 size-4 animate-spin",
|
|
184
186
|
"aria-hidden": "true"
|
|
185
|
-
}) : null, M ? "Regenerate" : "Generate proposal"]
|
|
186
|
-
}), M ? /* @__PURE__ */
|
|
187
|
+
}) : null, M ? k("bigconsole.widget.customWidget.action.regenerate", "Regenerate") : k("bigconsole.widget.customWidget.action.generateProposal", "Generate proposal")]
|
|
188
|
+
}), M ? /* @__PURE__ */ S(g, {
|
|
187
189
|
variant: "outline",
|
|
188
190
|
"data-testid": "custom-widget-reject",
|
|
189
|
-
onClick:
|
|
190
|
-
children: [/* @__PURE__ */
|
|
191
|
+
onClick: se,
|
|
192
|
+
children: [/* @__PURE__ */ x(te, {
|
|
191
193
|
className: "mr-1 size-4",
|
|
192
194
|
"aria-hidden": "true"
|
|
193
|
-
}), "Reject"]
|
|
195
|
+
}), k("bigconsole.widget.customWidget.action.reject", "Reject")]
|
|
194
196
|
}) : null]
|
|
195
197
|
})
|
|
196
198
|
]
|
|
197
|
-
}), M ? /* @__PURE__ */ b
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
+
}), M ? /* @__PURE__ */ S(b, { children: [
|
|
200
|
+
/* @__PURE__ */ S("div", {
|
|
199
201
|
className: "flex flex-col gap-2",
|
|
200
202
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ S("div", {
|
|
202
204
|
className: "flex items-center justify-between gap-2",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
204
206
|
className: "text-sm font-semibold text-text-primary",
|
|
205
|
-
children:
|
|
206
|
-
}), /* @__PURE__ */
|
|
207
|
+
children: A[X].title
|
|
208
|
+
}), /* @__PURE__ */ x("span", {
|
|
207
209
|
"data-testid": "custom-widget-preview-state",
|
|
208
210
|
"data-state": X,
|
|
209
211
|
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
|
|
210
212
|
children: X
|
|
211
213
|
})]
|
|
212
214
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ x("div", {
|
|
214
216
|
"data-testid": "custom-widget-preview",
|
|
215
217
|
className: "min-h-[220px] rounded-lg border border-border-default bg-bg-surface p-2",
|
|
216
|
-
children: X === "loading" ? /* @__PURE__ */
|
|
218
|
+
children: X === "loading" ? /* @__PURE__ */ S("div", {
|
|
217
219
|
className: "flex h-[200px] items-center justify-center text-text-secondary",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ x(f, {
|
|
219
221
|
className: "mr-2 size-4 animate-spin",
|
|
220
222
|
"aria-hidden": "true"
|
|
221
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ x("span", {
|
|
222
224
|
className: "text-sm",
|
|
223
|
-
children:
|
|
225
|
+
children: A.loading.body
|
|
224
226
|
})]
|
|
225
|
-
}) : X === "valid" ? /* @__PURE__ */
|
|
227
|
+
}) : X === "valid" ? /* @__PURE__ */ x("div", {
|
|
226
228
|
className: "h-[200px]",
|
|
227
|
-
children: /* @__PURE__ */
|
|
229
|
+
children: /* @__PURE__ */ x(e, {
|
|
228
230
|
widgetId: `preview-${M.id}`,
|
|
229
|
-
children: /* @__PURE__ */
|
|
230
|
-
widget: C(M),
|
|
231
|
+
children: /* @__PURE__ */ x(t, {
|
|
232
|
+
widget: C(M, k("bigconsole.widget.customWidget.untitledWidget", "Untitled widget")),
|
|
231
233
|
data: B
|
|
232
234
|
})
|
|
233
235
|
})
|
|
234
|
-
}) : /* @__PURE__ */
|
|
236
|
+
}) : /* @__PURE__ */ S("div", {
|
|
235
237
|
className: "flex h-[200px] flex-col items-center justify-center gap-2 px-4 text-center",
|
|
236
238
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ x(ee, {
|
|
238
240
|
className: "size-5 text-status-warning-text",
|
|
239
241
|
"aria-hidden": "true"
|
|
240
242
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ x("p", {
|
|
242
244
|
className: "text-sm text-text-secondary",
|
|
243
|
-
children:
|
|
245
|
+
children: A[X].body
|
|
244
246
|
}),
|
|
245
|
-
X === "access-error" ? /* @__PURE__ */
|
|
247
|
+
X === "access-error" ? /* @__PURE__ */ S(g, {
|
|
246
248
|
size: "sm",
|
|
247
249
|
variant: "outline",
|
|
248
250
|
onClick: () => Z((e) => ({ ...e })),
|
|
249
|
-
children: [/* @__PURE__ */
|
|
251
|
+
children: [/* @__PURE__ */ x(p, {
|
|
250
252
|
className: "mr-1 size-3.5",
|
|
251
253
|
"aria-hidden": "true"
|
|
252
|
-
}), "Retry"]
|
|
254
|
+
}), k("bigconsole.widget.customWidget.action.retry", "Retry")]
|
|
253
255
|
}) : null
|
|
254
256
|
]
|
|
255
257
|
})
|
|
256
258
|
}),
|
|
257
|
-
M.rationale ? /* @__PURE__ */
|
|
259
|
+
M.rationale ? /* @__PURE__ */ x("p", {
|
|
258
260
|
className: "text-xs text-text-secondary",
|
|
259
261
|
"data-testid": "custom-widget-rationale",
|
|
260
262
|
children: M.rationale
|
|
261
263
|
}) : null
|
|
262
264
|
]
|
|
263
265
|
}),
|
|
264
|
-
Q.length > 0 || $.length > 0 ? /* @__PURE__ */
|
|
266
|
+
Q.length > 0 || $.length > 0 ? /* @__PURE__ */ x("ul", {
|
|
265
267
|
"data-testid": "custom-widget-issues",
|
|
266
268
|
className: "flex flex-col gap-1",
|
|
267
|
-
children: [...Q, ...$].map((e) => /* @__PURE__ */
|
|
269
|
+
children: [...Q, ...$].map((e) => /* @__PURE__ */ x("li", {
|
|
268
270
|
"data-severity": e.severity,
|
|
269
271
|
className: `rounded-md px-2 py-1 text-xs ${e.severity === "error" ? "bg-status-error-bg/10 text-status-error-text" : "bg-status-warning-bg/10 text-status-warning-text"}`,
|
|
270
272
|
children: e.message
|
|
271
273
|
}, `${e.code}-${e.path ?? ""}`))
|
|
272
274
|
}) : null,
|
|
273
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ S("div", {
|
|
274
276
|
className: "flex flex-col gap-3",
|
|
275
277
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ x("h3", {
|
|
277
279
|
className: "text-sm font-semibold text-text-primary",
|
|
278
|
-
children: "Proposal"
|
|
280
|
+
children: k("bigconsole.widget.customWidget.proposal.heading", "Proposal")
|
|
279
281
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ S("div", {
|
|
281
283
|
className: "flex flex-col gap-1",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
284
|
+
children: [/* @__PURE__ */ x(v, {
|
|
283
285
|
htmlFor: "custom-widget-title",
|
|
284
|
-
children: "Title"
|
|
285
|
-
}), /* @__PURE__ */
|
|
286
|
+
children: k("bigconsole.widget.customWidget.field.title", "Title")
|
|
287
|
+
}), /* @__PURE__ */ x(_, {
|
|
286
288
|
id: "custom-widget-title",
|
|
287
289
|
"data-testid": "custom-widget-title",
|
|
288
|
-
className:
|
|
290
|
+
className: ne,
|
|
289
291
|
value: M.presentation.title,
|
|
290
292
|
onChange: (e) => Z((t) => ({
|
|
291
293
|
...t,
|
|
@@ -296,12 +298,12 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
296
298
|
}))
|
|
297
299
|
})]
|
|
298
300
|
}),
|
|
299
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ S("div", {
|
|
300
302
|
className: "flex flex-col gap-1",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ x(v, {
|
|
302
304
|
htmlFor: "custom-widget-type",
|
|
303
|
-
children: "Widget type"
|
|
304
|
-
}), /* @__PURE__ */
|
|
305
|
+
children: k("bigconsole.widget.customWidget.field.widgetType", "Widget type")
|
|
306
|
+
}), /* @__PURE__ */ x("select", {
|
|
305
307
|
id: "custom-widget-type",
|
|
306
308
|
"data-testid": "custom-widget-type",
|
|
307
309
|
value: M.widgetType,
|
|
@@ -310,23 +312,23 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
310
312
|
widgetType: e.target.value
|
|
311
313
|
})),
|
|
312
314
|
className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
313
|
-
children: n.map((e) => /* @__PURE__ */
|
|
315
|
+
children: n.map((e) => /* @__PURE__ */ x("option", {
|
|
314
316
|
value: e,
|
|
315
317
|
children: e
|
|
316
318
|
}, e))
|
|
317
319
|
})]
|
|
318
320
|
}),
|
|
319
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ S("div", {
|
|
320
322
|
className: "flex flex-col gap-1",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
323
|
+
children: [/* @__PURE__ */ x(v, {
|
|
322
324
|
htmlFor: "custom-widget-sink",
|
|
323
|
-
children: "DataSink"
|
|
324
|
-
}), /* @__PURE__ */
|
|
325
|
+
children: k("bigconsole.widget.customWidget.field.dataSink", "DataSink")
|
|
326
|
+
}), /* @__PURE__ */ S("select", {
|
|
325
327
|
id: "custom-widget-sink",
|
|
326
328
|
"data-testid": "custom-widget-sink",
|
|
327
329
|
value: M.binding.dataSinkId,
|
|
328
330
|
onChange: (e) => {
|
|
329
|
-
let t =
|
|
331
|
+
let t = o.find((t) => t.id === e.target.value);
|
|
330
332
|
Z((n) => ({
|
|
331
333
|
...n,
|
|
332
334
|
binding: {
|
|
@@ -337,26 +339,26 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
337
339
|
}));
|
|
338
340
|
},
|
|
339
341
|
className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ x("option", {
|
|
341
343
|
value: "",
|
|
342
|
-
children: "Select a DataSink…"
|
|
343
|
-
}),
|
|
344
|
+
children: k("bigconsole.widget.customWidget.field.selectDataSink", "Select a DataSink…")
|
|
345
|
+
}), o.map((e) => /* @__PURE__ */ x("option", {
|
|
344
346
|
value: e.id,
|
|
345
347
|
children: e.name || e.key
|
|
346
348
|
}, e.id))]
|
|
347
349
|
})]
|
|
348
350
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ S("div", {
|
|
350
352
|
className: "flex flex-col gap-1",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
353
|
+
children: [/* @__PURE__ */ x(v, {
|
|
352
354
|
htmlFor: "custom-widget-parser",
|
|
353
|
-
children: "Parser"
|
|
354
|
-
}), /* @__PURE__ */
|
|
355
|
+
children: k("bigconsole.widget.customWidget.field.parser", "Parser")
|
|
356
|
+
}), /* @__PURE__ */ S("select", {
|
|
355
357
|
id: "custom-widget-parser",
|
|
356
358
|
"data-testid": "custom-widget-parser",
|
|
357
359
|
value: M.binding.parserId ?? "",
|
|
358
360
|
onChange: (e) => {
|
|
359
|
-
let t =
|
|
361
|
+
let t = w.find((t) => t.id === e.target.value);
|
|
360
362
|
Z((n) => ({
|
|
361
363
|
...n,
|
|
362
364
|
binding: {
|
|
@@ -367,29 +369,29 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
367
369
|
}));
|
|
368
370
|
},
|
|
369
371
|
className: "w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ x("option", {
|
|
371
373
|
value: "",
|
|
372
|
-
children: "No parser"
|
|
373
|
-
}),
|
|
374
|
+
children: k("bigconsole.widget.customWidget.field.noParser", "No parser")
|
|
375
|
+
}), w.map((e) => /* @__PURE__ */ x("option", {
|
|
374
376
|
value: e.id,
|
|
375
377
|
children: e.name
|
|
376
378
|
}, e.id))]
|
|
377
379
|
})]
|
|
378
380
|
}),
|
|
379
|
-
Object.keys(M.fieldMapping).length > 0 ? /* @__PURE__ */
|
|
381
|
+
Object.keys(M.fieldMapping).length > 0 ? /* @__PURE__ */ S("fieldset", {
|
|
380
382
|
className: "flex flex-col gap-2",
|
|
381
383
|
"data-testid": "custom-widget-field-mapping",
|
|
382
384
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ x("legend", {
|
|
384
386
|
className: "text-sm font-medium text-text-primary",
|
|
385
|
-
children: "Field mapping"
|
|
387
|
+
children: k("bigconsole.widget.customWidget.fieldMapping.legend", "Field mapping")
|
|
386
388
|
}),
|
|
387
|
-
Object.entries(M.fieldMapping).map(([e, t]) => /* @__PURE__ */
|
|
389
|
+
Object.entries(M.fieldMapping).map(([e, t]) => /* @__PURE__ */ S("div", {
|
|
388
390
|
className: "flex flex-col gap-1",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
391
|
+
children: [/* @__PURE__ */ x(v, {
|
|
390
392
|
htmlFor: `custom-widget-field-${e}`,
|
|
391
393
|
children: e
|
|
392
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ x(_, {
|
|
393
395
|
id: `custom-widget-field-${e}`,
|
|
394
396
|
"data-testid": `custom-widget-field-${e}`,
|
|
395
397
|
value: t,
|
|
@@ -402,48 +404,48 @@ var E = a(function({ sinks: a, parsers: E, resolvePreviewData: D, onApprove: O,
|
|
|
402
404
|
}))
|
|
403
405
|
})]
|
|
404
406
|
}, e)),
|
|
405
|
-
J?.length ? /* @__PURE__ */
|
|
407
|
+
J?.length ? /* @__PURE__ */ x("p", {
|
|
406
408
|
className: "text-xs text-text-secondary",
|
|
407
|
-
children:
|
|
409
|
+
children: k("bigconsole.widget.customWidget.fieldMapping.available", "Available: {{fields}}", { fields: J.join(", ") })
|
|
408
410
|
}) : null
|
|
409
411
|
]
|
|
410
412
|
}) : null
|
|
411
413
|
]
|
|
412
414
|
}),
|
|
413
|
-
R ? /* @__PURE__ */
|
|
415
|
+
R ? /* @__PURE__ */ x("p", {
|
|
414
416
|
role: "alert",
|
|
415
417
|
className: "text-xs text-status-error-text",
|
|
416
418
|
"data-testid": "custom-widget-approve-error",
|
|
417
419
|
children: R
|
|
418
420
|
}) : null,
|
|
419
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ S("div", {
|
|
420
422
|
className: "flex flex-wrap gap-2 border-t border-border-default pt-3",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ S(g, {
|
|
422
424
|
"data-testid": "custom-widget-approve",
|
|
423
|
-
onClick:
|
|
425
|
+
onClick: ce,
|
|
424
426
|
disabled: !Y.canApprove || I,
|
|
425
|
-
children: [I ? /* @__PURE__ */
|
|
427
|
+
children: [I ? /* @__PURE__ */ x(f, {
|
|
426
428
|
className: "mr-2 size-4 animate-spin",
|
|
427
429
|
"aria-hidden": "true"
|
|
428
|
-
}) : /* @__PURE__ */
|
|
430
|
+
}) : /* @__PURE__ */ x(d, {
|
|
429
431
|
className: "mr-1 size-4",
|
|
430
432
|
"aria-hidden": "true"
|
|
431
|
-
}), "Approve & add to dashboard"]
|
|
432
|
-
}), /* @__PURE__ */
|
|
433
|
+
}), k("bigconsole.widget.customWidget.action.approveAndAdd", "Approve & add to dashboard")]
|
|
434
|
+
}), /* @__PURE__ */ x(g, {
|
|
433
435
|
variant: "outline",
|
|
434
|
-
onClick:
|
|
436
|
+
onClick: D,
|
|
435
437
|
"data-testid": "custom-widget-cancel",
|
|
436
|
-
children: "Cancel"
|
|
438
|
+
children: k("bigconsole.widget.customWidget.action.cancel", "Cancel")
|
|
437
439
|
})]
|
|
438
440
|
})
|
|
439
|
-
] }) : /* @__PURE__ */
|
|
441
|
+
] }) : /* @__PURE__ */ x("p", {
|
|
440
442
|
className: "text-sm text-text-secondary",
|
|
441
443
|
"data-testid": "custom-widget-empty",
|
|
442
|
-
children: "No proposal yet. Describe a widget and the assistant will propose one for you to review — nothing is added to the dashboard until you approve it."
|
|
444
|
+
children: k("bigconsole.widget.customWidget.empty", "No proposal yet. Describe a widget and the assistant will propose one for you to review — nothing is added to the dashboard until you approve it.")
|
|
443
445
|
})]
|
|
444
446
|
});
|
|
445
447
|
});
|
|
446
448
|
//#endregion
|
|
447
|
-
export {
|
|
449
|
+
export { w as default };
|
|
448
450
|
|
|
449
451
|
//# sourceMappingURL=CustomWidgetProposalPanel.js.map
|