@burdenoff/microfe-bigconsole 2026.929.2 → 2026.930.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/assistant/assistantRunPersistence.js +111 -0
- package/dist/bigconsole/assistant/assistantRunPersistence.js.map +1 -0
- package/dist/bigconsole/assistant/assistantRunStore.js +87 -48
- package/dist/bigconsole/assistant/assistantRunStore.js.map +1 -1
- package/dist/bigconsole/assistant/previewController.js +19 -50
- package/dist/bigconsole/assistant/previewController.js.map +1 -1
- package/dist/bigconsole/assistant/useAssistantRunWorkspace.js +14 -0
- package/dist/bigconsole/assistant/useAssistantRunWorkspace.js.map +1 -0
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +74 -50
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +9 -4
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/embed/ReadOnlyDashboardRenderer.js +68 -40
- package/dist/bigconsole/components/embed/ReadOnlyDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/embed/drilldown.js +26 -0
- package/dist/bigconsole/components/embed/drilldown.js.map +1 -0
- package/dist/bigconsole/components/embed/index.js +4 -3
- package/dist/bigconsole/components/embed/types.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +32 -30
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +38 -36
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/previewShared.js +1 -1
- package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +307 -233
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +230 -220
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +18 -19
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/context/BigConsoleContext.js +4 -1
- package/dist/bigconsole/context/BigConsoleContext.js.map +1 -1
- package/dist/bigconsole/hooks/useActivePage.js +25 -0
- package/dist/bigconsole/hooks/useActivePage.js.map +1 -0
- package/dist/bigconsole/hooks/useDrilldown.js +118 -71
- package/dist/bigconsole/hooks/useDrilldown.js.map +1 -1
- package/dist/bigconsole/hooks/useDrilldownOperations.js +32 -26
- package/dist/bigconsole/hooks/useDrilldownOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +190 -185
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +224 -217
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/generated/wspace-operations.js +132 -86
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/package.json +3 -3
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js +0 -25
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js.map +0 -1
|
@@ -8,10 +8,10 @@ import a from "../../hooks/useWidgetOperations.js";
|
|
|
8
8
|
import o from "../../hooks/useDrilldownOperations.js";
|
|
9
9
|
import s from "../../hooks/useWidgetActions.js";
|
|
10
10
|
import c from "../../hooks/useEventWebhooks.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import l from "../../hooks/useDataSinkOperations.js";
|
|
12
|
+
import ee from "../../hooks/useParserOperations.js";
|
|
13
13
|
import "../../hooks/index.js";
|
|
14
|
-
import { getWidgetBinding as
|
|
14
|
+
import { getWidgetBinding as te, getWidgetBindingStatus as ne, reconcilePanelConfig as re, serializeWidgetBinding as ie } from "../../utils/widgetBinding.js";
|
|
15
15
|
import ae from "./ActionConfigDialog.js";
|
|
16
16
|
import oe from "./webhook-config/WebhookConfigPanel.js";
|
|
17
17
|
import "./webhook-config/index.js";
|
|
@@ -26,12 +26,13 @@ import pe from "../builder/inspector/LayoutSection.js";
|
|
|
26
26
|
import "../builder/inspector/index.js";
|
|
27
27
|
import { DEFAULT_GRID_CONFIG as me } from "../../utils/widgetPositioning.js";
|
|
28
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
|
|
30
|
-
import { Button as
|
|
29
|
+
import { Check as h, ChevronDown as ge, ChevronUp as _e, ExternalLink as ve, Info as ye, Pencil as be, Plus as xe, Trash2 as Se, X as Ce } from "lucide-react";
|
|
30
|
+
import { Button as g, Card as we, CardContent as Te, Input as _, Label as v, Select as Ee, SelectContent as De, SelectItem as y, SelectTrigger as Oe, SelectValue as b, Sheet as ke, SheetContent as Ae, SheetDescription as je, SheetHeader as Me, SheetTitle as Ne, Spinner as Pe, Tabs as Fe, TabsContent as x, TabsList as Ie, TabsTrigger as S, Textarea as C } from "@burdenoff/fe-libs/ui";
|
|
31
31
|
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
32
32
|
import { useI18n as Le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
33
|
+
import { toast as Re } from "sonner";
|
|
33
34
|
//#region src/bigconsole/components/widgets/PropertiesPanel.tsx
|
|
34
|
-
var
|
|
35
|
+
var ze = [
|
|
35
36
|
{
|
|
36
37
|
value: "BIGCONSOLE",
|
|
37
38
|
labelKey: "bigconsole.widget.properties.renderer.bigconsole.label",
|
|
@@ -60,7 +61,7 @@ var Re = [
|
|
|
60
61
|
descriptionKey: "bigconsole.widget.properties.renderer.custom.description",
|
|
61
62
|
description: "Custom React component"
|
|
62
63
|
}
|
|
63
|
-
],
|
|
64
|
+
], Be = [
|
|
64
65
|
{
|
|
65
66
|
value: "DATASINK",
|
|
66
67
|
labelKey: "bigconsole.widget.properties.dataSourceType.datasink.label",
|
|
@@ -104,23 +105,23 @@ var Re = [
|
|
|
104
105
|
description: "Manually enter sample JSON data"
|
|
105
106
|
}
|
|
106
107
|
];
|
|
107
|
-
function
|
|
108
|
+
function Ve(e) {
|
|
108
109
|
return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
|
|
109
110
|
}
|
|
110
|
-
var
|
|
111
|
+
var He = {
|
|
111
112
|
PRIMARY: "bg-action-primary-bg",
|
|
112
113
|
SECONDARY: "bg-[var(--color-text-muted)]",
|
|
113
114
|
SUCCESS: "bg-status-success-bg",
|
|
114
115
|
WARNING: "bg-status-warning-bg",
|
|
115
116
|
DANGER: "bg-status-error-bg"
|
|
116
|
-
},
|
|
117
|
+
}, Ue = "bg-[var(--color-text-muted)]", E = {
|
|
117
118
|
fontWeight: "var(--font-weight-semibold)",
|
|
118
119
|
fontSize: "var(--font-size-body-sm)",
|
|
119
120
|
padding: "6px 10px",
|
|
120
121
|
minHeight: "var(--size-controlHeight-md)",
|
|
121
122
|
flexShrink: 0
|
|
122
123
|
};
|
|
123
|
-
function
|
|
124
|
+
function We(e) {
|
|
124
125
|
if (!e) return {};
|
|
125
126
|
let t = Array.isArray(e) ? e[0] : e;
|
|
126
127
|
if (!t || typeof t != "object") return {};
|
|
@@ -164,7 +165,7 @@ function Ue(e) {
|
|
|
164
165
|
xAxisField: a
|
|
165
166
|
};
|
|
166
167
|
}
|
|
167
|
-
var
|
|
168
|
+
var Ge = he(function({ widget: e, onSave: t }) {
|
|
168
169
|
let { t: r } = Le(), [i, a] = m(""), [o, s] = m(null), c = p(!1);
|
|
169
170
|
d(() => {
|
|
170
171
|
try {
|
|
@@ -173,7 +174,7 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
173
174
|
a("");
|
|
174
175
|
}
|
|
175
176
|
}, [e.id, e.template]);
|
|
176
|
-
let
|
|
177
|
+
let l = u((e) => {
|
|
177
178
|
let n = e.target.value;
|
|
178
179
|
if (a(n), n.trim() === "") s(null), t({});
|
|
179
180
|
else try {
|
|
@@ -182,7 +183,7 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
182
183
|
} catch (e) {
|
|
183
184
|
s(e.message);
|
|
184
185
|
}
|
|
185
|
-
}, [t]),
|
|
186
|
+
}, [t]), ee = u(() => {
|
|
186
187
|
try {
|
|
187
188
|
let e = JSON.parse(i);
|
|
188
189
|
a(JSON.stringify(e, null, 2)), s(null), t(e);
|
|
@@ -206,7 +207,7 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
206
207
|
children: [
|
|
207
208
|
/* @__PURE__ */ w(C, {
|
|
208
209
|
value: i,
|
|
209
|
-
onChange:
|
|
210
|
+
onChange: l,
|
|
210
211
|
spellCheck: !1,
|
|
211
212
|
placeholder: r("bigconsole.widget.properties.template.placeholder", "Enter {{renderer}} template JSON...", { renderer: e.renderer ?? "" }),
|
|
212
213
|
style: {
|
|
@@ -230,10 +231,10 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
230
231
|
}),
|
|
231
232
|
/* @__PURE__ */ T("div", {
|
|
232
233
|
className: "mt-control-gap flex flex-wrap items-center gap-control-gap",
|
|
233
|
-
children: [/* @__PURE__ */ w(
|
|
234
|
+
children: [/* @__PURE__ */ w(g, {
|
|
234
235
|
variant: "outline",
|
|
235
236
|
size: "sm",
|
|
236
|
-
onClick:
|
|
237
|
+
onClick: ee,
|
|
237
238
|
disabled: !!o || i.trim() === "",
|
|
238
239
|
style: {
|
|
239
240
|
height: "var(--size-controlHeight-sm)",
|
|
@@ -274,7 +275,7 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
274
275
|
fontWeight: "var(--font-weight-medium)",
|
|
275
276
|
textDecoration: "none"
|
|
276
277
|
},
|
|
277
|
-
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ w(
|
|
278
|
+
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ w(ve, { style: {
|
|
278
279
|
height: "var(--size-icon-sm)",
|
|
279
280
|
width: "var(--size-icon-sm)"
|
|
280
281
|
} })]
|
|
@@ -292,7 +293,7 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
292
293
|
fontWeight: "var(--font-weight-medium)",
|
|
293
294
|
textDecoration: "none"
|
|
294
295
|
},
|
|
295
|
-
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ w(
|
|
296
|
+
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ w(ve, { style: {
|
|
296
297
|
height: "var(--size-icon-sm)",
|
|
297
298
|
width: "var(--size-icon-sm)"
|
|
298
299
|
} })]
|
|
@@ -302,8 +303,8 @@ var We = he(function({ widget: e, onSave: t }) {
|
|
|
302
303
|
]
|
|
303
304
|
});
|
|
304
305
|
});
|
|
305
|
-
function
|
|
306
|
-
let t = e, n =
|
|
306
|
+
function Ke(e) {
|
|
307
|
+
let t = e, n = te({
|
|
307
308
|
dataSinkId: t.dataSinkId,
|
|
308
309
|
parserId: t.parserId,
|
|
309
310
|
config: e.config || {}
|
|
@@ -322,63 +323,63 @@ function Ge(e) {
|
|
|
322
323
|
drilldownConfig: e.drilldown ? {
|
|
323
324
|
enabled: e.drilldown.enabled ?? !1,
|
|
324
325
|
targetDashboardId: e.drilldown.targetDashboardId ?? "",
|
|
326
|
+
targetPageId: e.drilldown.targetPageId ?? null,
|
|
325
327
|
navigationMode: e.drilldown.navigationMode ?? "MODAL",
|
|
326
328
|
parameterMapping: e.drilldown.parameterMapping ?? {},
|
|
327
329
|
passGlobalFilters: e.drilldown.passGlobalFilters ?? !0,
|
|
328
|
-
maxDepth: e.drilldown.maxDepth ?? 3
|
|
329
|
-
openIn: e.drilldown.openIn ?? "same"
|
|
330
|
+
maxDepth: e.drilldown.maxDepth ?? 3
|
|
330
331
|
} : void 0
|
|
331
332
|
};
|
|
332
333
|
}
|
|
333
|
-
var D = he(function({ isOpen: he, onClose:
|
|
334
|
-
let { t: D } = Le(), [
|
|
334
|
+
var D = he(function({ isOpen: he, onClose: ve }) {
|
|
335
|
+
let { t: D } = Le(), [qe, Je] = m("general"), [O, k] = m("idle"), [A, j] = m(null), [M, N] = m(!1), P = e((e) => e.selectedWidgetId), Ye = e((e) => e.widgets), F = e((e) => e.updateWidget), Xe = e((e) => e.updateWidgetPosition), Ze = t(), I = P ? Ye.get(P) : void 0, Qe = I ? {
|
|
335
336
|
x: I.position?.x ?? I.positionX ?? 0,
|
|
336
337
|
y: I.position?.y ?? I.positionY ?? 0,
|
|
337
338
|
width: I.position?.width ?? I.positionWidth ?? 4,
|
|
338
339
|
height: I.position?.height ?? I.positionHeight ?? 4
|
|
339
|
-
} : null,
|
|
340
|
-
P &&
|
|
341
|
-
}, [P,
|
|
342
|
-
|
|
340
|
+
} : null, $e = u((e) => {
|
|
341
|
+
P && Xe(P, e);
|
|
342
|
+
}, [P, Xe]), et = p(null), tt = p({}), nt = p(0), L = u(() => {
|
|
343
|
+
nt.current += 1, N(!0);
|
|
343
344
|
}, []);
|
|
344
345
|
d(() => {
|
|
345
346
|
if (!P) {
|
|
346
|
-
|
|
347
|
+
et.current = null, j(null), N(!1), k("idle");
|
|
347
348
|
return;
|
|
348
349
|
}
|
|
349
|
-
let e =
|
|
350
|
-
if (
|
|
350
|
+
let e = et.current !== P;
|
|
351
|
+
if (et.current = P, I) {
|
|
351
352
|
if (M && !e) return;
|
|
352
|
-
j(
|
|
353
|
+
j(Ke(I)), tt.current = I.config || {}, N(!1), k("idle");
|
|
353
354
|
} else j(null), N(!1), k("idle");
|
|
354
355
|
}, [
|
|
355
356
|
P,
|
|
356
357
|
I,
|
|
357
358
|
M
|
|
358
359
|
]);
|
|
359
|
-
let { updateWidget:
|
|
360
|
+
let { updateWidget: rt } = a(I?.pageId, I?.dashboardId, { skipFetch: !0 }), { createDrilldown: it, updateDrilldown: at, deleteDrilldown: ot } = o(), { dataSinks: R } = l({ skipFetch: !1 }), [st, ct] = m(null), { executeParser: lt } = ee({
|
|
360
361
|
consoleId: I?.dashboardId,
|
|
361
362
|
skipFetch: !0
|
|
362
|
-
}), [
|
|
363
|
+
}), [ut, dt] = m(!1), [ft, z] = m(void 0), [pt, B] = m(!1), [mt, V] = m(null);
|
|
363
364
|
d(() => {
|
|
364
|
-
z(void 0), B(!1), V(null),
|
|
365
|
+
z(void 0), B(!1), V(null), dt(!1);
|
|
365
366
|
}, [P]);
|
|
366
|
-
let { actions: H, loading:
|
|
367
|
+
let { actions: H, loading: ht, createAction: gt, updateAction: _t, deleteAction: vt, reorderActions: U } = s(P || void 0), { webhooks: yt, loading: bt, createWebhook: xt, updateWebhook: St, deleteWebhook: W, refetch: Ct } = c({
|
|
367
368
|
widgetId: P || void 0,
|
|
368
369
|
skipFetch: !P
|
|
369
370
|
}), G = u((e, t) => {
|
|
370
|
-
let n =
|
|
371
|
+
let n = Ve(t);
|
|
371
372
|
return e.find((e) => e.widgetId === P && e.eventPattern === n) ?? null;
|
|
372
|
-
}, [P]), K = u((e) => G(
|
|
373
|
+
}, [P]), K = u((e) => G(yt, e), [G, yt]), wt = u(async (e, t) => {
|
|
373
374
|
if (!P || t === void 0) return !0;
|
|
374
|
-
let n =
|
|
375
|
-
return !r &&
|
|
375
|
+
let n = Ve(e), r = K(e);
|
|
376
|
+
return !r && bt && (r = G((await Ct())?.data?.listEventWebhookMappings ?? [], e)), t && t.url ? r ? await St({
|
|
376
377
|
id: r.id,
|
|
377
378
|
eventPattern: n,
|
|
378
379
|
webhookUrl: t.url,
|
|
379
380
|
method: t.method,
|
|
380
381
|
isActive: !0
|
|
381
|
-
}) !== null : await
|
|
382
|
+
}) !== null : await xt({
|
|
382
383
|
widgetId: P,
|
|
383
384
|
eventPattern: n,
|
|
384
385
|
webhookUrl: t.url,
|
|
@@ -387,42 +388,42 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
387
388
|
}, [
|
|
388
389
|
P,
|
|
389
390
|
K,
|
|
390
|
-
yt,
|
|
391
|
-
St,
|
|
392
|
-
G,
|
|
393
391
|
bt,
|
|
392
|
+
Ct,
|
|
393
|
+
G,
|
|
394
394
|
xt,
|
|
395
|
+
St,
|
|
395
396
|
W
|
|
396
|
-
]), [
|
|
397
|
+
]), [Tt, q] = m(!1), [J, Y] = m(void 0), [Et, Dt] = m(!1), [Ot, X] = m(void 0), [kt, Z] = m(null), At = f(() => {
|
|
397
398
|
if (!J) return null;
|
|
398
399
|
let e = K(J.name);
|
|
399
400
|
return e ? {
|
|
400
401
|
url: e.webhookUrl,
|
|
401
402
|
method: e.method
|
|
402
403
|
} : null;
|
|
403
|
-
}, [J, K]),
|
|
404
|
+
}, [J, K]), jt = Ot === void 0 ? At : Ot, Mt = f(() => {
|
|
404
405
|
let e = /* @__PURE__ */ new Map();
|
|
405
406
|
for (let t of H) {
|
|
406
407
|
let n = K(t.name);
|
|
407
408
|
n && e.set(t.name, n);
|
|
408
409
|
}
|
|
409
410
|
return e;
|
|
410
|
-
}, [H, K]),
|
|
411
|
+
}, [H, K]), Nt = u(() => {
|
|
411
412
|
X(void 0), Z(null), Y(void 0), q(!0);
|
|
412
|
-
}, []),
|
|
413
|
+
}, []), Pt = u((e) => {
|
|
413
414
|
X(void 0), Z(null), Y(e), q(!0);
|
|
414
|
-
}, []),
|
|
415
|
+
}, []), Ft = u(async (e, t) => {
|
|
415
416
|
if (P) {
|
|
416
|
-
|
|
417
|
+
Dt(!0), Z(null);
|
|
417
418
|
try {
|
|
418
419
|
let n = "id" in e && !!e.id, r = null;
|
|
419
|
-
if (r = n ? await
|
|
420
|
+
if (r = n ? await _t(e) : await gt(e), r) {
|
|
420
421
|
let e = [...H];
|
|
421
422
|
if (n) {
|
|
422
423
|
let t = e.findIndex((e) => e.id === r?.id);
|
|
423
424
|
t >= 0 && (e[t] = r);
|
|
424
425
|
} else e.push(r);
|
|
425
|
-
if (F(P, { actions: e.sort((e, t) => e.order - t.order) }), !await
|
|
426
|
+
if (F(P, { actions: e.sort((e, t) => e.order - t.order) }), !await wt(r.name, t)) {
|
|
426
427
|
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);
|
|
427
428
|
return;
|
|
428
429
|
}
|
|
@@ -431,21 +432,21 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
431
432
|
} catch (e) {
|
|
432
433
|
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."));
|
|
433
434
|
} finally {
|
|
434
|
-
|
|
435
|
+
Dt(!1);
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
438
|
}, [
|
|
438
439
|
P,
|
|
439
440
|
H,
|
|
440
|
-
ht,
|
|
441
441
|
gt,
|
|
442
|
+
_t,
|
|
442
443
|
F,
|
|
443
|
-
|
|
444
|
+
wt,
|
|
444
445
|
D
|
|
445
|
-
]),
|
|
446
|
+
]), It = u(async (e) => {
|
|
446
447
|
if (P && window.confirm(D("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
|
|
447
448
|
let t = H.find((t) => t.id === e);
|
|
448
|
-
if (await
|
|
449
|
+
if (await vt(e) && (F(P, { actions: H.filter((t) => t.id !== e) }), t)) {
|
|
449
450
|
let e = K(t.name);
|
|
450
451
|
e && await W(e.id);
|
|
451
452
|
}
|
|
@@ -453,12 +454,12 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
453
454
|
}, [
|
|
454
455
|
P,
|
|
455
456
|
H,
|
|
456
|
-
|
|
457
|
+
vt,
|
|
457
458
|
F,
|
|
458
459
|
K,
|
|
459
460
|
W,
|
|
460
461
|
D
|
|
461
|
-
]),
|
|
462
|
+
]), Lt = u(async (e) => {
|
|
462
463
|
if (!P || e === 0) return;
|
|
463
464
|
let t = [...H].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
|
|
464
465
|
[n[e - 1], n[e]] = [n[e], n[e - 1]], await U(n) && F(P, { actions: t.map((e, t) => ({
|
|
@@ -470,7 +471,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
470
471
|
H,
|
|
471
472
|
U,
|
|
472
473
|
F
|
|
473
|
-
]),
|
|
474
|
+
]), Rt = u(async (e) => {
|
|
474
475
|
if (!P) return;
|
|
475
476
|
let t = [...H].sort((e, t) => e.order - t.order);
|
|
476
477
|
if (e === t.length - 1) return;
|
|
@@ -486,11 +487,11 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
486
487
|
F
|
|
487
488
|
]);
|
|
488
489
|
d(() => {
|
|
489
|
-
P && H.length >= 0 && !
|
|
490
|
+
P && H.length >= 0 && !ht && F(P, { actions: H });
|
|
490
491
|
}, [
|
|
491
492
|
P,
|
|
492
493
|
H,
|
|
493
|
-
|
|
494
|
+
ht,
|
|
494
495
|
F
|
|
495
496
|
]);
|
|
496
497
|
let Q = u((e, t) => {
|
|
@@ -507,11 +508,11 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
507
508
|
d(() => {
|
|
508
509
|
if (A?.dataSinkId && R.length > 0) {
|
|
509
510
|
let e = R.find((e) => e.id === A.dataSinkId);
|
|
510
|
-
e &&
|
|
511
|
-
} else
|
|
511
|
+
e && ct(e.key);
|
|
512
|
+
} else ct(null);
|
|
512
513
|
}, [A?.dataSinkId, R]);
|
|
513
|
-
let
|
|
514
|
-
if (z(void 0), B(!1), V(null),
|
|
514
|
+
let zt = u((e) => {
|
|
515
|
+
if (z(void 0), B(!1), V(null), ct(e), e) {
|
|
515
516
|
let t = R.find((t) => t.key === e);
|
|
516
517
|
t && (Q("dataSinkId", t.id), j((t) => t && {
|
|
517
518
|
...t,
|
|
@@ -532,14 +533,14 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
532
533
|
R,
|
|
533
534
|
Q,
|
|
534
535
|
L
|
|
535
|
-
]),
|
|
536
|
+
]), Bt = u(async (e) => {
|
|
536
537
|
if (Q("parserId", e || void 0), z(void 0), B(!1), V(null), e && I) {
|
|
537
|
-
|
|
538
|
+
dt(!0);
|
|
538
539
|
try {
|
|
539
|
-
let t = await
|
|
540
|
+
let t = await lt(e);
|
|
540
541
|
if (t?.success) {
|
|
541
542
|
z(t.output), B(!0);
|
|
542
|
-
let e =
|
|
543
|
+
let e = We(t.output);
|
|
543
544
|
(e.labelField || e.valueField) && (j((t) => {
|
|
544
545
|
if (!t) return t;
|
|
545
546
|
let n = t.config || {}, r = { ...n };
|
|
@@ -552,31 +553,31 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
552
553
|
} catch (e) {
|
|
553
554
|
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);
|
|
554
555
|
} finally {
|
|
555
|
-
|
|
556
|
+
dt(!1);
|
|
556
557
|
}
|
|
557
558
|
}
|
|
558
559
|
}, [
|
|
559
560
|
Q,
|
|
560
|
-
|
|
561
|
+
lt,
|
|
561
562
|
I,
|
|
562
563
|
L,
|
|
563
564
|
D
|
|
564
|
-
]),
|
|
565
|
+
]), Vt = u(async () => {
|
|
565
566
|
if (!I || !A) return;
|
|
566
|
-
let t =
|
|
567
|
+
let t = nt.current;
|
|
567
568
|
k("saving");
|
|
568
569
|
try {
|
|
569
570
|
let n = {
|
|
570
571
|
...I.metadata || {},
|
|
571
572
|
description: A.description || ""
|
|
572
|
-
}, r = re(e.getState().widgets.get(I.id)?.config ?? {},
|
|
573
|
+
}, r = re(e.getState().widgets.get(I.id)?.config ?? {}, tt.current, A.config), i = ie(te({
|
|
573
574
|
dataSinkId: A.dataSinkId,
|
|
574
575
|
parserId: A.parserId,
|
|
575
576
|
config: {
|
|
576
577
|
...r,
|
|
577
578
|
binding: void 0
|
|
578
579
|
}
|
|
579
|
-
}), r), a = await
|
|
580
|
+
}), r), a = await rt({
|
|
580
581
|
id: I.id,
|
|
581
582
|
title: A.title,
|
|
582
583
|
renderer: A.renderer,
|
|
@@ -588,82 +589,91 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
588
589
|
parserId: i.parserId,
|
|
589
590
|
parserRules: A.parserRules,
|
|
590
591
|
metadata: n
|
|
591
|
-
}), o = I.drilldown;
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
}
|
|
592
|
+
}), o = I.drilldown, s = null, c = I.drilldown?.id;
|
|
593
|
+
try {
|
|
594
|
+
if (A.drilldownConfig) {
|
|
595
|
+
let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } = A.drilldownConfig;
|
|
596
|
+
if (c && !e) await ot(c), o = void 0;
|
|
597
|
+
else if (c) {
|
|
598
|
+
let l = await at({
|
|
599
|
+
id: c,
|
|
600
|
+
targetDashboardId: t,
|
|
601
|
+
targetPageId: n,
|
|
602
|
+
parameterMapping: i,
|
|
603
|
+
navigationMode: r,
|
|
604
|
+
enabled: e,
|
|
605
|
+
passGlobalFilters: a,
|
|
606
|
+
maxDepth: s
|
|
607
|
+
});
|
|
608
|
+
l && (o = l);
|
|
609
|
+
} else if (e && t) {
|
|
610
|
+
let e = await it({
|
|
611
|
+
sourceWidgetId: I.id,
|
|
612
|
+
targetDashboardId: t,
|
|
613
|
+
targetPageId: n,
|
|
614
|
+
parameterMapping: i || {},
|
|
615
|
+
navigationMode: r,
|
|
616
|
+
passGlobalFilters: a,
|
|
617
|
+
maxDepth: s
|
|
618
|
+
});
|
|
619
|
+
e && (o = e);
|
|
620
|
+
}
|
|
620
621
|
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
622
|
+
} catch (e) {
|
|
623
|
+
s = e instanceof Error ? e : Error(String(e));
|
|
624
|
+
}
|
|
625
|
+
if (a) {
|
|
626
|
+
if (F(I.id, {
|
|
627
|
+
title: A.title,
|
|
628
|
+
description: A.description,
|
|
629
|
+
renderer: A.renderer,
|
|
630
|
+
template: A.template,
|
|
631
|
+
config: i.config,
|
|
632
|
+
refreshInterval: A.refreshInterval,
|
|
633
|
+
dataSinkId: i.dataSinkId,
|
|
634
|
+
datasetId: A.datasetId,
|
|
635
|
+
parserId: i.parserId,
|
|
636
|
+
parserRules: A.parserRules,
|
|
637
|
+
drilldown: o,
|
|
638
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
639
|
+
}), s) {
|
|
640
|
+
k("error"), Re.error(D("bigconsole.widget.drilldown.saveFailed", "Drilldown not saved"), { description: s.message });
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
k("saved"), nt.current === t && N(!1), setTimeout(() => k("idle"), 2e3);
|
|
644
|
+
} else k("error");
|
|
636
645
|
} catch {
|
|
637
646
|
k("error");
|
|
638
647
|
}
|
|
639
648
|
}, [
|
|
640
649
|
I,
|
|
641
650
|
A,
|
|
642
|
-
nt,
|
|
643
|
-
F,
|
|
644
651
|
rt,
|
|
652
|
+
F,
|
|
645
653
|
it,
|
|
646
|
-
at
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
654
|
+
at,
|
|
655
|
+
ot,
|
|
656
|
+
D
|
|
657
|
+
]), Ht = u(() => {
|
|
658
|
+
I && (j(Ke(I)), tt.current = I.config || {}, N(!1), k("idle"));
|
|
659
|
+
}, [I]), Ut = u((e) => {
|
|
650
660
|
$(e);
|
|
651
|
-
}, [$]),
|
|
661
|
+
}, [$]), Wt = u((e) => {
|
|
652
662
|
j((t) => t && {
|
|
653
663
|
...t,
|
|
654
664
|
drilldownConfig: e
|
|
655
665
|
}), L();
|
|
656
|
-
}, [L]),
|
|
666
|
+
}, [L]), Gt = I ? i(I.type) : null, Kt = f(() => ze.map((e) => ({
|
|
657
667
|
value: e.value,
|
|
658
668
|
label: D(e.labelKey, e.label),
|
|
659
669
|
description: D(e.descriptionKey, e.description)
|
|
660
|
-
})), [D]),
|
|
670
|
+
})), [D]), qt = f(() => Be.map((e) => ({
|
|
661
671
|
value: e.value,
|
|
662
672
|
label: D(e.labelKey, e.label)
|
|
663
673
|
})), [D]);
|
|
664
674
|
return /* @__PURE__ */ w(ke, {
|
|
665
675
|
open: he,
|
|
666
|
-
onOpenChange: (e) => !e &&
|
|
676
|
+
onOpenChange: (e) => !e && ve(),
|
|
667
677
|
modal: !1,
|
|
668
678
|
children: /* @__PURE__ */ T(Ae, {
|
|
669
679
|
style: {
|
|
@@ -701,7 +711,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
701
711
|
boxShadow: "var(--shadow-elevation-2)",
|
|
702
712
|
flexShrink: 0
|
|
703
713
|
},
|
|
704
|
-
children: /* @__PURE__ */ w(
|
|
714
|
+
children: /* @__PURE__ */ w(ye, { style: {
|
|
705
715
|
height: "var(--size-icon-md)",
|
|
706
716
|
width: "var(--size-icon-md)",
|
|
707
717
|
color: "var(--color-action-primary-text)"
|
|
@@ -736,27 +746,27 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
736
746
|
width: "var(--size-icon-sm)",
|
|
737
747
|
color: "var(--color-status-success-bg)"
|
|
738
748
|
} }),
|
|
739
|
-
O === "error" && /* @__PURE__ */ w(
|
|
749
|
+
O === "error" && /* @__PURE__ */ w(Ce, { style: {
|
|
740
750
|
height: "var(--size-icon-sm)",
|
|
741
751
|
width: "var(--size-icon-sm)",
|
|
742
752
|
color: "var(--color-status-error-bg)"
|
|
743
753
|
} })
|
|
744
754
|
]
|
|
745
|
-
}),
|
|
755
|
+
}), Gt && /* @__PURE__ */ w(je, {
|
|
746
756
|
style: {
|
|
747
757
|
fontSize: "var(--font-size-body-sm)",
|
|
748
758
|
color: "var(--color-text-secondary)",
|
|
749
759
|
margin: "var(--space-controlGap) 0 0 0",
|
|
750
760
|
fontWeight: "var(--font-weight-medium)"
|
|
751
761
|
},
|
|
752
|
-
children:
|
|
762
|
+
children: Gt.name
|
|
753
763
|
})]
|
|
754
764
|
})]
|
|
755
765
|
})
|
|
756
766
|
}),
|
|
757
767
|
I ? /* @__PURE__ */ T(Fe, {
|
|
758
|
-
value:
|
|
759
|
-
onValueChange: (e) =>
|
|
768
|
+
value: qe,
|
|
769
|
+
onValueChange: (e) => Je(e),
|
|
760
770
|
style: {
|
|
761
771
|
flex: 1,
|
|
762
772
|
display: "flex",
|
|
@@ -829,13 +839,13 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
829
839
|
className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
830
840
|
children: H.length
|
|
831
841
|
}) : void 0,
|
|
832
|
-
actions: /* @__PURE__ */ T(
|
|
842
|
+
actions: /* @__PURE__ */ T(g, {
|
|
833
843
|
size: "sm",
|
|
834
|
-
onClick:
|
|
835
|
-
children: [/* @__PURE__ */ w(
|
|
844
|
+
onClick: Nt,
|
|
845
|
+
children: [/* @__PURE__ */ w(xe, { className: "size-4" }), D("bigconsole.widget.properties.actions.add", "Add button")]
|
|
836
846
|
}),
|
|
837
847
|
"data-testid": "widget-inspector-actions",
|
|
838
|
-
children:
|
|
848
|
+
children: ht ? /* @__PURE__ */ w("div", {
|
|
839
849
|
className: "flex justify-center py-8",
|
|
840
850
|
children: /* @__PURE__ */ w(Pe, { className: "size-6" })
|
|
841
851
|
}) : H.length === 0 ? /* @__PURE__ */ w("p", {
|
|
@@ -843,24 +853,24 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
843
853
|
children: D("bigconsole.widget.properties.actions.empty", "No buttons yet — add one to let viewers take an action.")
|
|
844
854
|
}) : /* @__PURE__ */ w("div", {
|
|
845
855
|
className: "space-y-2",
|
|
846
|
-
children: [...H].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ w(
|
|
856
|
+
children: [...H].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ w(we, {
|
|
847
857
|
className: e.disabled ? "opacity-60" : "",
|
|
848
|
-
children: /* @__PURE__ */ T(
|
|
858
|
+
children: /* @__PURE__ */ T(Te, {
|
|
849
859
|
className: "p-3 flex items-center gap-2",
|
|
850
860
|
children: [
|
|
851
861
|
/* @__PURE__ */ T("div", {
|
|
852
862
|
className: "flex flex-col gap-0.5",
|
|
853
|
-
children: [/* @__PURE__ */ w(
|
|
863
|
+
children: [/* @__PURE__ */ w(g, {
|
|
854
864
|
variant: "ghost",
|
|
855
865
|
size: "icon-sm",
|
|
856
|
-
onClick: () =>
|
|
866
|
+
onClick: () => Lt(t),
|
|
857
867
|
disabled: t === 0,
|
|
858
868
|
className: "h-5 w-5",
|
|
859
869
|
children: /* @__PURE__ */ w(_e, { className: "size-3" })
|
|
860
|
-
}), /* @__PURE__ */ w(
|
|
870
|
+
}), /* @__PURE__ */ w(g, {
|
|
861
871
|
variant: "ghost",
|
|
862
872
|
size: "icon-sm",
|
|
863
|
-
onClick: () =>
|
|
873
|
+
onClick: () => Rt(t),
|
|
864
874
|
disabled: t === H.length - 1,
|
|
865
875
|
className: "h-5 w-5",
|
|
866
876
|
children: /* @__PURE__ */ w(ge, { className: "size-3" })
|
|
@@ -872,33 +882,33 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
872
882
|
className: "flex items-center gap-2",
|
|
873
883
|
children: [/* @__PURE__ */ w("span", {
|
|
874
884
|
"aria-hidden": "true",
|
|
875
|
-
className: `size-2 shrink-0 rounded-full ${
|
|
885
|
+
className: `size-2 shrink-0 rounded-full ${He[e.style] || Ue}`
|
|
876
886
|
}), /* @__PURE__ */ w("span", {
|
|
877
887
|
className: "text-sm font-medium truncate",
|
|
878
888
|
children: e.label
|
|
879
889
|
})]
|
|
880
890
|
}), /* @__PURE__ */ w("p", {
|
|
881
891
|
className: "text-xs text-text-secondary truncate",
|
|
882
|
-
children:
|
|
883
|
-
method:
|
|
884
|
-
url:
|
|
892
|
+
children: Mt.has(e.name) ? D("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
|
|
893
|
+
method: Mt.get(e.name)?.method ?? "",
|
|
894
|
+
url: Mt.get(e.name)?.webhookUrl ?? ""
|
|
885
895
|
}) : D("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
|
|
886
896
|
})]
|
|
887
897
|
}),
|
|
888
898
|
/* @__PURE__ */ T("div", {
|
|
889
899
|
className: "flex shrink-0 gap-1",
|
|
890
|
-
children: [/* @__PURE__ */ w(
|
|
900
|
+
children: [/* @__PURE__ */ w(g, {
|
|
891
901
|
variant: "ghost",
|
|
892
902
|
size: "icon-sm",
|
|
893
903
|
"aria-label": `Edit ${e.label}`,
|
|
894
|
-
onClick: () =>
|
|
895
|
-
children: /* @__PURE__ */ w(
|
|
896
|
-
}), /* @__PURE__ */ w(
|
|
904
|
+
onClick: () => Pt(e),
|
|
905
|
+
children: /* @__PURE__ */ w(be, { className: "size-4" })
|
|
906
|
+
}), /* @__PURE__ */ w(g, {
|
|
897
907
|
variant: "ghost",
|
|
898
908
|
size: "icon-sm",
|
|
899
909
|
"aria-label": `Delete ${e.label}`,
|
|
900
|
-
onClick: () =>
|
|
901
|
-
children: /* @__PURE__ */ w(
|
|
910
|
+
onClick: () => It(e.id),
|
|
911
|
+
children: /* @__PURE__ */ w(Se, { className: "size-4" })
|
|
902
912
|
})]
|
|
903
913
|
})
|
|
904
914
|
]
|
|
@@ -906,10 +916,10 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
906
916
|
}, e.id))
|
|
907
917
|
})
|
|
908
918
|
}),
|
|
909
|
-
|
|
910
|
-
position:
|
|
919
|
+
Ze && Qe && /* @__PURE__ */ w(pe, {
|
|
920
|
+
position: Qe,
|
|
911
921
|
columns: me.cols,
|
|
912
|
-
onChange:
|
|
922
|
+
onChange: $e
|
|
913
923
|
})
|
|
914
924
|
] })
|
|
915
925
|
}),
|
|
@@ -917,7 +927,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
917
927
|
value: "data",
|
|
918
928
|
className: "mt-0",
|
|
919
929
|
children: A && /* @__PURE__ */ T(r, { children: [(() => {
|
|
920
|
-
let e =
|
|
930
|
+
let e = te({
|
|
921
931
|
dataSinkId: A.dataSinkId,
|
|
922
932
|
parserId: A.parserId,
|
|
923
933
|
config: {
|
|
@@ -926,22 +936,22 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
926
936
|
}
|
|
927
937
|
}), t = ne({
|
|
928
938
|
binding: e,
|
|
929
|
-
loading:
|
|
930
|
-
error:
|
|
931
|
-
preview:
|
|
932
|
-
previewComplete:
|
|
939
|
+
loading: ut,
|
|
940
|
+
error: mt,
|
|
941
|
+
preview: ft,
|
|
942
|
+
previewComplete: pt
|
|
933
943
|
});
|
|
934
944
|
return /* @__PURE__ */ w(fe, {
|
|
935
945
|
consoleId: I?.dashboardId || "",
|
|
936
946
|
binding: e,
|
|
937
|
-
dataSinkKey:
|
|
947
|
+
dataSinkKey: st,
|
|
938
948
|
dataPath: typeof A.config.dataPath == "string" ? A.config.dataPath : void 0,
|
|
939
949
|
status: t.status,
|
|
940
950
|
missingFields: t.missingFields,
|
|
941
|
-
preview:
|
|
942
|
-
error:
|
|
943
|
-
onDataSinkChange:
|
|
944
|
-
onParserChange:
|
|
951
|
+
preview: ft,
|
|
952
|
+
error: mt,
|
|
953
|
+
onDataSinkChange: zt,
|
|
954
|
+
onParserChange: Bt,
|
|
945
955
|
onDataPathChange: (e) => $({
|
|
946
956
|
...A.config,
|
|
947
957
|
dataPath: e
|
|
@@ -958,19 +968,19 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
958
968
|
children: [
|
|
959
969
|
/* @__PURE__ */ T("div", {
|
|
960
970
|
className: "space-y-2",
|
|
961
|
-
children: [/* @__PURE__ */ w(
|
|
971
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ T(Ee, {
|
|
962
972
|
value: A.config?.dataSourceType || "",
|
|
963
973
|
onValueChange: (e) => $({
|
|
964
974
|
...A.config,
|
|
965
975
|
dataSourceType: e || void 0
|
|
966
976
|
}),
|
|
967
|
-
children: [/* @__PURE__ */ w(
|
|
977
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
968
978
|
style: {
|
|
969
979
|
height: "var(--size-controlHeight-md)",
|
|
970
980
|
fontSize: "var(--font-size-body-sm)"
|
|
971
981
|
},
|
|
972
|
-
children: /* @__PURE__ */ w(
|
|
973
|
-
}), /* @__PURE__ */ w(
|
|
982
|
+
children: /* @__PURE__ */ w(b, { placeholder: D("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
|
|
983
|
+
}), /* @__PURE__ */ w(De, {
|
|
974
984
|
position: "popper",
|
|
975
985
|
side: "bottom",
|
|
976
986
|
sideOffset: 4,
|
|
@@ -983,7 +993,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
983
993
|
boxShadow: "var(--shadow-elevation-3)",
|
|
984
994
|
borderRadius: "var(--radius-button)"
|
|
985
995
|
},
|
|
986
|
-
children:
|
|
996
|
+
children: qt.map((e) => /* @__PURE__ */ w(y, {
|
|
987
997
|
value: e.value,
|
|
988
998
|
children: e.label
|
|
989
999
|
}, e.value))
|
|
@@ -995,7 +1005,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
995
1005
|
children: [
|
|
996
1006
|
/* @__PURE__ */ T("div", {
|
|
997
1007
|
className: "space-y-2",
|
|
998
|
-
children: [/* @__PURE__ */ w(
|
|
1008
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.rest.endpointUrlLabel", "Endpoint URL *") }), /* @__PURE__ */ w(_, {
|
|
999
1009
|
value: A.config?.endpointUrl || "",
|
|
1000
1010
|
onChange: (e) => $({
|
|
1001
1011
|
...A.config,
|
|
@@ -1006,33 +1016,33 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1006
1016
|
}),
|
|
1007
1017
|
/* @__PURE__ */ T("div", {
|
|
1008
1018
|
className: "space-y-2",
|
|
1009
|
-
children: [/* @__PURE__ */ w(
|
|
1019
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ T(Ee, {
|
|
1010
1020
|
value: A.config?.httpMethod || "GET",
|
|
1011
1021
|
onValueChange: (e) => $({
|
|
1012
1022
|
...A.config,
|
|
1013
1023
|
httpMethod: e
|
|
1014
1024
|
}),
|
|
1015
|
-
children: [/* @__PURE__ */ w(
|
|
1025
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
1016
1026
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1017
|
-
children: /* @__PURE__ */ w(
|
|
1018
|
-
}), /* @__PURE__ */ T(
|
|
1027
|
+
children: /* @__PURE__ */ w(b, {})
|
|
1028
|
+
}), /* @__PURE__ */ T(De, {
|
|
1019
1029
|
position: "popper",
|
|
1020
1030
|
side: "bottom",
|
|
1021
1031
|
sideOffset: 4,
|
|
1022
1032
|
children: [
|
|
1023
|
-
/* @__PURE__ */ w(
|
|
1033
|
+
/* @__PURE__ */ w(y, {
|
|
1024
1034
|
value: "GET",
|
|
1025
1035
|
children: "GET"
|
|
1026
1036
|
}),
|
|
1027
|
-
/* @__PURE__ */ w(
|
|
1037
|
+
/* @__PURE__ */ w(y, {
|
|
1028
1038
|
value: "POST",
|
|
1029
1039
|
children: "POST"
|
|
1030
1040
|
}),
|
|
1031
|
-
/* @__PURE__ */ w(
|
|
1041
|
+
/* @__PURE__ */ w(y, {
|
|
1032
1042
|
value: "PUT",
|
|
1033
1043
|
children: "PUT"
|
|
1034
1044
|
}),
|
|
1035
|
-
/* @__PURE__ */ w(
|
|
1045
|
+
/* @__PURE__ */ w(y, {
|
|
1036
1046
|
value: "DELETE",
|
|
1037
1047
|
children: "DELETE"
|
|
1038
1048
|
})
|
|
@@ -1042,7 +1052,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1042
1052
|
}),
|
|
1043
1053
|
/* @__PURE__ */ T("div", {
|
|
1044
1054
|
className: "space-y-2",
|
|
1045
|
-
children: [/* @__PURE__ */ w(
|
|
1055
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.rest.headersLabel", "Headers (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1046
1056
|
value: A.config?.headers || "",
|
|
1047
1057
|
onChange: (e) => $({
|
|
1048
1058
|
...A.config,
|
|
@@ -1055,33 +1065,33 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1055
1065
|
}),
|
|
1056
1066
|
/* @__PURE__ */ T("div", {
|
|
1057
1067
|
className: "space-y-2",
|
|
1058
|
-
children: [/* @__PURE__ */ w(
|
|
1068
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ T(Ee, {
|
|
1059
1069
|
value: A.config?.authType || "none",
|
|
1060
1070
|
onValueChange: (e) => $({
|
|
1061
1071
|
...A.config,
|
|
1062
1072
|
authType: e
|
|
1063
1073
|
}),
|
|
1064
|
-
children: [/* @__PURE__ */ w(
|
|
1074
|
+
children: [/* @__PURE__ */ w(Oe, {
|
|
1065
1075
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1066
|
-
children: /* @__PURE__ */ w(
|
|
1067
|
-
}), /* @__PURE__ */ T(
|
|
1076
|
+
children: /* @__PURE__ */ w(b, {})
|
|
1077
|
+
}), /* @__PURE__ */ T(De, {
|
|
1068
1078
|
position: "popper",
|
|
1069
1079
|
side: "bottom",
|
|
1070
1080
|
sideOffset: 4,
|
|
1071
1081
|
children: [
|
|
1072
|
-
/* @__PURE__ */ w(
|
|
1082
|
+
/* @__PURE__ */ w(y, {
|
|
1073
1083
|
value: "none",
|
|
1074
1084
|
children: D("bigconsole.widget.properties.rest.authNone", "None")
|
|
1075
1085
|
}),
|
|
1076
|
-
/* @__PURE__ */ w(
|
|
1086
|
+
/* @__PURE__ */ w(y, {
|
|
1077
1087
|
value: "api_key",
|
|
1078
1088
|
children: D("bigconsole.widget.properties.rest.authApiKey", "API Key")
|
|
1079
1089
|
}),
|
|
1080
|
-
/* @__PURE__ */ w(
|
|
1090
|
+
/* @__PURE__ */ w(y, {
|
|
1081
1091
|
value: "bearer",
|
|
1082
1092
|
children: D("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
|
|
1083
1093
|
}),
|
|
1084
|
-
/* @__PURE__ */ w(
|
|
1094
|
+
/* @__PURE__ */ w(y, {
|
|
1085
1095
|
value: "basic",
|
|
1086
1096
|
children: D("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
|
|
1087
1097
|
})
|
|
@@ -1091,7 +1101,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1091
1101
|
}),
|
|
1092
1102
|
!!(A.config?.authType && A.config.authType !== "none") && /* @__PURE__ */ T("div", {
|
|
1093
1103
|
className: "space-y-2",
|
|
1094
|
-
children: [/* @__PURE__ */ w(
|
|
1104
|
+
children: [/* @__PURE__ */ w(v, { children: String(A.config.authType) === "basic" ? D("bigconsole.widget.properties.rest.credentialsLabel", "Credentials (user:pass)") : D("bigconsole.widget.properties.rest.tokenKeyLabel", "Token/Key") }), /* @__PURE__ */ w(_, {
|
|
1095
1105
|
type: "password",
|
|
1096
1106
|
value: A.config?.authValue || "",
|
|
1097
1107
|
onChange: (e) => $({
|
|
@@ -1103,7 +1113,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1103
1113
|
}),
|
|
1104
1114
|
(A.config?.httpMethod === "POST" || A.config?.httpMethod === "PUT") && /* @__PURE__ */ T("div", {
|
|
1105
1115
|
className: "space-y-2",
|
|
1106
|
-
children: [/* @__PURE__ */ w(
|
|
1116
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.rest.requestBodyLabel", "Request Body (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1107
1117
|
value: A.config?.requestBody || "",
|
|
1108
1118
|
onChange: (e) => $({
|
|
1109
1119
|
...A.config,
|
|
@@ -1117,8 +1127,8 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1117
1127
|
/* @__PURE__ */ T("div", {
|
|
1118
1128
|
className: "space-y-2",
|
|
1119
1129
|
children: [
|
|
1120
|
-
/* @__PURE__ */ w(
|
|
1121
|
-
/* @__PURE__ */ w(
|
|
1130
|
+
/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1131
|
+
/* @__PURE__ */ w(_, {
|
|
1122
1132
|
value: A.config?.dataPath || "",
|
|
1123
1133
|
onChange: (e) => $({
|
|
1124
1134
|
...A.config,
|
|
@@ -1139,7 +1149,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1139
1149
|
children: [
|
|
1140
1150
|
/* @__PURE__ */ T("div", {
|
|
1141
1151
|
className: "space-y-2",
|
|
1142
|
-
children: [/* @__PURE__ */ w(
|
|
1152
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.graphql.endpointLabel", "GraphQL Endpoint *") }), /* @__PURE__ */ w(_, {
|
|
1143
1153
|
value: A.config?.graphqlEndpoint || "",
|
|
1144
1154
|
onChange: (e) => $({
|
|
1145
1155
|
...A.config,
|
|
@@ -1150,7 +1160,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1150
1160
|
}),
|
|
1151
1161
|
/* @__PURE__ */ T("div", {
|
|
1152
1162
|
className: "space-y-2",
|
|
1153
|
-
children: [/* @__PURE__ */ w(
|
|
1163
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.graphql.queryLabel", "Query *") }), /* @__PURE__ */ w(C, {
|
|
1154
1164
|
value: A.config?.graphqlQuery || "",
|
|
1155
1165
|
onChange: (e) => $({
|
|
1156
1166
|
...A.config,
|
|
@@ -1163,7 +1173,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1163
1173
|
}),
|
|
1164
1174
|
/* @__PURE__ */ T("div", {
|
|
1165
1175
|
className: "space-y-2",
|
|
1166
|
-
children: [/* @__PURE__ */ w(
|
|
1176
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.graphql.variablesLabel", "Variables (JSON, optional)") }), /* @__PURE__ */ w(C, {
|
|
1167
1177
|
value: A.config?.graphqlVariables || "",
|
|
1168
1178
|
onChange: (e) => $({
|
|
1169
1179
|
...A.config,
|
|
@@ -1176,7 +1186,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1176
1186
|
}),
|
|
1177
1187
|
/* @__PURE__ */ T("div", {
|
|
1178
1188
|
className: "space-y-2",
|
|
1179
|
-
children: [/* @__PURE__ */ w(
|
|
1189
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.graphql.headersLabel", "Headers (JSON, optional)") }), /* @__PURE__ */ w(C, {
|
|
1180
1190
|
value: A.config?.headers || "",
|
|
1181
1191
|
onChange: (e) => $({
|
|
1182
1192
|
...A.config,
|
|
@@ -1190,8 +1200,8 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1190
1200
|
/* @__PURE__ */ T("div", {
|
|
1191
1201
|
className: "space-y-2",
|
|
1192
1202
|
children: [
|
|
1193
|
-
/* @__PURE__ */ w(
|
|
1194
|
-
/* @__PURE__ */ w(
|
|
1203
|
+
/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1204
|
+
/* @__PURE__ */ w(_, {
|
|
1195
1205
|
value: A.config?.dataPath || "",
|
|
1196
1206
|
onChange: (e) => $({
|
|
1197
1207
|
...A.config,
|
|
@@ -1209,7 +1219,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1209
1219
|
}),
|
|
1210
1220
|
A.config?.dataSourceType === "MOCK" && /* @__PURE__ */ T("div", {
|
|
1211
1221
|
className: "space-y-2",
|
|
1212
|
-
children: [/* @__PURE__ */ w(
|
|
1222
|
+
children: [/* @__PURE__ */ w(v, { children: D("bigconsole.widget.properties.mock.sampleDataLabel", "Sample Data (JSON)") }), /* @__PURE__ */ w(C, {
|
|
1213
1223
|
value: A.config?.mockData || "",
|
|
1214
1224
|
onChange: (e) => $({
|
|
1215
1225
|
...A.config,
|
|
@@ -1230,11 +1240,11 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1230
1240
|
children: /* @__PURE__ */ T(r, { children: [
|
|
1231
1241
|
A && /* @__PURE__ */ w(le, {
|
|
1232
1242
|
renderer: A.renderer,
|
|
1233
|
-
rendererOptions:
|
|
1243
|
+
rendererOptions: Kt,
|
|
1234
1244
|
onRendererChange: (e) => {
|
|
1235
1245
|
Q("renderer", e), e === "BIGCONSOLE" && Q("template", void 0);
|
|
1236
1246
|
},
|
|
1237
|
-
templateEditor: A.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ w(
|
|
1247
|
+
templateEditor: A.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ w(Ge, {
|
|
1238
1248
|
widget: {
|
|
1239
1249
|
...I,
|
|
1240
1250
|
template: A.template,
|
|
@@ -1250,7 +1260,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1250
1260
|
"data-testid": "widget-inspector-drilldown",
|
|
1251
1261
|
children: /* @__PURE__ */ w(ce, {
|
|
1252
1262
|
widget: I,
|
|
1253
|
-
onChange:
|
|
1263
|
+
onChange: Wt
|
|
1254
1264
|
})
|
|
1255
1265
|
}),
|
|
1256
1266
|
/* @__PURE__ */ w(n, {
|
|
@@ -1283,7 +1293,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1283
1293
|
children: A && /* @__PURE__ */ w(ue, {
|
|
1284
1294
|
widgetType: I.type,
|
|
1285
1295
|
config: A.config || {},
|
|
1286
|
-
onChange:
|
|
1296
|
+
onChange: Ut
|
|
1287
1297
|
})
|
|
1288
1298
|
})
|
|
1289
1299
|
]
|
|
@@ -1294,7 +1304,7 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1294
1304
|
tone: "info",
|
|
1295
1305
|
title: D("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
|
|
1296
1306
|
headingLevel: 3,
|
|
1297
|
-
icon: /* @__PURE__ */ w(
|
|
1307
|
+
icon: /* @__PURE__ */ w(ye, { className: "h-icon-md w-icon-md" }),
|
|
1298
1308
|
className: "w-full max-w-sm",
|
|
1299
1309
|
"data-testid": "widget-inspector-empty",
|
|
1300
1310
|
children: /* @__PURE__ */ w("p", {
|
|
@@ -1333,14 +1343,14 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1333
1343
|
padding: "compact",
|
|
1334
1344
|
title: D("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
|
|
1335
1345
|
headingLevel: 3,
|
|
1336
|
-
icon: /* @__PURE__ */ w(
|
|
1346
|
+
icon: /* @__PURE__ */ w(Ce, { className: "h-icon-sm w-icon-sm" }),
|
|
1337
1347
|
className: "mb-control-gap",
|
|
1338
1348
|
"data-testid": "widget-inspector-save-error"
|
|
1339
1349
|
}),
|
|
1340
1350
|
/* @__PURE__ */ T("div", {
|
|
1341
1351
|
className: "flex flex-wrap gap-control-gap",
|
|
1342
|
-
children: [/* @__PURE__ */ w(
|
|
1343
|
-
onClick:
|
|
1352
|
+
children: [/* @__PURE__ */ w(g, {
|
|
1353
|
+
onClick: Vt,
|
|
1344
1354
|
disabled: O === "saving" || !M,
|
|
1345
1355
|
style: {
|
|
1346
1356
|
flex: 1,
|
|
@@ -1369,15 +1379,15 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1369
1379
|
height: "var(--size-icon-sm)"
|
|
1370
1380
|
} }), D("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
|
|
1371
1381
|
})
|
|
1372
|
-
}), /* @__PURE__ */ T(
|
|
1382
|
+
}), /* @__PURE__ */ T(g, {
|
|
1373
1383
|
variant: "outline",
|
|
1374
|
-
onClick:
|
|
1384
|
+
onClick: Ht,
|
|
1375
1385
|
disabled: O === "saving" || !M,
|
|
1376
1386
|
style: {
|
|
1377
1387
|
height: "var(--size-controlHeight-md)",
|
|
1378
1388
|
opacity: M ? 1 : .5
|
|
1379
1389
|
},
|
|
1380
|
-
children: [/* @__PURE__ */ w(
|
|
1390
|
+
children: [/* @__PURE__ */ w(Ce, { style: {
|
|
1381
1391
|
width: "var(--size-icon-sm)",
|
|
1382
1392
|
height: "var(--size-icon-sm)"
|
|
1383
1393
|
} }), D("bigconsole.widget.properties.footer.discard", "Discard")]
|
|
@@ -1386,15 +1396,15 @@ var D = he(function({ isOpen: he, onClose: g }) {
|
|
|
1386
1396
|
]
|
|
1387
1397
|
}),
|
|
1388
1398
|
/* @__PURE__ */ w(ae, {
|
|
1389
|
-
isOpen:
|
|
1399
|
+
isOpen: Tt,
|
|
1390
1400
|
action: J,
|
|
1391
|
-
initialWebhook:
|
|
1392
|
-
isLoading:
|
|
1393
|
-
saveError:
|
|
1401
|
+
initialWebhook: jt,
|
|
1402
|
+
isLoading: Et,
|
|
1403
|
+
saveError: kt,
|
|
1394
1404
|
onClose: () => {
|
|
1395
1405
|
q(!1), Y(void 0), X(void 0), Z(null);
|
|
1396
1406
|
},
|
|
1397
|
-
onSave:
|
|
1407
|
+
onSave: Ft
|
|
1398
1408
|
})
|
|
1399
1409
|
]
|
|
1400
1410
|
})
|