@burdenoff/microfe-bigconsole 2026.812.2 → 2026.827.1
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/LayoutSection.js +71 -0
- package/dist/bigconsole/components/builder/inspector/LayoutSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/index.js +1 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +137 -121
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +204 -93
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +259 -133
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +87 -39
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +88 -68
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +213 -199
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +46 -27
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +44 -47
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/proposalSource.js +31 -24
- package/dist/bigconsole/customWidget/proposalSource.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +74 -64
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useDataSinkOperations.js +2 -2
- package/dist/bigconsole/hooks/useDataSinkOperations.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +386 -316
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +251 -206
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +646 -378
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +153 -108
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/format.js +18 -0
- package/dist/bigconsole/utils/format.js.map +1 -0
- package/dist/bigconsole/utils/widgetPositioning.js +1 -1
- package/dist/generated/wspace-operations.js +1 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import { useWidgetStore as e } from "../../store/widgetStore.js";
|
|
2
|
+
import { useIsEditMode as t } from "../../store/dashboardStore.js";
|
|
2
3
|
import "../../store/index.js";
|
|
3
|
-
import { Section as
|
|
4
|
+
import { Section as n, SectionStack as r } from "../common/Section.js";
|
|
4
5
|
import "../common/index.js";
|
|
5
|
-
import { getWidgetDefinition as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
6
|
+
import { getWidgetDefinition as i } from "./WidgetRegistry.js";
|
|
7
|
+
import a from "../../hooks/useWidgetOperations.js";
|
|
8
|
+
import o from "../../hooks/useDrilldownOperations.js";
|
|
9
|
+
import s from "../../hooks/useWidgetActions.js";
|
|
10
|
+
import c from "../../hooks/useEventWebhooks.js";
|
|
11
|
+
import ee from "../../hooks/useDataSinkOperations.js";
|
|
12
|
+
import te from "../../hooks/useParserOperations.js";
|
|
12
13
|
import "../../hooks/index.js";
|
|
13
|
-
import { getWidgetBinding as l, getWidgetBindingStatus as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import { getWidgetBinding as l, getWidgetBindingStatus as ne, reconcilePanelConfig as re, serializeWidgetBinding as ie } from "../../utils/widgetBinding.js";
|
|
15
|
+
import ae from "./ActionConfigDialog.js";
|
|
16
|
+
import oe from "./webhook-config/WebhookConfigPanel.js";
|
|
16
17
|
import "./webhook-config/index.js";
|
|
17
|
-
import
|
|
18
|
+
import se from "./event-logs/EventLogViewer.js";
|
|
18
19
|
import "./event-logs/index.js";
|
|
19
|
-
import
|
|
20
|
-
import { AdvancedSection as
|
|
21
|
-
import { AppearanceSection as
|
|
22
|
-
import { GeneralSection as
|
|
23
|
-
import { DataBindingSection as
|
|
20
|
+
import ce from "./DrilldownConfigPanel.js";
|
|
21
|
+
import { AdvancedSection as le } from "../builder/inspector/AdvancedSection.js";
|
|
22
|
+
import { AppearanceSection as ue } from "../builder/inspector/AppearanceSection.js";
|
|
23
|
+
import { GeneralSection as de } from "../builder/inspector/GeneralSection.js";
|
|
24
|
+
import { DataBindingSection as fe } from "../builder/inspector/DataBindingSection.js";
|
|
25
|
+
import pe from "../builder/inspector/LayoutSection.js";
|
|
24
26
|
import "../builder/inspector/index.js";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
27
|
+
import { DEFAULT_GRID_CONFIG as me } from "../../utils/widgetPositioning.js";
|
|
28
|
+
import { memo as he, useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
29
|
+
import { Check as h, ChevronDown as ge, ChevronUp as _e, ExternalLink as g, Info as ve, Pencil as ye, Plus as be, Trash2 as xe, X as Se } from "lucide-react";
|
|
30
|
+
import { useI18n as Ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
31
|
+
import { Button as _, Card as we, CardContent as Te, Input as v, Label as y, Select as Ee, SelectContent as De, SelectItem as b, SelectTrigger as Oe, SelectValue as ke, Sheet as Ae, SheetContent as je, SheetDescription as Me, SheetHeader as Ne, SheetTitle as Pe, Spinner as Fe, Tabs as Ie, TabsContent as x, TabsList as Le, TabsTrigger as S, Textarea as C } from "@burdenoff/fe-libs/ui";
|
|
29
32
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
30
33
|
//#region src/bigconsole/components/widgets/PropertiesPanel.tsx
|
|
31
|
-
var
|
|
34
|
+
var Re = [
|
|
32
35
|
{
|
|
33
36
|
value: "BIGCONSOLE",
|
|
34
37
|
labelKey: "bigconsole.widget.properties.renderer.bigconsole.label",
|
|
@@ -57,7 +60,7 @@ var Fe = [
|
|
|
57
60
|
descriptionKey: "bigconsole.widget.properties.renderer.custom.description",
|
|
58
61
|
description: "Custom React component"
|
|
59
62
|
}
|
|
60
|
-
],
|
|
63
|
+
], ze = [
|
|
61
64
|
{
|
|
62
65
|
value: "DATASINK",
|
|
63
66
|
labelKey: "bigconsole.widget.properties.dataSourceType.datasink.label",
|
|
@@ -101,23 +104,23 @@ var Fe = [
|
|
|
101
104
|
description: "Manually enter sample JSON data"
|
|
102
105
|
}
|
|
103
106
|
];
|
|
104
|
-
function
|
|
107
|
+
function Be(e) {
|
|
105
108
|
return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
|
|
106
109
|
}
|
|
107
|
-
var
|
|
110
|
+
var Ve = {
|
|
108
111
|
PRIMARY: "bg-action-primary-bg",
|
|
109
112
|
SECONDARY: "bg-[var(--color-text-muted)]",
|
|
110
113
|
SUCCESS: "bg-status-success-bg",
|
|
111
114
|
WARNING: "bg-status-warning-bg",
|
|
112
115
|
DANGER: "bg-status-error-bg"
|
|
113
|
-
},
|
|
116
|
+
}, He = "bg-[var(--color-text-muted)]", E = {
|
|
114
117
|
fontWeight: "var(--font-weight-semibold)",
|
|
115
118
|
fontSize: "var(--font-size-body-sm)",
|
|
116
119
|
padding: "6px 10px",
|
|
117
120
|
minHeight: "var(--size-controlHeight-md)",
|
|
118
121
|
flexShrink: 0
|
|
119
122
|
};
|
|
120
|
-
function
|
|
123
|
+
function Ue(e) {
|
|
121
124
|
if (!e) return {};
|
|
122
125
|
let t = Array.isArray(e) ? e[0] : e;
|
|
123
126
|
if (!t || typeof t != "object") return {};
|
|
@@ -161,8 +164,8 @@ function Be(e) {
|
|
|
161
164
|
xAxisField: a
|
|
162
165
|
};
|
|
163
166
|
}
|
|
164
|
-
var
|
|
165
|
-
let { t: r } =
|
|
167
|
+
var We = he(function({ widget: e, onSave: t }) {
|
|
168
|
+
let { t: r } = Ce(), [i, a] = m(""), [o, s] = m(null), c = p(!1);
|
|
166
169
|
d(() => {
|
|
167
170
|
try {
|
|
168
171
|
a(e.template && typeof e.template == "object" ? JSON.stringify(e.template, null, 2) : ""), s(null), c.current = !0;
|
|
@@ -171,23 +174,23 @@ var Ve = fe(function({ widget: e, onSave: n }) {
|
|
|
171
174
|
}
|
|
172
175
|
}, [e.id, e.template]);
|
|
173
176
|
let ee = u((e) => {
|
|
174
|
-
let
|
|
175
|
-
if (a(
|
|
177
|
+
let n = e.target.value;
|
|
178
|
+
if (a(n), n.trim() === "") s(null), t({});
|
|
176
179
|
else try {
|
|
177
|
-
let e = JSON.parse(
|
|
178
|
-
s(null),
|
|
180
|
+
let e = JSON.parse(n);
|
|
181
|
+
s(null), t(e);
|
|
179
182
|
} catch (e) {
|
|
180
183
|
s(e.message);
|
|
181
184
|
}
|
|
182
|
-
}, [
|
|
185
|
+
}, [t]), te = u(() => {
|
|
183
186
|
try {
|
|
184
187
|
let e = JSON.parse(i);
|
|
185
|
-
a(JSON.stringify(e, null, 2)), s(null),
|
|
188
|
+
a(JSON.stringify(e, null, 2)), s(null), t(e);
|
|
186
189
|
} catch (e) {
|
|
187
190
|
s(e.message);
|
|
188
191
|
}
|
|
189
|
-
}, [i,
|
|
190
|
-
return /* @__PURE__ */ T(
|
|
192
|
+
}, [i, t]);
|
|
193
|
+
return /* @__PURE__ */ T(n, {
|
|
191
194
|
emphasis: "muted",
|
|
192
195
|
padding: "compact",
|
|
193
196
|
headingLevel: 4,
|
|
@@ -230,7 +233,7 @@ var Ve = fe(function({ widget: e, onSave: n }) {
|
|
|
230
233
|
children: [/* @__PURE__ */ w(_, {
|
|
231
234
|
variant: "outline",
|
|
232
235
|
size: "sm",
|
|
233
|
-
onClick:
|
|
236
|
+
onClick: te,
|
|
234
237
|
disabled: !!o || i.trim() === "",
|
|
235
238
|
style: {
|
|
236
239
|
height: "var(--size-controlHeight-sm)",
|
|
@@ -271,7 +274,7 @@ var Ve = fe(function({ widget: e, onSave: n }) {
|
|
|
271
274
|
fontWeight: "var(--font-weight-medium)",
|
|
272
275
|
textDecoration: "none"
|
|
273
276
|
},
|
|
274
|
-
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ w(
|
|
277
|
+
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ w(g, { style: {
|
|
275
278
|
height: "var(--size-icon-sm)",
|
|
276
279
|
width: "var(--size-icon-sm)"
|
|
277
280
|
} })]
|
|
@@ -289,7 +292,7 @@ var Ve = fe(function({ widget: e, onSave: n }) {
|
|
|
289
292
|
fontWeight: "var(--font-weight-medium)",
|
|
290
293
|
textDecoration: "none"
|
|
291
294
|
},
|
|
292
|
-
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ w(
|
|
295
|
+
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ w(g, { style: {
|
|
293
296
|
height: "var(--size-icon-sm)",
|
|
294
297
|
width: "var(--size-icon-sm)"
|
|
295
298
|
} })]
|
|
@@ -299,7 +302,7 @@ var Ve = fe(function({ widget: e, onSave: n }) {
|
|
|
299
302
|
]
|
|
300
303
|
});
|
|
301
304
|
});
|
|
302
|
-
function
|
|
305
|
+
function Ge(e) {
|
|
303
306
|
let t = e, n = l({
|
|
304
307
|
dataSinkId: t.dataSinkId,
|
|
305
308
|
parserId: t.parserId,
|
|
@@ -327,48 +330,55 @@ function He(e) {
|
|
|
327
330
|
} : void 0
|
|
328
331
|
};
|
|
329
332
|
}
|
|
330
|
-
var D =
|
|
331
|
-
let { t: D } =
|
|
332
|
-
|
|
333
|
+
var D = he(function({ isOpen: he, onClose: g }) {
|
|
334
|
+
let { t: D } = Ce(), [Ke, qe] = m("general"), [O, k] = m("idle"), [A, j] = m(null), [M, N] = m(!1), P = e((e) => e.selectedWidgetId), Je = e((e) => e.widgets), F = e((e) => e.updateWidget), Ye = e((e) => e.updateWidgetPosition), Xe = t(), I = P ? Je.get(P) : void 0, Ze = I ? {
|
|
335
|
+
x: I.position?.x ?? I.positionX ?? 0,
|
|
336
|
+
y: I.position?.y ?? I.positionY ?? 0,
|
|
337
|
+
width: I.position?.width ?? I.positionWidth ?? 4,
|
|
338
|
+
height: I.position?.height ?? I.positionHeight ?? 4
|
|
339
|
+
} : null, Qe = u((e) => {
|
|
340
|
+
P && Ye(P, e);
|
|
341
|
+
}, [P, Ye]), $e = p(null), et = p({}), tt = p(0), L = u(() => {
|
|
342
|
+
tt.current += 1, N(!0);
|
|
333
343
|
}, []);
|
|
334
344
|
d(() => {
|
|
335
345
|
if (!P) {
|
|
336
|
-
|
|
346
|
+
$e.current = null, j(null), N(!1), k("idle");
|
|
337
347
|
return;
|
|
338
348
|
}
|
|
339
|
-
let e =
|
|
340
|
-
if (
|
|
349
|
+
let e = $e.current !== P;
|
|
350
|
+
if ($e.current = P, I) {
|
|
341
351
|
if (M && !e) return;
|
|
342
|
-
j(
|
|
352
|
+
j(Ge(I)), et.current = I.config || {}, N(!1), k("idle");
|
|
343
353
|
} else j(null), N(!1), k("idle");
|
|
344
354
|
}, [
|
|
345
355
|
P,
|
|
346
356
|
I,
|
|
347
357
|
M
|
|
348
358
|
]);
|
|
349
|
-
let { updateWidget:
|
|
359
|
+
let { updateWidget: nt } = a(I?.pageId, I?.dashboardId, { skipFetch: !0 }), { createDrilldown: rt, updateDrilldown: it, deleteDrilldown: at } = o(), { dataSinks: R } = ee({ skipFetch: !1 }), [ot, st] = m(null), { executeParser: ct } = te({
|
|
350
360
|
consoleId: I?.dashboardId,
|
|
351
361
|
skipFetch: !0
|
|
352
|
-
}), [
|
|
362
|
+
}), [lt, ut] = m(!1), [dt, z] = m(void 0), [ft, B] = m(!1), [pt, V] = m(null);
|
|
353
363
|
d(() => {
|
|
354
|
-
z(void 0), B(!1), V(null),
|
|
364
|
+
z(void 0), B(!1), V(null), ut(!1);
|
|
355
365
|
}, [P]);
|
|
356
|
-
let { actions: H, loading:
|
|
366
|
+
let { actions: H, loading: mt, createAction: ht, updateAction: gt, deleteAction: _t, reorderActions: U } = s(P || void 0), { webhooks: vt, loading: yt, createWebhook: bt, updateWebhook: xt, deleteWebhook: W, refetch: St } = c({
|
|
357
367
|
widgetId: P || void 0,
|
|
358
368
|
skipFetch: !P
|
|
359
369
|
}), G = u((e, t) => {
|
|
360
|
-
let n =
|
|
370
|
+
let n = Be(t);
|
|
361
371
|
return e.find((e) => e.widgetId === P && e.eventPattern === n) ?? null;
|
|
362
|
-
}, [P]), K = u((e) => G(
|
|
372
|
+
}, [P]), K = u((e) => G(vt, e), [G, vt]), Ct = u(async (e, t) => {
|
|
363
373
|
if (!P || t === void 0) return !0;
|
|
364
|
-
let n =
|
|
365
|
-
return !r &&
|
|
374
|
+
let n = Be(e), r = K(e);
|
|
375
|
+
return !r && yt && (r = G((await St())?.data?.listEventWebhookMappings ?? [], e)), t && t.url ? r ? await xt({
|
|
366
376
|
id: r.id,
|
|
367
377
|
eventPattern: n,
|
|
368
378
|
webhookUrl: t.url,
|
|
369
379
|
method: t.method,
|
|
370
380
|
isActive: !0
|
|
371
|
-
}) !== null : await
|
|
381
|
+
}) !== null : await bt({
|
|
372
382
|
widgetId: P,
|
|
373
383
|
eventPattern: n,
|
|
374
384
|
webhookUrl: t.url,
|
|
@@ -377,42 +387,42 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
377
387
|
}, [
|
|
378
388
|
P,
|
|
379
389
|
K,
|
|
380
|
-
|
|
381
|
-
|
|
390
|
+
yt,
|
|
391
|
+
St,
|
|
382
392
|
G,
|
|
383
|
-
|
|
384
|
-
|
|
393
|
+
bt,
|
|
394
|
+
xt,
|
|
385
395
|
W
|
|
386
|
-
]), [
|
|
396
|
+
]), [wt, q] = m(!1), [J, Y] = m(void 0), [Tt, Et] = m(!1), [Dt, X] = m(void 0), [Ot, Z] = m(null), kt = f(() => {
|
|
387
397
|
if (!J) return null;
|
|
388
398
|
let e = K(J.name);
|
|
389
399
|
return e ? {
|
|
390
400
|
url: e.webhookUrl,
|
|
391
401
|
method: e.method
|
|
392
402
|
} : null;
|
|
393
|
-
}, [J, K]),
|
|
403
|
+
}, [J, K]), At = Dt === void 0 ? kt : Dt, jt = f(() => {
|
|
394
404
|
let e = /* @__PURE__ */ new Map();
|
|
395
405
|
for (let t of H) {
|
|
396
406
|
let n = K(t.name);
|
|
397
407
|
n && e.set(t.name, n);
|
|
398
408
|
}
|
|
399
409
|
return e;
|
|
400
|
-
}, [H, K]),
|
|
410
|
+
}, [H, K]), Mt = u(() => {
|
|
401
411
|
X(void 0), Z(null), Y(void 0), q(!0);
|
|
402
|
-
}, []),
|
|
412
|
+
}, []), Nt = u((e) => {
|
|
403
413
|
X(void 0), Z(null), Y(e), q(!0);
|
|
404
|
-
}, []),
|
|
414
|
+
}, []), Pt = u(async (e, t) => {
|
|
405
415
|
if (P) {
|
|
406
|
-
|
|
416
|
+
Et(!0), Z(null);
|
|
407
417
|
try {
|
|
408
418
|
let n = "id" in e && !!e.id, r = null;
|
|
409
|
-
if (r = n ? await
|
|
419
|
+
if (r = n ? await gt(e) : await ht(e), r) {
|
|
410
420
|
let e = [...H];
|
|
411
421
|
if (n) {
|
|
412
422
|
let t = e.findIndex((e) => e.id === r?.id);
|
|
413
423
|
t >= 0 && (e[t] = r);
|
|
414
424
|
} else e.push(r);
|
|
415
|
-
if (F(P, { actions: e.sort((e, t) => e.order - t.order) }), !await
|
|
425
|
+
if (F(P, { actions: e.sort((e, t) => e.order - t.order) }), !await Ct(r.name, t)) {
|
|
416
426
|
X(t), Z(t ? D("bigconsole.widget.properties.action.webhookSaveFailed", "The button was saved, but its webhook could not be saved. Check the URL and try again.") : D("bigconsole.widget.properties.action.webhookRemoveFailed", "The button was saved, but its old webhook could not be removed. Try again.")), Y(r);
|
|
417
427
|
return;
|
|
418
428
|
}
|
|
@@ -421,21 +431,21 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
421
431
|
} catch (e) {
|
|
422
432
|
console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message : D("bigconsole.widget.properties.action.saveFailed", "Could not save the button. Please try again."));
|
|
423
433
|
} finally {
|
|
424
|
-
|
|
434
|
+
Et(!1);
|
|
425
435
|
}
|
|
426
436
|
}
|
|
427
437
|
}, [
|
|
428
438
|
P,
|
|
429
439
|
H,
|
|
430
|
-
|
|
431
|
-
lt,
|
|
432
|
-
F,
|
|
440
|
+
ht,
|
|
433
441
|
gt,
|
|
442
|
+
F,
|
|
443
|
+
Ct,
|
|
434
444
|
D
|
|
435
|
-
]),
|
|
445
|
+
]), Ft = u(async (e) => {
|
|
436
446
|
if (P && window.confirm(D("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
|
|
437
447
|
let t = H.find((t) => t.id === e);
|
|
438
|
-
if (await
|
|
448
|
+
if (await _t(e) && (F(P, { actions: H.filter((t) => t.id !== e) }), t)) {
|
|
439
449
|
let e = K(t.name);
|
|
440
450
|
e && await W(e.id);
|
|
441
451
|
}
|
|
@@ -443,12 +453,12 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
443
453
|
}, [
|
|
444
454
|
P,
|
|
445
455
|
H,
|
|
446
|
-
|
|
456
|
+
_t,
|
|
447
457
|
F,
|
|
448
458
|
K,
|
|
449
459
|
W,
|
|
450
460
|
D
|
|
451
|
-
]),
|
|
461
|
+
]), It = u(async (e) => {
|
|
452
462
|
if (!P || e === 0) return;
|
|
453
463
|
let t = [...H].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
|
|
454
464
|
[n[e - 1], n[e]] = [n[e], n[e - 1]], await U(n) && F(P, { actions: t.map((e, t) => ({
|
|
@@ -460,7 +470,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
460
470
|
H,
|
|
461
471
|
U,
|
|
462
472
|
F
|
|
463
|
-
]),
|
|
473
|
+
]), Lt = u(async (e) => {
|
|
464
474
|
if (!P) return;
|
|
465
475
|
let t = [...H].sort((e, t) => e.order - t.order);
|
|
466
476
|
if (e === t.length - 1) return;
|
|
@@ -476,11 +486,11 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
476
486
|
F
|
|
477
487
|
]);
|
|
478
488
|
d(() => {
|
|
479
|
-
P && H.length >= 0 && !
|
|
489
|
+
P && H.length >= 0 && !mt && F(P, { actions: H });
|
|
480
490
|
}, [
|
|
481
491
|
P,
|
|
482
492
|
H,
|
|
483
|
-
|
|
493
|
+
mt,
|
|
484
494
|
F
|
|
485
495
|
]);
|
|
486
496
|
let Q = u((e, t) => {
|
|
@@ -497,11 +507,11 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
497
507
|
d(() => {
|
|
498
508
|
if (A?.dataSinkId && R.length > 0) {
|
|
499
509
|
let e = R.find((e) => e.id === A.dataSinkId);
|
|
500
|
-
e &&
|
|
501
|
-
} else
|
|
510
|
+
e && st(e.key);
|
|
511
|
+
} else st(null);
|
|
502
512
|
}, [A?.dataSinkId, R]);
|
|
503
|
-
let
|
|
504
|
-
if (z(void 0), B(!1), V(null),
|
|
513
|
+
let Rt = u((e) => {
|
|
514
|
+
if (z(void 0), B(!1), V(null), st(e), e) {
|
|
505
515
|
let t = R.find((t) => t.key === e);
|
|
506
516
|
t && (Q("dataSinkId", t.id), j((t) => t && {
|
|
507
517
|
...t,
|
|
@@ -522,14 +532,14 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
522
532
|
R,
|
|
523
533
|
Q,
|
|
524
534
|
L
|
|
525
|
-
]),
|
|
535
|
+
]), zt = u(async (e) => {
|
|
526
536
|
if (Q("parserId", e || void 0), z(void 0), B(!1), V(null), e && I) {
|
|
527
|
-
|
|
537
|
+
ut(!0);
|
|
528
538
|
try {
|
|
529
|
-
let t = await
|
|
539
|
+
let t = await ct(e);
|
|
530
540
|
if (t?.success) {
|
|
531
541
|
z(t.output), B(!0);
|
|
532
|
-
let e =
|
|
542
|
+
let e = Ue(t.output);
|
|
533
543
|
(e.labelField || e.valueField) && (j((t) => {
|
|
534
544
|
if (!t) return t;
|
|
535
545
|
let n = t.config || {}, r = { ...n };
|
|
@@ -542,31 +552,31 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
542
552
|
} catch (e) {
|
|
543
553
|
B(!0), V(e instanceof Error ? e.message : D("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.")), console.warn("Failed to auto-detect parser fields:", e);
|
|
544
554
|
} finally {
|
|
545
|
-
|
|
555
|
+
ut(!1);
|
|
546
556
|
}
|
|
547
557
|
}
|
|
548
558
|
}, [
|
|
549
559
|
Q,
|
|
550
|
-
|
|
560
|
+
ct,
|
|
551
561
|
I,
|
|
552
562
|
L,
|
|
553
563
|
D
|
|
554
|
-
]),
|
|
564
|
+
]), Bt = u(async () => {
|
|
555
565
|
if (!I || !A) return;
|
|
556
|
-
let t =
|
|
566
|
+
let t = tt.current;
|
|
557
567
|
k("saving");
|
|
558
568
|
try {
|
|
559
569
|
let n = {
|
|
560
570
|
...I.metadata || {},
|
|
561
571
|
description: A.description || ""
|
|
562
|
-
}, r =
|
|
572
|
+
}, r = re(e.getState().widgets.get(I.id)?.config ?? {}, et.current, A.config), i = ie(l({
|
|
563
573
|
dataSinkId: A.dataSinkId,
|
|
564
574
|
parserId: A.parserId,
|
|
565
575
|
config: {
|
|
566
576
|
...r,
|
|
567
577
|
binding: void 0
|
|
568
578
|
}
|
|
569
|
-
}), r), a = await
|
|
579
|
+
}), r), a = await nt({
|
|
570
580
|
id: I.id,
|
|
571
581
|
title: A.title,
|
|
572
582
|
renderer: A.renderer,
|
|
@@ -582,7 +592,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
582
592
|
if (A.drilldownConfig) {
|
|
583
593
|
let { enabled: e, targetDashboardId: t, navigationMode: n, parameterMapping: r, passGlobalFilters: i, maxDepth: a, openIn: s } = A.drilldownConfig;
|
|
584
594
|
if (I.drilldown?.id) {
|
|
585
|
-
let c = await
|
|
595
|
+
let c = await it({
|
|
586
596
|
id: I.drilldown.id,
|
|
587
597
|
targetDashboardId: t,
|
|
588
598
|
parameterMapping: r,
|
|
@@ -594,7 +604,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
594
604
|
});
|
|
595
605
|
c && (o = c);
|
|
596
606
|
} else if (t) {
|
|
597
|
-
let c = await
|
|
607
|
+
let c = await rt({
|
|
598
608
|
sourceWidgetId: I.id,
|
|
599
609
|
targetDashboardId: t,
|
|
600
610
|
parameterMapping: r || {},
|
|
@@ -608,7 +618,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
608
618
|
enabled: e
|
|
609
619
|
});
|
|
610
620
|
}
|
|
611
|
-
} else I.drilldown?.id && !A.drilldownConfig && (await
|
|
621
|
+
} else I.drilldown?.id && !A.drilldownConfig && (await at(I.drilldown.id), o = void 0);
|
|
612
622
|
a ? (F(I.id, {
|
|
613
623
|
title: A.title,
|
|
614
624
|
description: A.description,
|
|
@@ -622,40 +632,40 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
622
632
|
parserRules: A.parserRules,
|
|
623
633
|
drilldown: o,
|
|
624
634
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
625
|
-
}), k("saved"),
|
|
635
|
+
}), k("saved"), tt.current === t && N(!1), setTimeout(() => k("idle"), 2e3)) : k("error");
|
|
626
636
|
} catch {
|
|
627
637
|
k("error");
|
|
628
638
|
}
|
|
629
639
|
}, [
|
|
630
640
|
I,
|
|
631
641
|
A,
|
|
632
|
-
|
|
642
|
+
nt,
|
|
633
643
|
F,
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
]),
|
|
638
|
-
I && (j(
|
|
639
|
-
}, [I]),
|
|
644
|
+
rt,
|
|
645
|
+
it,
|
|
646
|
+
at
|
|
647
|
+
]), Vt = u(() => {
|
|
648
|
+
I && (j(Ge(I)), et.current = I.config || {}, N(!1), k("idle"));
|
|
649
|
+
}, [I]), Ht = u((e) => {
|
|
640
650
|
$(e);
|
|
641
|
-
}, [$]),
|
|
651
|
+
}, [$]), Ut = u((e) => {
|
|
642
652
|
j((t) => t && {
|
|
643
653
|
...t,
|
|
644
654
|
drilldownConfig: e
|
|
645
655
|
}), L();
|
|
646
|
-
}, [L]),
|
|
656
|
+
}, [L]), Wt = I ? i(I.type) : null, Gt = f(() => Re.map((e) => ({
|
|
647
657
|
value: e.value,
|
|
648
658
|
label: D(e.labelKey, e.label),
|
|
649
659
|
description: D(e.descriptionKey, e.description)
|
|
650
|
-
})), [D]),
|
|
660
|
+
})), [D]), Kt = f(() => ze.map((e) => ({
|
|
651
661
|
value: e.value,
|
|
652
662
|
label: D(e.labelKey, e.label)
|
|
653
663
|
})), [D]);
|
|
654
|
-
return /* @__PURE__ */ w(
|
|
655
|
-
open:
|
|
656
|
-
onOpenChange: (e) => !e &&
|
|
664
|
+
return /* @__PURE__ */ w(Ae, {
|
|
665
|
+
open: he,
|
|
666
|
+
onOpenChange: (e) => !e && g(),
|
|
657
667
|
modal: !1,
|
|
658
|
-
children: /* @__PURE__ */ T(
|
|
668
|
+
children: /* @__PURE__ */ T(je, {
|
|
659
669
|
style: {
|
|
660
670
|
width: "min(420px, 100vw)",
|
|
661
671
|
maxWidth: "100vw",
|
|
@@ -666,7 +676,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
666
676
|
overflow: "hidden"
|
|
667
677
|
},
|
|
668
678
|
children: [
|
|
669
|
-
/* @__PURE__ */ w(
|
|
679
|
+
/* @__PURE__ */ w(Ne, {
|
|
670
680
|
style: {
|
|
671
681
|
padding: "var(--space-cardPadding)",
|
|
672
682
|
borderBottom: "1px solid var(--color-border-subtle)",
|
|
@@ -691,7 +701,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
691
701
|
boxShadow: "var(--shadow-elevation-2)",
|
|
692
702
|
flexShrink: 0
|
|
693
703
|
},
|
|
694
|
-
children: /* @__PURE__ */ w(
|
|
704
|
+
children: /* @__PURE__ */ w(ve, { style: {
|
|
695
705
|
height: "var(--size-icon-md)",
|
|
696
706
|
width: "var(--size-icon-md)",
|
|
697
707
|
color: "var(--color-action-primary-text)"
|
|
@@ -708,7 +718,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
708
718
|
gap: "var(--space-iconGap)"
|
|
709
719
|
},
|
|
710
720
|
children: [
|
|
711
|
-
/* @__PURE__ */ w(
|
|
721
|
+
/* @__PURE__ */ w(Pe, {
|
|
712
722
|
style: {
|
|
713
723
|
fontSize: "var(--font-size-body-md)",
|
|
714
724
|
fontWeight: "var(--font-weight-bold)",
|
|
@@ -717,7 +727,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
717
727
|
},
|
|
718
728
|
children: I ? D("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : D("bigconsole.widget.properties.header.properties", "Properties")
|
|
719
729
|
}),
|
|
720
|
-
O === "saving" && /* @__PURE__ */ w(
|
|
730
|
+
O === "saving" && /* @__PURE__ */ w(Fe, { style: {
|
|
721
731
|
height: "var(--size-icon-sm)",
|
|
722
732
|
width: "var(--size-icon-sm)"
|
|
723
733
|
} }),
|
|
@@ -726,27 +736,27 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
726
736
|
width: "var(--size-icon-sm)",
|
|
727
737
|
color: "var(--color-status-success-bg)"
|
|
728
738
|
} }),
|
|
729
|
-
O === "error" && /* @__PURE__ */ w(
|
|
739
|
+
O === "error" && /* @__PURE__ */ w(Se, { style: {
|
|
730
740
|
height: "var(--size-icon-sm)",
|
|
731
741
|
width: "var(--size-icon-sm)",
|
|
732
742
|
color: "var(--color-status-error-bg)"
|
|
733
743
|
} })
|
|
734
744
|
]
|
|
735
|
-
}),
|
|
745
|
+
}), Wt && /* @__PURE__ */ w(Me, {
|
|
736
746
|
style: {
|
|
737
747
|
fontSize: "var(--font-size-body-sm)",
|
|
738
748
|
color: "var(--color-text-secondary)",
|
|
739
749
|
margin: "var(--space-controlGap) 0 0 0",
|
|
740
750
|
fontWeight: "var(--font-weight-medium)"
|
|
741
751
|
},
|
|
742
|
-
children:
|
|
752
|
+
children: Wt.name
|
|
743
753
|
})]
|
|
744
754
|
})]
|
|
745
755
|
})
|
|
746
756
|
}),
|
|
747
|
-
I ? /* @__PURE__ */ T(
|
|
748
|
-
value:
|
|
749
|
-
onValueChange: (e) =>
|
|
757
|
+
I ? /* @__PURE__ */ T(Ie, {
|
|
758
|
+
value: Ke,
|
|
759
|
+
onValueChange: (e) => qe(e),
|
|
750
760
|
style: {
|
|
751
761
|
flex: 1,
|
|
752
762
|
display: "flex",
|
|
@@ -754,7 +764,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
754
764
|
minHeight: 0,
|
|
755
765
|
overflow: "hidden"
|
|
756
766
|
},
|
|
757
|
-
children: [/* @__PURE__ */ T(
|
|
767
|
+
children: [/* @__PURE__ */ T(Le, {
|
|
758
768
|
style: {
|
|
759
769
|
width: "100%",
|
|
760
770
|
display: "flex",
|
|
@@ -802,19 +812,23 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
802
812
|
/* @__PURE__ */ w(x, {
|
|
803
813
|
value: "general",
|
|
804
814
|
className: "mt-0",
|
|
805
|
-
children: A && /* @__PURE__ */
|
|
815
|
+
children: A && /* @__PURE__ */ T(r, { children: [/* @__PURE__ */ w(de, {
|
|
806
816
|
title: A.title,
|
|
807
817
|
description: A.description,
|
|
808
818
|
refreshInterval: A.refreshInterval,
|
|
809
819
|
onTitleChange: (e) => Q("title", e),
|
|
810
820
|
onDescriptionChange: (e) => Q("description", e),
|
|
811
821
|
onRefreshIntervalChange: (e) => Q("refreshInterval", e)
|
|
812
|
-
})
|
|
822
|
+
}), Xe && Ze && /* @__PURE__ */ w(pe, {
|
|
823
|
+
position: Ze,
|
|
824
|
+
columns: me.cols,
|
|
825
|
+
onChange: Qe
|
|
826
|
+
})] })
|
|
813
827
|
}),
|
|
814
828
|
/* @__PURE__ */ w(x, {
|
|
815
829
|
value: "data",
|
|
816
830
|
className: "mt-0",
|
|
817
|
-
children: A && /* @__PURE__ */ T(
|
|
831
|
+
children: A && /* @__PURE__ */ T(r, { children: [(() => {
|
|
818
832
|
let e = l({
|
|
819
833
|
dataSinkId: A.dataSinkId,
|
|
820
834
|
parserId: A.parserId,
|
|
@@ -822,30 +836,30 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
822
836
|
...A.config,
|
|
823
837
|
binding: void 0
|
|
824
838
|
}
|
|
825
|
-
}), t =
|
|
839
|
+
}), t = ne({
|
|
826
840
|
binding: e,
|
|
827
|
-
loading:
|
|
828
|
-
error:
|
|
829
|
-
preview:
|
|
830
|
-
previewComplete:
|
|
841
|
+
loading: lt,
|
|
842
|
+
error: pt,
|
|
843
|
+
preview: dt,
|
|
844
|
+
previewComplete: ft
|
|
831
845
|
});
|
|
832
|
-
return /* @__PURE__ */ w(
|
|
846
|
+
return /* @__PURE__ */ w(fe, {
|
|
833
847
|
consoleId: I?.dashboardId || "",
|
|
834
848
|
binding: e,
|
|
835
|
-
dataSinkKey:
|
|
849
|
+
dataSinkKey: ot,
|
|
836
850
|
dataPath: typeof A.config.dataPath == "string" ? A.config.dataPath : void 0,
|
|
837
851
|
status: t.status,
|
|
838
852
|
missingFields: t.missingFields,
|
|
839
|
-
preview:
|
|
840
|
-
error:
|
|
841
|
-
onDataSinkChange:
|
|
842
|
-
onParserChange:
|
|
853
|
+
preview: dt,
|
|
854
|
+
error: pt,
|
|
855
|
+
onDataSinkChange: Rt,
|
|
856
|
+
onParserChange: zt,
|
|
843
857
|
onDataPathChange: (e) => $({
|
|
844
858
|
...A.config,
|
|
845
859
|
dataPath: e
|
|
846
860
|
})
|
|
847
861
|
});
|
|
848
|
-
})(), /* @__PURE__ */ w(
|
|
862
|
+
})(), /* @__PURE__ */ w(n, {
|
|
849
863
|
emphasis: "muted",
|
|
850
864
|
title: D("bigconsole.widget.properties.data.alternativeSources", "Alternative Data Sources"),
|
|
851
865
|
description: "Skip the DataSink pipeline and fetch straight from an API, a GraphQL endpoint or sample JSON.",
|
|
@@ -856,19 +870,19 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
856
870
|
children: [
|
|
857
871
|
/* @__PURE__ */ T("div", {
|
|
858
872
|
className: "space-y-2",
|
|
859
|
-
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ T(
|
|
873
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ T(Ee, {
|
|
860
874
|
value: A.config?.dataSourceType || "",
|
|
861
875
|
onValueChange: (e) => $({
|
|
862
876
|
...A.config,
|
|
863
877
|
dataSourceType: e || void 0
|
|
864
878
|
}),
|
|
865
|
-
children: [/* @__PURE__ */ w(
|
|
879
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
866
880
|
style: {
|
|
867
881
|
height: "var(--size-controlHeight-md)",
|
|
868
882
|
fontSize: "var(--font-size-body-sm)"
|
|
869
883
|
},
|
|
870
|
-
children: /* @__PURE__ */ w(
|
|
871
|
-
}), /* @__PURE__ */ w(
|
|
884
|
+
children: /* @__PURE__ */ w(ke, { placeholder: D("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
|
|
885
|
+
}), /* @__PURE__ */ w(De, {
|
|
872
886
|
position: "popper",
|
|
873
887
|
side: "bottom",
|
|
874
888
|
sideOffset: 4,
|
|
@@ -881,7 +895,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
881
895
|
boxShadow: "var(--shadow-elevation-3)",
|
|
882
896
|
borderRadius: "var(--radius-button)"
|
|
883
897
|
},
|
|
884
|
-
children:
|
|
898
|
+
children: Kt.map((e) => /* @__PURE__ */ w(b, {
|
|
885
899
|
value: e.value,
|
|
886
900
|
children: e.label
|
|
887
901
|
}, e.value))
|
|
@@ -904,16 +918,16 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
904
918
|
}),
|
|
905
919
|
/* @__PURE__ */ T("div", {
|
|
906
920
|
className: "space-y-2",
|
|
907
|
-
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ T(
|
|
921
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ T(Ee, {
|
|
908
922
|
value: A.config?.httpMethod || "GET",
|
|
909
923
|
onValueChange: (e) => $({
|
|
910
924
|
...A.config,
|
|
911
925
|
httpMethod: e
|
|
912
926
|
}),
|
|
913
|
-
children: [/* @__PURE__ */ w(
|
|
927
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
914
928
|
style: { height: "var(--size-controlHeight-md)" },
|
|
915
|
-
children: /* @__PURE__ */ w(
|
|
916
|
-
}), /* @__PURE__ */ T(
|
|
929
|
+
children: /* @__PURE__ */ w(ke, {})
|
|
930
|
+
}), /* @__PURE__ */ T(De, {
|
|
917
931
|
position: "popper",
|
|
918
932
|
side: "bottom",
|
|
919
933
|
sideOffset: 4,
|
|
@@ -953,16 +967,16 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
953
967
|
}),
|
|
954
968
|
/* @__PURE__ */ T("div", {
|
|
955
969
|
className: "space-y-2",
|
|
956
|
-
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ T(
|
|
970
|
+
children: [/* @__PURE__ */ w(y, { children: D("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ T(Ee, {
|
|
957
971
|
value: A.config?.authType || "none",
|
|
958
972
|
onValueChange: (e) => $({
|
|
959
973
|
...A.config,
|
|
960
974
|
authType: e
|
|
961
975
|
}),
|
|
962
|
-
children: [/* @__PURE__ */ w(
|
|
976
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
963
977
|
style: { height: "var(--size-controlHeight-md)" },
|
|
964
|
-
children: /* @__PURE__ */ w(
|
|
965
|
-
}), /* @__PURE__ */ T(
|
|
978
|
+
children: /* @__PURE__ */ w(ke, {})
|
|
979
|
+
}), /* @__PURE__ */ T(De, {
|
|
966
980
|
position: "popper",
|
|
967
981
|
side: "bottom",
|
|
968
982
|
sideOffset: 4,
|
|
@@ -1125,14 +1139,14 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1125
1139
|
/* @__PURE__ */ w(x, {
|
|
1126
1140
|
value: "advanced",
|
|
1127
1141
|
className: "mt-0",
|
|
1128
|
-
children: /* @__PURE__ */ T(
|
|
1129
|
-
A && /* @__PURE__ */ w(
|
|
1142
|
+
children: /* @__PURE__ */ T(r, { children: [
|
|
1143
|
+
A && /* @__PURE__ */ w(le, {
|
|
1130
1144
|
renderer: A.renderer,
|
|
1131
|
-
rendererOptions:
|
|
1145
|
+
rendererOptions: Gt,
|
|
1132
1146
|
onRendererChange: (e) => {
|
|
1133
1147
|
Q("renderer", e), e === "BIGCONSOLE" && Q("template", void 0);
|
|
1134
1148
|
},
|
|
1135
|
-
templateEditor: A.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ w(
|
|
1149
|
+
templateEditor: A.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ w(We, {
|
|
1136
1150
|
widget: {
|
|
1137
1151
|
...I,
|
|
1138
1152
|
template: A.template,
|
|
@@ -1141,7 +1155,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1141
1155
|
onSave: (e) => Q("template", e)
|
|
1142
1156
|
})
|
|
1143
1157
|
}),
|
|
1144
|
-
/* @__PURE__ */ w(
|
|
1158
|
+
/* @__PURE__ */ w(n, {
|
|
1145
1159
|
title: D("bigconsole.widget.properties.actions.heading", "Widget Actions"),
|
|
1146
1160
|
description: D("bigconsole.widget.properties.actions.subheading", "Configure buttons on this widget"),
|
|
1147
1161
|
headingLevel: 3,
|
|
@@ -1151,21 +1165,21 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1151
1165
|
}) : void 0,
|
|
1152
1166
|
actions: /* @__PURE__ */ T(_, {
|
|
1153
1167
|
size: "sm",
|
|
1154
|
-
onClick:
|
|
1155
|
-
children: [/* @__PURE__ */ w(
|
|
1168
|
+
onClick: Mt,
|
|
1169
|
+
children: [/* @__PURE__ */ w(be, { className: "size-4" }), D("bigconsole.widget.properties.actions.add", "Add")]
|
|
1156
1170
|
}),
|
|
1157
1171
|
"data-testid": "widget-inspector-actions",
|
|
1158
|
-
children:
|
|
1172
|
+
children: mt ? /* @__PURE__ */ w("div", {
|
|
1159
1173
|
className: "flex justify-center py-8",
|
|
1160
|
-
children: /* @__PURE__ */ w(
|
|
1174
|
+
children: /* @__PURE__ */ w(Fe, { className: "size-6" })
|
|
1161
1175
|
}) : H.length === 0 ? /* @__PURE__ */ w("p", {
|
|
1162
1176
|
className: "text-sm text-text-secondary",
|
|
1163
1177
|
children: D("bigconsole.widget.properties.actions.empty", "No actions configured")
|
|
1164
1178
|
}) : /* @__PURE__ */ w("div", {
|
|
1165
1179
|
className: "space-y-2",
|
|
1166
|
-
children: [...H].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ w(
|
|
1180
|
+
children: [...H].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ w(we, {
|
|
1167
1181
|
className: e.disabled ? "opacity-60" : "",
|
|
1168
|
-
children: /* @__PURE__ */ T(
|
|
1182
|
+
children: /* @__PURE__ */ T(Te, {
|
|
1169
1183
|
className: "p-3 flex items-center gap-2",
|
|
1170
1184
|
children: [
|
|
1171
1185
|
/* @__PURE__ */ T("div", {
|
|
@@ -1173,17 +1187,17 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1173
1187
|
children: [/* @__PURE__ */ w(_, {
|
|
1174
1188
|
variant: "ghost",
|
|
1175
1189
|
size: "icon-sm",
|
|
1176
|
-
onClick: () =>
|
|
1190
|
+
onClick: () => It(t),
|
|
1177
1191
|
disabled: t === 0,
|
|
1178
1192
|
className: "h-5 w-5",
|
|
1179
|
-
children: /* @__PURE__ */ w(
|
|
1193
|
+
children: /* @__PURE__ */ w(_e, { className: "size-3" })
|
|
1180
1194
|
}), /* @__PURE__ */ w(_, {
|
|
1181
1195
|
variant: "ghost",
|
|
1182
1196
|
size: "icon-sm",
|
|
1183
|
-
onClick: () =>
|
|
1197
|
+
onClick: () => Lt(t),
|
|
1184
1198
|
disabled: t === H.length - 1,
|
|
1185
1199
|
className: "h-5 w-5",
|
|
1186
|
-
children: /* @__PURE__ */ w(
|
|
1200
|
+
children: /* @__PURE__ */ w(ge, { className: "size-3" })
|
|
1187
1201
|
})]
|
|
1188
1202
|
}),
|
|
1189
1203
|
/* @__PURE__ */ T("div", {
|
|
@@ -1192,16 +1206,16 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1192
1206
|
className: "flex items-center gap-2",
|
|
1193
1207
|
children: [/* @__PURE__ */ w("span", {
|
|
1194
1208
|
"aria-hidden": "true",
|
|
1195
|
-
className: `size-2 shrink-0 rounded-full ${
|
|
1209
|
+
className: `size-2 shrink-0 rounded-full ${Ve[e.style] || He}`
|
|
1196
1210
|
}), /* @__PURE__ */ w("span", {
|
|
1197
1211
|
className: "text-sm font-medium truncate",
|
|
1198
1212
|
children: e.label
|
|
1199
1213
|
})]
|
|
1200
1214
|
}), /* @__PURE__ */ w("p", {
|
|
1201
1215
|
className: "text-xs text-text-secondary truncate",
|
|
1202
|
-
children:
|
|
1203
|
-
method:
|
|
1204
|
-
url:
|
|
1216
|
+
children: jt.has(e.name) ? D("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
|
|
1217
|
+
method: jt.get(e.name)?.method ?? "",
|
|
1218
|
+
url: jt.get(e.name)?.webhookUrl ?? ""
|
|
1205
1219
|
}) : D("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
|
|
1206
1220
|
})]
|
|
1207
1221
|
}),
|
|
@@ -1211,14 +1225,14 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1211
1225
|
variant: "ghost",
|
|
1212
1226
|
size: "icon-sm",
|
|
1213
1227
|
"aria-label": `Edit ${e.label}`,
|
|
1214
|
-
onClick: () =>
|
|
1215
|
-
children: /* @__PURE__ */ w(
|
|
1228
|
+
onClick: () => Nt(e),
|
|
1229
|
+
children: /* @__PURE__ */ w(ye, { className: "size-4" })
|
|
1216
1230
|
}), /* @__PURE__ */ w(_, {
|
|
1217
1231
|
variant: "ghost",
|
|
1218
1232
|
size: "icon-sm",
|
|
1219
1233
|
"aria-label": `Delete ${e.label}`,
|
|
1220
|
-
onClick: () =>
|
|
1221
|
-
children: /* @__PURE__ */ w(
|
|
1234
|
+
onClick: () => Ft(e.id),
|
|
1235
|
+
children: /* @__PURE__ */ w(xe, { className: "size-4" })
|
|
1222
1236
|
})]
|
|
1223
1237
|
})
|
|
1224
1238
|
]
|
|
@@ -1226,33 +1240,33 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1226
1240
|
}, e.id))
|
|
1227
1241
|
})
|
|
1228
1242
|
}),
|
|
1229
|
-
/* @__PURE__ */ w(
|
|
1243
|
+
/* @__PURE__ */ w(n, {
|
|
1230
1244
|
title: D("bigconsole.widget.properties.section.drilldown", "Drilldown"),
|
|
1231
1245
|
description: "Where a click on this widget's data takes the viewer.",
|
|
1232
1246
|
headingLevel: 3,
|
|
1233
1247
|
"data-testid": "widget-inspector-drilldown",
|
|
1234
|
-
children: /* @__PURE__ */ w(
|
|
1248
|
+
children: /* @__PURE__ */ w(ce, {
|
|
1235
1249
|
widget: I,
|
|
1236
|
-
onChange:
|
|
1250
|
+
onChange: Ut
|
|
1237
1251
|
})
|
|
1238
1252
|
}),
|
|
1239
|
-
/* @__PURE__ */ w(
|
|
1253
|
+
/* @__PURE__ */ w(n, {
|
|
1240
1254
|
title: D("bigconsole.widget.properties.section.webhooks", "Webhooks"),
|
|
1241
1255
|
description: "HTTP endpoints called when this widget emits an event.",
|
|
1242
1256
|
headingLevel: 3,
|
|
1243
1257
|
"data-testid": "widget-inspector-webhooks",
|
|
1244
|
-
children: /* @__PURE__ */ w(
|
|
1258
|
+
children: /* @__PURE__ */ w(oe, {
|
|
1245
1259
|
dashboardId: I.dashboardId,
|
|
1246
1260
|
widgetId: I.id
|
|
1247
1261
|
})
|
|
1248
1262
|
}),
|
|
1249
|
-
/* @__PURE__ */ w(
|
|
1263
|
+
/* @__PURE__ */ w(n, {
|
|
1250
1264
|
emphasis: "muted",
|
|
1251
1265
|
title: D("bigconsole.widget.properties.section.events", "Events"),
|
|
1252
1266
|
description: "Recent deliveries for this widget, newest first. Supporting detail — nothing here changes the widget.",
|
|
1253
1267
|
headingLevel: 3,
|
|
1254
1268
|
"data-testid": "widget-inspector-events",
|
|
1255
|
-
children: /* @__PURE__ */ w(
|
|
1269
|
+
children: /* @__PURE__ */ w(se, {
|
|
1256
1270
|
dashboardId: I.dashboardId,
|
|
1257
1271
|
widgetId: I.id,
|
|
1258
1272
|
maxHeight: "min(50vh, 360px)"
|
|
@@ -1263,21 +1277,21 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1263
1277
|
/* @__PURE__ */ w(x, {
|
|
1264
1278
|
value: "appearance",
|
|
1265
1279
|
className: "mt-0",
|
|
1266
|
-
children: A && /* @__PURE__ */ w(
|
|
1280
|
+
children: A && /* @__PURE__ */ w(ue, {
|
|
1267
1281
|
widgetType: I.type,
|
|
1268
1282
|
config: A.config || {},
|
|
1269
|
-
onChange:
|
|
1283
|
+
onChange: Ht
|
|
1270
1284
|
})
|
|
1271
1285
|
})
|
|
1272
1286
|
]
|
|
1273
1287
|
})]
|
|
1274
1288
|
}) : /* @__PURE__ */ w("div", {
|
|
1275
1289
|
className: "flex min-h-0 flex-1 items-center justify-center p-card-padding",
|
|
1276
|
-
children: /* @__PURE__ */ w(
|
|
1290
|
+
children: /* @__PURE__ */ w(n, {
|
|
1277
1291
|
tone: "info",
|
|
1278
1292
|
title: D("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
|
|
1279
1293
|
headingLevel: 3,
|
|
1280
|
-
icon: /* @__PURE__ */ w(
|
|
1294
|
+
icon: /* @__PURE__ */ w(ve, { className: "h-icon-md w-icon-md" }),
|
|
1281
1295
|
className: "w-full max-w-sm",
|
|
1282
1296
|
"data-testid": "widget-inspector-empty",
|
|
1283
1297
|
children: /* @__PURE__ */ w("p", {
|
|
@@ -1294,7 +1308,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1294
1308
|
flexShrink: 0
|
|
1295
1309
|
},
|
|
1296
1310
|
children: [
|
|
1297
|
-
M && /* @__PURE__ */ w(
|
|
1311
|
+
M && /* @__PURE__ */ w(n, {
|
|
1298
1312
|
tone: "warning",
|
|
1299
1313
|
padding: "compact",
|
|
1300
1314
|
title: D("bigconsole.widget.properties.footer.unsavedChanges", "You have unsaved changes"),
|
|
@@ -1302,7 +1316,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1302
1316
|
className: "mb-control-gap",
|
|
1303
1317
|
"data-testid": "widget-inspector-save-unsaved"
|
|
1304
1318
|
}),
|
|
1305
|
-
O === "saved" && !M && /* @__PURE__ */ w(
|
|
1319
|
+
O === "saved" && !M && /* @__PURE__ */ w(n, {
|
|
1306
1320
|
tone: "success",
|
|
1307
1321
|
padding: "compact",
|
|
1308
1322
|
title: D("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
|
|
@@ -1311,19 +1325,19 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1311
1325
|
className: "mb-control-gap",
|
|
1312
1326
|
"data-testid": "widget-inspector-save-saved"
|
|
1313
1327
|
}),
|
|
1314
|
-
O === "error" && /* @__PURE__ */ w(
|
|
1328
|
+
O === "error" && /* @__PURE__ */ w(n, {
|
|
1315
1329
|
tone: "danger",
|
|
1316
1330
|
padding: "compact",
|
|
1317
1331
|
title: D("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
|
|
1318
1332
|
headingLevel: 3,
|
|
1319
|
-
icon: /* @__PURE__ */ w(
|
|
1333
|
+
icon: /* @__PURE__ */ w(Se, { className: "h-icon-sm w-icon-sm" }),
|
|
1320
1334
|
className: "mb-control-gap",
|
|
1321
1335
|
"data-testid": "widget-inspector-save-error"
|
|
1322
1336
|
}),
|
|
1323
1337
|
/* @__PURE__ */ T("div", {
|
|
1324
1338
|
className: "flex flex-wrap gap-control-gap",
|
|
1325
1339
|
children: [/* @__PURE__ */ w(_, {
|
|
1326
|
-
onClick:
|
|
1340
|
+
onClick: Bt,
|
|
1327
1341
|
disabled: O === "saving" || !M,
|
|
1328
1342
|
style: {
|
|
1329
1343
|
flex: 1,
|
|
@@ -1337,7 +1351,7 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1337
1351
|
alignItems: "center",
|
|
1338
1352
|
gap: "var(--space-iconGap)"
|
|
1339
1353
|
},
|
|
1340
|
-
children: [/* @__PURE__ */ w(
|
|
1354
|
+
children: [/* @__PURE__ */ w(Fe, { style: {
|
|
1341
1355
|
width: "var(--size-icon-sm)",
|
|
1342
1356
|
height: "var(--size-icon-sm)"
|
|
1343
1357
|
} }), D("bigconsole.widget.properties.footer.saving", "Saving...")]
|
|
@@ -1354,13 +1368,13 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1354
1368
|
})
|
|
1355
1369
|
}), /* @__PURE__ */ T(_, {
|
|
1356
1370
|
variant: "outline",
|
|
1357
|
-
onClick:
|
|
1371
|
+
onClick: Vt,
|
|
1358
1372
|
disabled: O === "saving" || !M,
|
|
1359
1373
|
style: {
|
|
1360
1374
|
height: "var(--size-controlHeight-md)",
|
|
1361
1375
|
opacity: M ? 1 : .5
|
|
1362
1376
|
},
|
|
1363
|
-
children: [/* @__PURE__ */ w(
|
|
1377
|
+
children: [/* @__PURE__ */ w(Se, { style: {
|
|
1364
1378
|
width: "var(--size-icon-sm)",
|
|
1365
1379
|
height: "var(--size-icon-sm)"
|
|
1366
1380
|
} }), D("bigconsole.widget.properties.footer.discard", "Discard")]
|
|
@@ -1368,16 +1382,16 @@ var D = fe(function({ isOpen: fe, onClose: he }) {
|
|
|
1368
1382
|
})
|
|
1369
1383
|
]
|
|
1370
1384
|
}),
|
|
1371
|
-
/* @__PURE__ */ w(
|
|
1372
|
-
isOpen:
|
|
1385
|
+
/* @__PURE__ */ w(ae, {
|
|
1386
|
+
isOpen: wt,
|
|
1373
1387
|
action: J,
|
|
1374
|
-
initialWebhook:
|
|
1375
|
-
isLoading:
|
|
1376
|
-
saveError:
|
|
1388
|
+
initialWebhook: At,
|
|
1389
|
+
isLoading: Tt,
|
|
1390
|
+
saveError: Ot,
|
|
1377
1391
|
onClose: () => {
|
|
1378
1392
|
q(!1), Y(void 0), X(void 0), Z(null);
|
|
1379
1393
|
},
|
|
1380
|
-
onSave:
|
|
1394
|
+
onSave: Pt
|
|
1381
1395
|
})
|
|
1382
1396
|
]
|
|
1383
1397
|
})
|