@burdenoff/microfe-bigconsole 2026.1103.9 → 2026.1103.11
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/widgets/PropertiesPanel.js +556 -533
- package/dist/bigconsole/pages/InsightsPage.js +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +1 -1
- package/dist/bigconsole/utils/widgetBinding.d.ts +14 -0
- package/dist/bigconsole/utils/widgetBinding.js +7 -1
- package/package.json +1 -1
|
@@ -11,30 +11,30 @@ import c from "../../hooks/useEventWebhooks.js";
|
|
|
11
11
|
import ee from "../../hooks/useDataSinkOperations.js";
|
|
12
12
|
import te from "../../hooks/useParserOperations.js";
|
|
13
13
|
import "../../hooks/index.js";
|
|
14
|
-
import { getWidgetBinding as l, getWidgetBindingStatus as ne,
|
|
15
|
-
import { ActionConfigDialog as
|
|
16
|
-
import { WebhookConfigPanel as
|
|
14
|
+
import { getWidgetBinding as l, getWidgetBindingStatus as ne, parserTestOutcome as re, reconcilePanelConfig as ie, serializeWidgetBinding as ae } from "../../utils/widgetBinding.js";
|
|
15
|
+
import { ActionConfigDialog as oe } from "./ActionConfigDialog.js";
|
|
16
|
+
import { WebhookConfigPanel as se } from "./webhook-config/WebhookConfigPanel.js";
|
|
17
17
|
import "./webhook-config/index.js";
|
|
18
|
-
import { EventLogViewer as
|
|
18
|
+
import { EventLogViewer as ce } from "./event-logs/EventLogViewer.js";
|
|
19
19
|
import "./event-logs/index.js";
|
|
20
|
-
import { DrilldownConfigPanel as
|
|
21
|
-
import { AdvancedSection as
|
|
22
|
-
import { AppearanceSection as
|
|
23
|
-
import { GeneralSection as
|
|
24
|
-
import { DataBindingSection as
|
|
25
|
-
import { LayoutSection as
|
|
20
|
+
import { DrilldownConfigPanel as le } from "./DrilldownConfigPanel.js";
|
|
21
|
+
import { AdvancedSection as ue } from "../builder/inspector/AdvancedSection.js";
|
|
22
|
+
import { AppearanceSection as de } from "../builder/inspector/AppearanceSection.js";
|
|
23
|
+
import { GeneralSection as fe } from "../builder/inspector/GeneralSection.js";
|
|
24
|
+
import { DataBindingSection as pe } from "../builder/inspector/DataBindingSection.js";
|
|
25
|
+
import { LayoutSection as me } from "../builder/inspector/LayoutSection.js";
|
|
26
26
|
import "../builder/inspector/index.js";
|
|
27
|
-
import { DEFAULT_GRID_CONFIG as
|
|
28
|
-
import { isWidgetFormEdited as
|
|
29
|
-
import { memo as u, useCallback as d, useEffect as f, useMemo as
|
|
30
|
-
import { Check as
|
|
31
|
-
import { Button as
|
|
32
|
-
import { useUnsavedChanges as
|
|
33
|
-
import { useI18n as
|
|
34
|
-
import { jsx as
|
|
35
|
-
import { toast as
|
|
27
|
+
import { DEFAULT_GRID_CONFIG as he } from "../../utils/widgetPositioning.js";
|
|
28
|
+
import { isWidgetFormEdited as ge, withInferredDataSink as _e } from "../../utils/widgetFormDirty.js";
|
|
29
|
+
import { memo as u, useCallback as d, useEffect as f, useMemo as ve, useRef as p, useState as m } from "react";
|
|
30
|
+
import { Check as ye, ChevronDown as be, ChevronUp as xe, ExternalLink as Se, Info as Ce, Pencil as we, Plus as Te, Trash2 as Ee, X as De } from "lucide-react";
|
|
31
|
+
import { Button as h, Card as Oe, CardContent as ke, Input as g, Label as _, Select as Ae, SelectContent as je, SelectItem as v, SelectTrigger as Me, SelectValue as Ne, Sheet as Pe, SheetContent as Fe, SheetDescription as Ie, SheetHeader as Le, SheetTitle as Re, Spinner as ze, Tabs as Be, TabsContent as Ve, TabsList as He, TabsTrigger as y, Textarea as b } from "@burdenoff/fe-libs/ui";
|
|
32
|
+
import { useUnsavedChanges as Ue } from "@burdenoff/fe-libs/shared/hooks";
|
|
33
|
+
import { useI18n as We } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
34
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
35
|
+
import { toast as Ge } from "sonner";
|
|
36
36
|
//#region src/bigconsole/components/widgets/PropertiesPanel.tsx
|
|
37
|
-
var
|
|
37
|
+
var Ke = [
|
|
38
38
|
{
|
|
39
39
|
value: "BIGCONSOLE",
|
|
40
40
|
labelKey: "bigconsole.widget.properties.renderer.bigconsole.label",
|
|
@@ -63,7 +63,7 @@ var Ue = [
|
|
|
63
63
|
descriptionKey: "bigconsole.widget.properties.renderer.custom.description",
|
|
64
64
|
description: "Custom React component"
|
|
65
65
|
}
|
|
66
|
-
],
|
|
66
|
+
], qe = [
|
|
67
67
|
{
|
|
68
68
|
value: "DATASINK",
|
|
69
69
|
labelKey: "bigconsole.widget.properties.dataSourceType.datasink.label",
|
|
@@ -107,23 +107,23 @@ var Ue = [
|
|
|
107
107
|
description: "Manually enter sample JSON data"
|
|
108
108
|
}
|
|
109
109
|
];
|
|
110
|
-
function
|
|
110
|
+
function Je(e) {
|
|
111
111
|
return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
|
|
112
112
|
}
|
|
113
|
-
var
|
|
113
|
+
var Ye = {
|
|
114
114
|
PRIMARY: "bg-action-primary-bg",
|
|
115
115
|
SECONDARY: "bg-[var(--color-text-muted)]",
|
|
116
116
|
SUCCESS: "bg-status-success-bg",
|
|
117
117
|
WARNING: "bg-status-warning-bg",
|
|
118
118
|
DANGER: "bg-status-error-bg"
|
|
119
|
-
},
|
|
119
|
+
}, Xe = "bg-[var(--color-text-muted)]", Ze = {
|
|
120
120
|
fontWeight: "var(--font-weight-semibold)",
|
|
121
121
|
fontSize: "var(--font-size-body-sm)",
|
|
122
122
|
padding: "6px 10px",
|
|
123
123
|
minHeight: "var(--size-controlHeight-md)",
|
|
124
124
|
flexShrink: 0
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function Qe(e) {
|
|
127
127
|
if (!e) return {};
|
|
128
128
|
let t = Array.isArray(e) ? e[0] : e;
|
|
129
129
|
if (!t || typeof t != "object") return {};
|
|
@@ -167,8 +167,8 @@ function Ye(e) {
|
|
|
167
167
|
xAxisField: a
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
var
|
|
171
|
-
let { t: r } =
|
|
170
|
+
var $e = u(function({ widget: e, onSave: t }) {
|
|
171
|
+
let { t: r } = We(), [i, a] = m(""), [o, s] = m(null), c = p(!1);
|
|
172
172
|
f(() => {
|
|
173
173
|
try {
|
|
174
174
|
let t = e.template && typeof e.template == "object" ? JSON.stringify(e.template, null, 2) : "";
|
|
@@ -194,21 +194,21 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
194
194
|
s(e.message);
|
|
195
195
|
}
|
|
196
196
|
}, [i, t]);
|
|
197
|
-
return /* @__PURE__ */
|
|
197
|
+
return /* @__PURE__ */ S(n, {
|
|
198
198
|
emphasis: "muted",
|
|
199
199
|
padding: "compact",
|
|
200
200
|
headingLevel: 4,
|
|
201
201
|
title: r("bigconsole.widget.properties.template.label", "Template (JSON)"),
|
|
202
202
|
description: `The ${e.renderer} payload this widget renders.`,
|
|
203
203
|
tone: o ? "danger" : "neutral",
|
|
204
|
-
meta: o ? /* @__PURE__ */
|
|
204
|
+
meta: o ? /* @__PURE__ */ x("span", {
|
|
205
205
|
className: "text-xs font-medium text-[var(--color-status-error-text)]",
|
|
206
206
|
children: r("bigconsole.widget.properties.template.invalidJson", "Invalid JSON")
|
|
207
207
|
}) : void 0,
|
|
208
208
|
className: "mt-form-gap",
|
|
209
209
|
"data-testid": "widget-inspector-template",
|
|
210
210
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ x(b, {
|
|
212
212
|
value: i,
|
|
213
213
|
onChange: ee,
|
|
214
214
|
spellCheck: !1,
|
|
@@ -221,7 +221,7 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
221
221
|
resize: "vertical"
|
|
222
222
|
}
|
|
223
223
|
}),
|
|
224
|
-
o && /* @__PURE__ */
|
|
224
|
+
o && /* @__PURE__ */ x("p", {
|
|
225
225
|
style: {
|
|
226
226
|
fontSize: "var(--font-size-body-sm)",
|
|
227
227
|
color: "var(--color-status-error-text)",
|
|
@@ -232,9 +232,9 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
232
232
|
},
|
|
233
233
|
children: o
|
|
234
234
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ S("div", {
|
|
236
236
|
className: "mt-control-gap flex flex-wrap items-center gap-control-gap",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ x(h, {
|
|
238
238
|
variant: "outline",
|
|
239
239
|
size: "sm",
|
|
240
240
|
onClick: te,
|
|
@@ -244,7 +244,7 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
244
244
|
fontWeight: "var(--font-weight-semibold)"
|
|
245
245
|
},
|
|
246
246
|
children: r("bigconsole.widget.properties.template.format", "Format")
|
|
247
|
-
}), !o && i.trim() !== "" && /* @__PURE__ */
|
|
247
|
+
}), !o && i.trim() !== "" && /* @__PURE__ */ S("span", {
|
|
248
248
|
style: {
|
|
249
249
|
fontSize: "var(--font-size-body-sm)",
|
|
250
250
|
color: "var(--color-status-success-text)",
|
|
@@ -252,20 +252,20 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
252
252
|
alignItems: "center",
|
|
253
253
|
gap: "4px"
|
|
254
254
|
},
|
|
255
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ x(ye, { style: {
|
|
256
256
|
width: "12px",
|
|
257
257
|
height: "12px"
|
|
258
258
|
} }), r("bigconsole.widget.properties.template.validJson", "Valid JSON")]
|
|
259
259
|
})]
|
|
260
260
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ S("div", {
|
|
262
262
|
className: "mt-control-gap flex flex-wrap items-center justify-between gap-x-4 gap-y-1 border-t border-[var(--color-border-subtle)] pt-control-gap text-xs text-text-muted",
|
|
263
263
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ x("span", {
|
|
265
265
|
className: "font-medium",
|
|
266
266
|
children: r("bigconsole.widget.properties.template.ctrlSToSave", "Ctrl+S to save")
|
|
267
267
|
}),
|
|
268
|
-
e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */
|
|
268
|
+
e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */ S("a", {
|
|
269
269
|
href: "https://adaptivecards.io/designer/",
|
|
270
270
|
target: "_blank",
|
|
271
271
|
rel: "noopener noreferrer",
|
|
@@ -278,12 +278,12 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
278
278
|
fontWeight: "var(--font-weight-medium)",
|
|
279
279
|
textDecoration: "none"
|
|
280
280
|
},
|
|
281
|
-
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */
|
|
281
|
+
children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ x(Se, { style: {
|
|
282
282
|
height: "var(--size-icon-sm)",
|
|
283
283
|
width: "var(--size-icon-sm)"
|
|
284
284
|
} })]
|
|
285
285
|
}),
|
|
286
|
-
e.renderer === "BLOCKKIT" && /* @__PURE__ */
|
|
286
|
+
e.renderer === "BLOCKKIT" && /* @__PURE__ */ S("a", {
|
|
287
287
|
href: "https://app.slack.com/block-kit-builder",
|
|
288
288
|
target: "_blank",
|
|
289
289
|
rel: "noopener noreferrer",
|
|
@@ -296,7 +296,7 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
296
296
|
fontWeight: "var(--font-weight-medium)",
|
|
297
297
|
textDecoration: "none"
|
|
298
298
|
},
|
|
299
|
-
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */
|
|
299
|
+
children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ x(Se, { style: {
|
|
300
300
|
height: "var(--size-icon-sm)",
|
|
301
301
|
width: "var(--size-icon-sm)"
|
|
302
302
|
} })]
|
|
@@ -306,7 +306,7 @@ var Xe = u(function({ widget: e, onSave: t }) {
|
|
|
306
306
|
]
|
|
307
307
|
});
|
|
308
308
|
});
|
|
309
|
-
function
|
|
309
|
+
function et(e) {
|
|
310
310
|
let t = e, n = l({
|
|
311
311
|
dataSinkId: t.dataSinkId,
|
|
312
312
|
parserId: t.parserId,
|
|
@@ -334,335 +334,358 @@ function Ze(e) {
|
|
|
334
334
|
} : void 0
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
var
|
|
338
|
-
let { t:
|
|
339
|
-
|
|
337
|
+
var C = u(function({ isOpen: u, onClose: Se }) {
|
|
338
|
+
let { t: C } = We(), [tt, nt] = m("general"), [w, T] = m("idle"), [E, D] = m(null), [O, k] = m(!1), [rt, A] = m(null);
|
|
339
|
+
Ue({
|
|
340
340
|
id: "dashboard-widget-properties",
|
|
341
|
-
label:
|
|
342
|
-
dirty:
|
|
341
|
+
label: C("bigconsole.assistant.unsaved.widgetProperties", "the widget properties"),
|
|
342
|
+
dirty: ge(E, rt)
|
|
343
343
|
});
|
|
344
|
-
let
|
|
345
|
-
x:
|
|
346
|
-
y:
|
|
347
|
-
width:
|
|
348
|
-
height:
|
|
349
|
-
} : null,
|
|
350
|
-
|
|
351
|
-
}, [
|
|
352
|
-
|
|
344
|
+
let j = e((e) => e.selectedWidgetId), it = e((e) => e.widgets), M = e((e) => e.updateWidget), at = e((e) => e.updateWidgetPosition), ot = t(), N = j ? it.get(j) : void 0, st = N ? {
|
|
345
|
+
x: N.position?.x ?? N.positionX ?? 0,
|
|
346
|
+
y: N.position?.y ?? N.positionY ?? 0,
|
|
347
|
+
width: N.position?.width ?? N.positionWidth ?? 4,
|
|
348
|
+
height: N.position?.height ?? N.positionHeight ?? 4
|
|
349
|
+
} : null, ct = d((e) => {
|
|
350
|
+
j && at(j, e);
|
|
351
|
+
}, [j, at]), lt = p(null), ut = p({}), dt = p(0), P = d(() => {
|
|
352
|
+
dt.current += 1, k(!0);
|
|
353
353
|
}, []);
|
|
354
354
|
f(() => {
|
|
355
|
-
if (!
|
|
356
|
-
|
|
355
|
+
if (!j) {
|
|
356
|
+
lt.current = null, D(null), A(null), k(!1), T("idle");
|
|
357
357
|
return;
|
|
358
358
|
}
|
|
359
|
-
let e =
|
|
360
|
-
if (
|
|
361
|
-
if (
|
|
362
|
-
let t =
|
|
363
|
-
|
|
364
|
-
} else
|
|
359
|
+
let e = lt.current !== j;
|
|
360
|
+
if (lt.current = j, N) {
|
|
361
|
+
if (O && !e) return;
|
|
362
|
+
let t = et(N);
|
|
363
|
+
D(t), A(t), ut.current = N.config || {}, k(!1), T("idle");
|
|
364
|
+
} else D(null), A(null), k(!1), T("idle");
|
|
365
365
|
}, [
|
|
366
|
+
j,
|
|
366
367
|
N,
|
|
367
|
-
|
|
368
|
-
A
|
|
368
|
+
O
|
|
369
369
|
]);
|
|
370
|
-
let { updateWidget:
|
|
371
|
-
consoleId:
|
|
370
|
+
let { updateWidget: ft } = i(N?.pageId, N?.dashboardId, { skipFetch: !0 }), { createDrilldown: pt, updateDrilldown: mt, deleteDrilldown: ht } = o(), { dataSinks: F } = ee({ skipFetch: !1 }), [gt, I] = m(null), { executeParser: L, fetchParser: _t } = te({
|
|
371
|
+
consoleId: N?.dashboardId,
|
|
372
372
|
skipFetch: !0
|
|
373
|
-
}), [
|
|
373
|
+
}), [vt, yt] = m(null), [bt, xt] = m(!1), R = E?.parserId;
|
|
374
374
|
f(() => {
|
|
375
375
|
let e = !1;
|
|
376
|
-
if (
|
|
377
|
-
|
|
376
|
+
if (yt(null), !u || !R) {
|
|
377
|
+
xt(!1);
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
|
-
return
|
|
381
|
-
e || (
|
|
380
|
+
return xt(!0), _t(R).then((t) => {
|
|
381
|
+
e || (yt(t), xt(!1));
|
|
382
382
|
}), () => {
|
|
383
383
|
e = !0;
|
|
384
384
|
};
|
|
385
385
|
}, [
|
|
386
386
|
u,
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
387
|
+
R,
|
|
388
|
+
j,
|
|
389
|
+
_t
|
|
390
390
|
]);
|
|
391
|
-
let [
|
|
391
|
+
let [St, z] = m(!1), [Ct, B] = m(void 0), [wt, V] = m(!1), [Tt, H] = m(null), U = p(null);
|
|
392
392
|
f(() => {
|
|
393
|
-
B(void 0), V(!1), H(null),
|
|
394
|
-
}, [
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
let
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
393
|
+
U.current = null, B(void 0), V(!1), H(null), z(!1);
|
|
394
|
+
}, [j]), f(() => {
|
|
395
|
+
if (!u || tt !== "data" || !j || !R) return;
|
|
396
|
+
let e = `${j}:${R}`;
|
|
397
|
+
if (U.current === e) return;
|
|
398
|
+
U.current = e;
|
|
399
|
+
let t = C("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.");
|
|
400
|
+
z(!0), L(R).then((n) => {
|
|
401
|
+
if (U.current !== e) return;
|
|
402
|
+
let r = re(n, t);
|
|
403
|
+
B(r.preview), H(r.error), V(!0);
|
|
404
|
+
}).catch((n) => {
|
|
405
|
+
U.current === e && (H(n instanceof Error ? n.message : t), V(!0));
|
|
406
|
+
}).finally(() => {
|
|
407
|
+
U.current === e && z(!1);
|
|
408
|
+
});
|
|
409
|
+
}, [
|
|
410
|
+
u,
|
|
411
|
+
tt,
|
|
412
|
+
j,
|
|
413
|
+
R,
|
|
414
|
+
L,
|
|
415
|
+
C
|
|
416
|
+
]);
|
|
417
|
+
let { actions: W, loading: G, error: K, refetch: Et, createAction: Dt, updateAction: Ot, deleteAction: kt, reorderActions: q } = s(j || void 0), { webhooks: At, loading: jt, error: Mt, createWebhook: Nt, updateWebhook: Pt, deleteWebhook: Ft, refetch: It } = c({
|
|
418
|
+
widgetId: j || void 0,
|
|
419
|
+
skipFetch: !j
|
|
420
|
+
}), Lt = d((e, t) => {
|
|
421
|
+
let n = Je(t);
|
|
422
|
+
return e.find((e) => e.widgetId === j && e.eventPattern === n) ?? null;
|
|
423
|
+
}, [j]), J = d((e) => Lt(At, e), [Lt, At]), Rt = d(async (e, t) => {
|
|
424
|
+
if (!j || t === void 0) return !0;
|
|
425
|
+
if (Mt) return !1;
|
|
426
|
+
let n = Je(e), r = J(e);
|
|
427
|
+
if (!r && jt) {
|
|
428
|
+
let t = (await It())?.data?.listEventWebhookMappings ?? [];
|
|
429
|
+
r = Lt(t, e);
|
|
408
430
|
}
|
|
409
|
-
return t && t.url ? r ? await
|
|
431
|
+
return t && t.url ? r ? await Pt({
|
|
410
432
|
id: r.id,
|
|
411
433
|
eventPattern: n,
|
|
412
434
|
webhookUrl: t.url,
|
|
413
435
|
method: t.method,
|
|
414
436
|
isActive: !0
|
|
415
|
-
}) !== null : await
|
|
416
|
-
widgetId:
|
|
437
|
+
}) !== null : await Nt({
|
|
438
|
+
widgetId: j,
|
|
417
439
|
eventPattern: n,
|
|
418
440
|
webhookUrl: t.url,
|
|
419
441
|
method: t.method
|
|
420
|
-
}) !== null : t === null && r ?
|
|
442
|
+
}) !== null : t === null && r ? Ft(r.id) : !0;
|
|
421
443
|
}, [
|
|
422
|
-
|
|
444
|
+
j,
|
|
423
445
|
J,
|
|
424
|
-
At,
|
|
425
|
-
q,
|
|
426
|
-
Pt,
|
|
427
|
-
Ft,
|
|
428
446
|
jt,
|
|
429
447
|
Mt,
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
448
|
+
It,
|
|
449
|
+
Lt,
|
|
450
|
+
Nt,
|
|
451
|
+
Pt,
|
|
452
|
+
Ft
|
|
453
|
+
]), [zt, Bt] = m(!1), [Vt, Y] = m(void 0), [Ht, Ut] = m(!1), [Wt, X] = m(void 0), [Gt, Z] = m(null), Kt = ve(() => {
|
|
454
|
+
if (!Vt) return null;
|
|
455
|
+
let e = J(Vt.name);
|
|
434
456
|
return e ? {
|
|
435
457
|
url: e.webhookUrl,
|
|
436
458
|
method: e.method
|
|
437
459
|
} : null;
|
|
438
|
-
}, [
|
|
460
|
+
}, [Vt, J]), qt = Wt === void 0 ? Kt : Wt, Jt = ve(() => {
|
|
439
461
|
let e = /* @__PURE__ */ new Map();
|
|
440
|
-
for (let t of
|
|
462
|
+
for (let t of W) {
|
|
441
463
|
let n = J(t.name);
|
|
442
464
|
n && e.set(t.name, n);
|
|
443
465
|
}
|
|
444
466
|
return e;
|
|
445
|
-
}, [
|
|
446
|
-
X(void 0), Z(null), Y(void 0),
|
|
447
|
-
}, []),
|
|
448
|
-
X(void 0), Z(null), Y(e),
|
|
449
|
-
}, []),
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
452
|
-
Z(
|
|
467
|
+
}, [W, J]), Yt = d(() => {
|
|
468
|
+
X(void 0), Z(null), Y(void 0), Bt(!0);
|
|
469
|
+
}, []), Xt = d((e) => {
|
|
470
|
+
X(void 0), Z(null), Y(e), Bt(!0);
|
|
471
|
+
}, []), Zt = d(async (e, t) => {
|
|
472
|
+
if (j) {
|
|
473
|
+
if (K) {
|
|
474
|
+
Z(C("bigconsole.widget.properties.actions.readFailed", "Buttons could not be verified. Retry before saving."));
|
|
453
475
|
return;
|
|
454
476
|
}
|
|
455
|
-
if (
|
|
456
|
-
Z(
|
|
477
|
+
if (Mt) {
|
|
478
|
+
Z(C("bigconsole.widget.properties.action.webhookReadFailed", "Webhook mappings could not be verified. Retry the webhook read before saving."));
|
|
457
479
|
return;
|
|
458
480
|
}
|
|
459
|
-
|
|
481
|
+
Ut(!0), Z(null);
|
|
460
482
|
try {
|
|
461
483
|
let n = "id" in e && !!e.id, r = null;
|
|
462
|
-
if (r = n ? await
|
|
463
|
-
let e = [...
|
|
484
|
+
if (r = n ? await Ot(e) : await Dt(e), r) {
|
|
485
|
+
let e = [...W];
|
|
464
486
|
if (n) {
|
|
465
487
|
let t = e.findIndex((e) => e.id === r?.id);
|
|
466
488
|
t >= 0 && (e[t] = r);
|
|
467
489
|
} else e.push(r);
|
|
468
490
|
let i = e.sort((e, t) => e.order - t.order);
|
|
469
|
-
if (
|
|
470
|
-
X(t), Z(t ?
|
|
491
|
+
if (M(j, { actions: i }), !await Rt(r.name, t)) {
|
|
492
|
+
X(t), Z(t ? C("bigconsole.widget.properties.action.webhookSaveFailed", "The button was saved, but its webhook could not be saved. Check the URL and try again.") : C("bigconsole.widget.properties.action.webhookRemoveFailed", "The button was saved, but its old webhook could not be removed. Try again.")), Y(r);
|
|
471
493
|
return;
|
|
472
494
|
}
|
|
473
|
-
X(void 0), Z(null),
|
|
495
|
+
X(void 0), Z(null), Bt(!1), Y(void 0);
|
|
474
496
|
}
|
|
475
497
|
} catch (e) {
|
|
476
|
-
console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message :
|
|
498
|
+
console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message : C("bigconsole.widget.properties.action.saveFailed", "Could not save the button. Please try again."));
|
|
477
499
|
} finally {
|
|
478
|
-
|
|
500
|
+
Ut(!1);
|
|
479
501
|
}
|
|
480
502
|
}
|
|
481
503
|
}, [
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
Et,
|
|
504
|
+
j,
|
|
505
|
+
Mt,
|
|
506
|
+
K,
|
|
507
|
+
W,
|
|
487
508
|
Dt,
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
509
|
+
Ot,
|
|
510
|
+
M,
|
|
511
|
+
Rt,
|
|
512
|
+
C
|
|
513
|
+
]), Qt = d(async (e) => {
|
|
514
|
+
if (j && window.confirm(C("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
|
|
515
|
+
let t = W.find((t) => t.id === e);
|
|
516
|
+
if (await kt(e)) {
|
|
517
|
+
let n = W.filter((t) => t.id !== e);
|
|
518
|
+
if (M(j, { actions: n }), t) {
|
|
497
519
|
let e = J(t.name);
|
|
498
|
-
e && await
|
|
520
|
+
e && await Ft(e.id);
|
|
499
521
|
}
|
|
500
522
|
}
|
|
501
523
|
}
|
|
502
524
|
}, [
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
525
|
+
j,
|
|
526
|
+
W,
|
|
527
|
+
kt,
|
|
528
|
+
M,
|
|
507
529
|
J,
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
]),
|
|
511
|
-
if (!
|
|
512
|
-
let t = [...
|
|
513
|
-
if ([n[e - 1], n[e]] = [n[e], n[e - 1]], await
|
|
530
|
+
Ft,
|
|
531
|
+
C
|
|
532
|
+
]), $t = d(async (e) => {
|
|
533
|
+
if (!j || e === 0) return;
|
|
534
|
+
let t = [...W].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
|
|
535
|
+
if ([n[e - 1], n[e]] = [n[e], n[e - 1]], await q(n)) {
|
|
514
536
|
let e = t.map((e, t) => ({
|
|
515
537
|
...e,
|
|
516
538
|
order: n.indexOf(e.id)
|
|
517
539
|
})).sort((e, t) => e.order - t.order);
|
|
518
|
-
|
|
540
|
+
M(j, { actions: e });
|
|
519
541
|
}
|
|
520
542
|
}, [
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
]),
|
|
526
|
-
if (!
|
|
527
|
-
let t = [...
|
|
543
|
+
j,
|
|
544
|
+
W,
|
|
545
|
+
q,
|
|
546
|
+
M
|
|
547
|
+
]), en = d(async (e) => {
|
|
548
|
+
if (!j) return;
|
|
549
|
+
let t = [...W].sort((e, t) => e.order - t.order);
|
|
528
550
|
if (e === t.length - 1) return;
|
|
529
551
|
let n = t.map((e) => e.id);
|
|
530
|
-
if ([n[e], n[e + 1]] = [n[e + 1], n[e]], await
|
|
552
|
+
if ([n[e], n[e + 1]] = [n[e + 1], n[e]], await q(n)) {
|
|
531
553
|
let e = t.map((e, t) => ({
|
|
532
554
|
...e,
|
|
533
555
|
order: n.indexOf(e.id)
|
|
534
556
|
})).sort((e, t) => e.order - t.order);
|
|
535
|
-
|
|
557
|
+
M(j, { actions: e });
|
|
536
558
|
}
|
|
537
559
|
}, [
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
560
|
+
j,
|
|
561
|
+
W,
|
|
562
|
+
q,
|
|
563
|
+
M
|
|
542
564
|
]);
|
|
543
565
|
f(() => {
|
|
544
|
-
|
|
566
|
+
j && W.length >= 0 && !G && M(j, { actions: W });
|
|
545
567
|
}, [
|
|
546
|
-
|
|
547
|
-
U,
|
|
568
|
+
j,
|
|
548
569
|
W,
|
|
549
|
-
|
|
570
|
+
G,
|
|
571
|
+
M
|
|
550
572
|
]);
|
|
551
573
|
let Q = d((e, t) => {
|
|
552
|
-
|
|
574
|
+
D((n) => n && {
|
|
553
575
|
...n,
|
|
554
576
|
[e]: t
|
|
555
|
-
}),
|
|
556
|
-
}, [
|
|
557
|
-
|
|
577
|
+
}), P();
|
|
578
|
+
}, [P]), $ = d((e) => {
|
|
579
|
+
D((t) => t && {
|
|
558
580
|
...t,
|
|
559
581
|
config: e
|
|
560
|
-
}),
|
|
561
|
-
}, [
|
|
582
|
+
}), P();
|
|
583
|
+
}, [P]);
|
|
562
584
|
f(() => {
|
|
563
|
-
if (!
|
|
564
|
-
|
|
585
|
+
if (!E) {
|
|
586
|
+
I(null);
|
|
565
587
|
return;
|
|
566
588
|
}
|
|
567
|
-
if (
|
|
568
|
-
|
|
589
|
+
if (E.dataSinkId) {
|
|
590
|
+
I(F.find((e) => e.id === E.dataSinkId)?.key ?? null);
|
|
569
591
|
return;
|
|
570
592
|
}
|
|
571
593
|
let e = l({
|
|
572
|
-
parserId:
|
|
573
|
-
config:
|
|
574
|
-
}), t =
|
|
575
|
-
|
|
594
|
+
parserId: E.parserId,
|
|
595
|
+
config: E.config
|
|
596
|
+
}), t = vt?.id === E.parserId ? vt : null, n = e.source.kind === "DATASINK" && !e.source.ref && t ? F.find((e) => e.key === t.inputSinkKey) : void 0;
|
|
597
|
+
I(n?.key ?? null), n && t && (D((e) => _e(e, t.id, n.id)), A((e) => _e(e, t.id, n.id)));
|
|
576
598
|
}, [
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
599
|
+
E,
|
|
600
|
+
F,
|
|
601
|
+
vt
|
|
580
602
|
]);
|
|
581
|
-
let
|
|
582
|
-
if (B(void 0), V(!1), H(null),
|
|
583
|
-
let t =
|
|
584
|
-
t && (Q("dataSinkId", t.id),
|
|
603
|
+
let tn = d((e) => {
|
|
604
|
+
if (B(void 0), V(!1), H(null), I(e), e) {
|
|
605
|
+
let t = F.find((t) => t.key === e);
|
|
606
|
+
t && (Q("dataSinkId", t.id), D((t) => t && {
|
|
585
607
|
...t,
|
|
586
608
|
config: {
|
|
587
609
|
...t.config,
|
|
588
610
|
dataSinkKey: e
|
|
589
611
|
}
|
|
590
|
-
}),
|
|
591
|
-
} else Q("dataSinkId", void 0),
|
|
612
|
+
}), P());
|
|
613
|
+
} else Q("dataSinkId", void 0), D((e) => e && {
|
|
592
614
|
...e,
|
|
593
615
|
config: {
|
|
594
616
|
...e.config,
|
|
595
617
|
dataSinkKey: void 0
|
|
596
618
|
},
|
|
597
619
|
parserId: void 0
|
|
598
|
-
}),
|
|
620
|
+
}), P();
|
|
599
621
|
}, [
|
|
600
|
-
|
|
622
|
+
F,
|
|
601
623
|
Q,
|
|
602
|
-
|
|
603
|
-
]),
|
|
604
|
-
if (Q("parserId", e || void 0), B(void 0), V(!1), H(null), e &&
|
|
605
|
-
|
|
624
|
+
P
|
|
625
|
+
]), nn = d(async (e) => {
|
|
626
|
+
if (Q("parserId", e || void 0), U.current = e && j ? `${j}:${e}` : null, B(void 0), V(!1), H(null), e && N) {
|
|
627
|
+
z(!0);
|
|
606
628
|
try {
|
|
607
|
-
let t = await
|
|
629
|
+
let t = await L(e);
|
|
608
630
|
if (t?.success) {
|
|
609
631
|
B(t.output), V(!0);
|
|
610
|
-
let e =
|
|
611
|
-
(e.labelField || e.valueField) && (
|
|
632
|
+
let e = Qe(t.output);
|
|
633
|
+
(e.labelField || e.valueField) && (D((t) => {
|
|
612
634
|
if (!t) return t;
|
|
613
635
|
let n = t.config || {}, r = { ...n };
|
|
614
636
|
return e.labelField && !n.labelField && (r.labelField = e.labelField), e.valueField && !n.valueField && (r.valueField = e.valueField), e.xAxisField && !n.xAxisField && (r.xAxisField = e.xAxisField), {
|
|
615
637
|
...t,
|
|
616
638
|
config: r
|
|
617
639
|
};
|
|
618
|
-
}),
|
|
619
|
-
} else V(!0), H(t?.error ||
|
|
640
|
+
}), P());
|
|
641
|
+
} else V(!0), H(t?.error || C("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview."));
|
|
620
642
|
} catch (e) {
|
|
621
|
-
V(!0), H(e instanceof Error ? e.message :
|
|
643
|
+
V(!0), H(e instanceof Error ? e.message : C("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.")), console.warn("Failed to auto-detect parser fields:", e);
|
|
622
644
|
} finally {
|
|
623
|
-
|
|
645
|
+
z(!1);
|
|
624
646
|
}
|
|
625
647
|
}
|
|
626
648
|
}, [
|
|
627
649
|
Q,
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
650
|
+
L,
|
|
651
|
+
N,
|
|
652
|
+
j,
|
|
653
|
+
P,
|
|
654
|
+
C
|
|
655
|
+
]), rn = d(async () => {
|
|
656
|
+
if (!N || !E) return;
|
|
657
|
+
let t = dt.current;
|
|
658
|
+
T("saving");
|
|
636
659
|
try {
|
|
637
660
|
let n = {
|
|
638
|
-
...
|
|
639
|
-
description:
|
|
640
|
-
}, r =
|
|
641
|
-
dataSinkId:
|
|
642
|
-
parserId:
|
|
661
|
+
...N.metadata || {},
|
|
662
|
+
description: E.description || ""
|
|
663
|
+
}, r = ie(e.getState().widgets.get(N.id)?.config ?? {}, ut.current, E.config), i = ae(l({
|
|
664
|
+
dataSinkId: E.dataSinkId,
|
|
665
|
+
parserId: E.parserId,
|
|
643
666
|
config: {
|
|
644
667
|
...r,
|
|
645
668
|
binding: void 0
|
|
646
669
|
}
|
|
647
|
-
}), r), a = await
|
|
648
|
-
id:
|
|
649
|
-
title:
|
|
650
|
-
renderer:
|
|
651
|
-
template:
|
|
670
|
+
}), r), a = await ft({
|
|
671
|
+
id: N.id,
|
|
672
|
+
title: E.title,
|
|
673
|
+
renderer: E.renderer,
|
|
674
|
+
template: E.template,
|
|
652
675
|
config: i.config,
|
|
653
|
-
refreshInterval:
|
|
676
|
+
refreshInterval: E.refreshInterval,
|
|
654
677
|
dataSinkId: i.dataSinkId,
|
|
655
|
-
datasetId:
|
|
678
|
+
datasetId: E.datasetId,
|
|
656
679
|
parserId: i.parserId,
|
|
657
|
-
parserRules:
|
|
680
|
+
parserRules: E.parserRules,
|
|
658
681
|
metadata: n
|
|
659
|
-
}), o =
|
|
682
|
+
}), o = N.drilldown, s = null, c = N.drilldown?.id;
|
|
660
683
|
try {
|
|
661
|
-
if (
|
|
662
|
-
let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } =
|
|
663
|
-
if (c && !e) await
|
|
684
|
+
if (E.drilldownConfig) {
|
|
685
|
+
let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } = E.drilldownConfig;
|
|
686
|
+
if (c && !e) await ht(c), o = void 0;
|
|
664
687
|
else if (c) {
|
|
665
|
-
let ee = await
|
|
688
|
+
let ee = await mt({
|
|
666
689
|
id: c,
|
|
667
690
|
targetDashboardId: t,
|
|
668
691
|
targetPageId: n,
|
|
@@ -674,8 +697,8 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
674
697
|
});
|
|
675
698
|
ee && (o = ee);
|
|
676
699
|
} else if (e && t) {
|
|
677
|
-
let e = await
|
|
678
|
-
sourceWidgetId:
|
|
700
|
+
let e = await pt({
|
|
701
|
+
sourceWidgetId: N.id,
|
|
679
702
|
targetDashboardId: t,
|
|
680
703
|
targetPageId: n,
|
|
681
704
|
parameterMapping: i || {},
|
|
@@ -690,61 +713,61 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
690
713
|
s = e instanceof Error ? e : Error(String(e));
|
|
691
714
|
}
|
|
692
715
|
if (a) {
|
|
693
|
-
if (
|
|
694
|
-
title:
|
|
695
|
-
description:
|
|
696
|
-
renderer:
|
|
697
|
-
template:
|
|
716
|
+
if (M(N.id, {
|
|
717
|
+
title: E.title,
|
|
718
|
+
description: E.description,
|
|
719
|
+
renderer: E.renderer,
|
|
720
|
+
template: E.template,
|
|
698
721
|
config: i.config,
|
|
699
|
-
refreshInterval:
|
|
722
|
+
refreshInterval: E.refreshInterval,
|
|
700
723
|
dataSinkId: i.dataSinkId,
|
|
701
|
-
datasetId:
|
|
724
|
+
datasetId: E.datasetId,
|
|
702
725
|
parserId: i.parserId,
|
|
703
|
-
parserRules:
|
|
726
|
+
parserRules: E.parserRules,
|
|
704
727
|
drilldown: o,
|
|
705
728
|
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
706
729
|
}), s) {
|
|
707
|
-
|
|
730
|
+
T("error"), Ge.error(C("bigconsole.widget.drilldown.saveFailed", "Drilldown not saved"), { description: s.message });
|
|
708
731
|
return;
|
|
709
732
|
}
|
|
710
|
-
|
|
711
|
-
} else
|
|
733
|
+
T("saved"), A(E), dt.current === t && k(!1), setTimeout(() => T("idle"), 2e3);
|
|
734
|
+
} else T("error");
|
|
712
735
|
} catch {
|
|
713
|
-
|
|
736
|
+
T("error");
|
|
714
737
|
}
|
|
715
738
|
}, [
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
lt,
|
|
719
|
-
P,
|
|
720
|
-
ut,
|
|
721
|
-
dt,
|
|
739
|
+
N,
|
|
740
|
+
E,
|
|
722
741
|
ft,
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
742
|
+
M,
|
|
743
|
+
pt,
|
|
744
|
+
mt,
|
|
745
|
+
ht,
|
|
746
|
+
C
|
|
747
|
+
]), an = d(() => {
|
|
748
|
+
if (!N) return;
|
|
749
|
+
let e = et(N);
|
|
750
|
+
D(e), A(e), ut.current = N.config || {}, k(!1), T("idle");
|
|
751
|
+
}, [N]), on = d((e) => {
|
|
729
752
|
$(e);
|
|
730
|
-
}, [$]),
|
|
731
|
-
|
|
753
|
+
}, [$]), sn = d((e) => {
|
|
754
|
+
D((t) => t && {
|
|
732
755
|
...t,
|
|
733
756
|
drilldownConfig: e
|
|
734
|
-
}),
|
|
735
|
-
}, [
|
|
757
|
+
}), P();
|
|
758
|
+
}, [P]), cn = N ? a(N.type) : null, ln = ve(() => Ke.map((e) => ({
|
|
736
759
|
value: e.value,
|
|
737
|
-
label:
|
|
738
|
-
description:
|
|
739
|
-
})), [
|
|
760
|
+
label: C(e.labelKey, e.label),
|
|
761
|
+
description: C(e.descriptionKey, e.description)
|
|
762
|
+
})), [C]), un = ve(() => qe.map((e) => ({
|
|
740
763
|
value: e.value,
|
|
741
|
-
label:
|
|
742
|
-
})), [
|
|
743
|
-
return /* @__PURE__ */
|
|
764
|
+
label: C(e.labelKey, e.label)
|
|
765
|
+
})), [C]);
|
|
766
|
+
return /* @__PURE__ */ x(Pe, {
|
|
744
767
|
open: u,
|
|
745
|
-
onOpenChange: (e) => !e &&
|
|
768
|
+
onOpenChange: (e) => !e && Se(),
|
|
746
769
|
modal: !1,
|
|
747
|
-
children: /* @__PURE__ */
|
|
770
|
+
children: /* @__PURE__ */ S(Fe, {
|
|
748
771
|
style: {
|
|
749
772
|
width: "min(420px, 100vw)",
|
|
750
773
|
maxWidth: "100vw",
|
|
@@ -755,20 +778,20 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
755
778
|
overflow: "hidden"
|
|
756
779
|
},
|
|
757
780
|
children: [
|
|
758
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ x(Le, {
|
|
759
782
|
style: {
|
|
760
783
|
padding: "var(--space-cardPadding)",
|
|
761
784
|
borderBottom: "1px solid var(--color-border-subtle)",
|
|
762
785
|
backgroundColor: "var(--color-bg-surface)",
|
|
763
786
|
flexShrink: 0
|
|
764
787
|
},
|
|
765
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ S("div", {
|
|
766
789
|
style: {
|
|
767
790
|
display: "flex",
|
|
768
791
|
alignItems: "center",
|
|
769
792
|
gap: "var(--space-controlGap)"
|
|
770
793
|
},
|
|
771
|
-
children: [/* @__PURE__ */
|
|
794
|
+
children: [/* @__PURE__ */ x("div", {
|
|
772
795
|
style: {
|
|
773
796
|
display: "flex",
|
|
774
797
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -780,62 +803,62 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
780
803
|
boxShadow: "var(--shadow-elevation-2)",
|
|
781
804
|
flexShrink: 0
|
|
782
805
|
},
|
|
783
|
-
children: /* @__PURE__ */
|
|
806
|
+
children: /* @__PURE__ */ x(Ce, { style: {
|
|
784
807
|
height: "var(--size-icon-md)",
|
|
785
808
|
width: "var(--size-icon-md)",
|
|
786
809
|
color: "var(--color-action-primary-text)"
|
|
787
810
|
} })
|
|
788
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ S("div", {
|
|
789
812
|
style: {
|
|
790
813
|
flex: 1,
|
|
791
814
|
minWidth: 0
|
|
792
815
|
},
|
|
793
|
-
children: [/* @__PURE__ */
|
|
816
|
+
children: [/* @__PURE__ */ S("div", {
|
|
794
817
|
style: {
|
|
795
818
|
display: "flex",
|
|
796
819
|
alignItems: "center",
|
|
797
820
|
gap: "var(--space-iconGap)"
|
|
798
821
|
},
|
|
799
822
|
children: [
|
|
800
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ x(Re, {
|
|
801
824
|
style: {
|
|
802
825
|
fontSize: "var(--font-size-body-md)",
|
|
803
826
|
fontWeight: "var(--font-weight-bold)",
|
|
804
827
|
color: "var(--color-text-primary)",
|
|
805
828
|
margin: 0
|
|
806
829
|
},
|
|
807
|
-
children:
|
|
830
|
+
children: N ? C("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : C("bigconsole.widget.properties.header.properties", "Properties")
|
|
808
831
|
}),
|
|
809
|
-
|
|
832
|
+
w === "saving" && /* @__PURE__ */ x(ze, { style: {
|
|
810
833
|
height: "var(--size-icon-sm)",
|
|
811
834
|
width: "var(--size-icon-sm)"
|
|
812
835
|
} }),
|
|
813
|
-
|
|
836
|
+
w === "saved" && /* @__PURE__ */ x(ye, { style: {
|
|
814
837
|
height: "var(--size-icon-sm)",
|
|
815
838
|
width: "var(--size-icon-sm)",
|
|
816
839
|
color: "var(--color-status-success-bg)"
|
|
817
840
|
} }),
|
|
818
|
-
|
|
841
|
+
w === "error" && /* @__PURE__ */ x(De, { style: {
|
|
819
842
|
height: "var(--size-icon-sm)",
|
|
820
843
|
width: "var(--size-icon-sm)",
|
|
821
844
|
color: "var(--color-status-error-bg)"
|
|
822
845
|
} })
|
|
823
846
|
]
|
|
824
|
-
}),
|
|
847
|
+
}), cn && /* @__PURE__ */ x(Ie, {
|
|
825
848
|
style: {
|
|
826
849
|
fontSize: "var(--font-size-body-sm)",
|
|
827
850
|
color: "var(--color-text-secondary)",
|
|
828
851
|
margin: "var(--space-controlGap) 0 0 0",
|
|
829
852
|
fontWeight: "var(--font-weight-medium)"
|
|
830
853
|
},
|
|
831
|
-
children:
|
|
854
|
+
children: cn.name
|
|
832
855
|
})]
|
|
833
856
|
})]
|
|
834
857
|
})
|
|
835
858
|
}),
|
|
836
|
-
|
|
837
|
-
value:
|
|
838
|
-
onValueChange: (e) =>
|
|
859
|
+
N ? /* @__PURE__ */ S(Be, {
|
|
860
|
+
value: tt,
|
|
861
|
+
onValueChange: (e) => nt(e),
|
|
839
862
|
style: {
|
|
840
863
|
flex: 1,
|
|
841
864
|
display: "flex",
|
|
@@ -843,7 +866,7 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
843
866
|
minHeight: 0,
|
|
844
867
|
overflow: "hidden"
|
|
845
868
|
},
|
|
846
|
-
children: [/* @__PURE__ */
|
|
869
|
+
children: [/* @__PURE__ */ S(He, {
|
|
847
870
|
style: {
|
|
848
871
|
width: "100%",
|
|
849
872
|
display: "flex",
|
|
@@ -859,28 +882,28 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
859
882
|
gap: "2px"
|
|
860
883
|
},
|
|
861
884
|
children: [
|
|
862
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ x(y, {
|
|
863
886
|
value: "general",
|
|
864
|
-
style:
|
|
865
|
-
children:
|
|
887
|
+
style: Ze,
|
|
888
|
+
children: C("bigconsole.widget.properties.tab.general", "General")
|
|
866
889
|
}),
|
|
867
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ x(y, {
|
|
868
891
|
value: "data",
|
|
869
|
-
style:
|
|
870
|
-
children:
|
|
892
|
+
style: Ze,
|
|
893
|
+
children: C("bigconsole.widget.properties.tab.data", "Data")
|
|
871
894
|
}),
|
|
872
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ x(y, {
|
|
873
896
|
value: "advanced",
|
|
874
|
-
style:
|
|
875
|
-
children:
|
|
897
|
+
style: Ze,
|
|
898
|
+
children: C("bigconsole.widget.properties.tab.advanced", "Advanced")
|
|
876
899
|
}),
|
|
877
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ x(y, {
|
|
878
901
|
value: "appearance",
|
|
879
|
-
style:
|
|
880
|
-
children:
|
|
902
|
+
style: Ze,
|
|
903
|
+
children: C("bigconsole.widget.properties.tab.style", "Style")
|
|
881
904
|
})
|
|
882
905
|
]
|
|
883
|
-
}), /* @__PURE__ */
|
|
906
|
+
}), /* @__PURE__ */ S("div", {
|
|
884
907
|
style: {
|
|
885
908
|
flex: 1,
|
|
886
909
|
overflow: "auto",
|
|
@@ -888,104 +911,104 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
888
911
|
minHeight: 0
|
|
889
912
|
},
|
|
890
913
|
children: [
|
|
891
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ x(Ve, {
|
|
892
915
|
value: "general",
|
|
893
916
|
className: "mt-0",
|
|
894
|
-
children:
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
title:
|
|
897
|
-
description:
|
|
898
|
-
refreshInterval:
|
|
917
|
+
children: E && /* @__PURE__ */ S(r, { children: [
|
|
918
|
+
/* @__PURE__ */ x(fe, {
|
|
919
|
+
title: E.title,
|
|
920
|
+
description: E.description,
|
|
921
|
+
refreshInterval: E.refreshInterval,
|
|
899
922
|
onTitleChange: (e) => Q("title", e),
|
|
900
923
|
onDescriptionChange: (e) => Q("description", e),
|
|
901
924
|
onRefreshIntervalChange: (e) => Q("refreshInterval", e)
|
|
902
925
|
}),
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
title:
|
|
905
|
-
description:
|
|
926
|
+
/* @__PURE__ */ x(n, {
|
|
927
|
+
title: C("bigconsole.widget.properties.actions.heading", "Buttons"),
|
|
928
|
+
description: C("bigconsole.widget.properties.actions.subheading", "Configure buttons on this widget"),
|
|
906
929
|
headingLevel: 3,
|
|
907
|
-
meta:
|
|
930
|
+
meta: W.length > 0 ? /* @__PURE__ */ x("span", {
|
|
908
931
|
className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
909
|
-
children:
|
|
932
|
+
children: W.length
|
|
910
933
|
}) : void 0,
|
|
911
|
-
actions: !
|
|
934
|
+
actions: !K && /* @__PURE__ */ S(h, {
|
|
912
935
|
size: "sm",
|
|
913
|
-
onClick:
|
|
914
|
-
children: [/* @__PURE__ */
|
|
936
|
+
onClick: Yt,
|
|
937
|
+
children: [/* @__PURE__ */ x(Te, { className: "size-4" }), C("bigconsole.widget.properties.actions.add", "Add button")]
|
|
915
938
|
}),
|
|
916
939
|
"data-testid": "widget-inspector-actions",
|
|
917
|
-
children:
|
|
940
|
+
children: K ? /* @__PURE__ */ S("div", {
|
|
918
941
|
role: "alert",
|
|
919
|
-
children: [/* @__PURE__ */
|
|
942
|
+
children: [/* @__PURE__ */ x("p", { children: C("bigconsole.widget.properties.actions.readFailed", "Buttons could not be verified. Retry before saving.") }), /* @__PURE__ */ x(h, {
|
|
920
943
|
size: "sm",
|
|
921
|
-
disabled:
|
|
922
|
-
onClick: () => void Promise.resolve(
|
|
923
|
-
children:
|
|
944
|
+
disabled: G,
|
|
945
|
+
onClick: () => void Promise.resolve(Et()).catch(() => {}),
|
|
946
|
+
children: C("bigconsole.widget.properties.actions.retry", "Retry")
|
|
924
947
|
})]
|
|
925
|
-
}) :
|
|
948
|
+
}) : G ? /* @__PURE__ */ x("div", {
|
|
926
949
|
className: "flex justify-center py-8",
|
|
927
|
-
children: /* @__PURE__ */
|
|
928
|
-
}) :
|
|
950
|
+
children: /* @__PURE__ */ x(ze, { className: "size-6" })
|
|
951
|
+
}) : W.length === 0 ? /* @__PURE__ */ x("p", {
|
|
929
952
|
className: "text-sm text-text-secondary",
|
|
930
|
-
children:
|
|
931
|
-
}) : /* @__PURE__ */
|
|
953
|
+
children: C("bigconsole.widget.properties.actions.empty", "No buttons yet — add one to let viewers take an action.")
|
|
954
|
+
}) : /* @__PURE__ */ x("div", {
|
|
932
955
|
className: "space-y-2",
|
|
933
|
-
children: [...
|
|
956
|
+
children: [...W].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ x(Oe, {
|
|
934
957
|
className: e.disabled ? "opacity-60" : "",
|
|
935
|
-
children: /* @__PURE__ */
|
|
958
|
+
children: /* @__PURE__ */ S(ke, {
|
|
936
959
|
className: "p-3 flex items-center gap-2",
|
|
937
960
|
children: [
|
|
938
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ S("div", {
|
|
939
962
|
className: "flex flex-col gap-0.5",
|
|
940
|
-
children: [/* @__PURE__ */
|
|
963
|
+
children: [/* @__PURE__ */ x(h, {
|
|
941
964
|
variant: "ghost",
|
|
942
965
|
size: "icon-sm",
|
|
943
|
-
onClick: () =>
|
|
966
|
+
onClick: () => $t(t),
|
|
944
967
|
disabled: t === 0,
|
|
945
968
|
className: "h-5 w-5",
|
|
946
|
-
children: /* @__PURE__ */
|
|
947
|
-
}), /* @__PURE__ */
|
|
969
|
+
children: /* @__PURE__ */ x(xe, { className: "size-3" })
|
|
970
|
+
}), /* @__PURE__ */ x(h, {
|
|
948
971
|
variant: "ghost",
|
|
949
972
|
size: "icon-sm",
|
|
950
|
-
onClick: () =>
|
|
951
|
-
disabled: t ===
|
|
973
|
+
onClick: () => en(t),
|
|
974
|
+
disabled: t === W.length - 1,
|
|
952
975
|
className: "h-5 w-5",
|
|
953
|
-
children: /* @__PURE__ */
|
|
976
|
+
children: /* @__PURE__ */ x(be, { className: "size-3" })
|
|
954
977
|
})]
|
|
955
978
|
}),
|
|
956
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ S("div", {
|
|
957
980
|
className: "flex-1 min-w-0",
|
|
958
|
-
children: [/* @__PURE__ */
|
|
981
|
+
children: [/* @__PURE__ */ S("div", {
|
|
959
982
|
className: "flex items-center gap-2",
|
|
960
|
-
children: [/* @__PURE__ */
|
|
983
|
+
children: [/* @__PURE__ */ x("span", {
|
|
961
984
|
"aria-hidden": "true",
|
|
962
|
-
className: `size-2 shrink-0 rounded-full ${
|
|
963
|
-
}), /* @__PURE__ */
|
|
985
|
+
className: `size-2 shrink-0 rounded-full ${Ye[e.style] || Xe}`
|
|
986
|
+
}), /* @__PURE__ */ x("span", {
|
|
964
987
|
className: "text-sm font-medium truncate",
|
|
965
988
|
children: e.label
|
|
966
989
|
})]
|
|
967
|
-
}), /* @__PURE__ */
|
|
990
|
+
}), /* @__PURE__ */ x("p", {
|
|
968
991
|
className: "text-xs text-text-secondary truncate",
|
|
969
|
-
children:
|
|
970
|
-
method:
|
|
971
|
-
url:
|
|
972
|
-
}) :
|
|
992
|
+
children: Jt.has(e.name) ? C("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
|
|
993
|
+
method: Jt.get(e.name)?.method ?? "",
|
|
994
|
+
url: Jt.get(e.name)?.webhookUrl ?? ""
|
|
995
|
+
}) : C("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
|
|
973
996
|
})]
|
|
974
997
|
}),
|
|
975
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ S("div", {
|
|
976
999
|
className: "flex shrink-0 gap-1",
|
|
977
|
-
children: [/* @__PURE__ */
|
|
1000
|
+
children: [/* @__PURE__ */ x(h, {
|
|
978
1001
|
variant: "ghost",
|
|
979
1002
|
size: "icon-sm",
|
|
980
1003
|
"aria-label": `Edit ${e.label}`,
|
|
981
|
-
onClick: () =>
|
|
982
|
-
children: /* @__PURE__ */
|
|
983
|
-
}), /* @__PURE__ */
|
|
1004
|
+
onClick: () => Xt(e),
|
|
1005
|
+
children: /* @__PURE__ */ x(we, { className: "size-4" })
|
|
1006
|
+
}), /* @__PURE__ */ x(h, {
|
|
984
1007
|
variant: "ghost",
|
|
985
1008
|
size: "icon-sm",
|
|
986
1009
|
"aria-label": `Delete ${e.label}`,
|
|
987
|
-
onClick: () =>
|
|
988
|
-
children: /* @__PURE__ */
|
|
1010
|
+
onClick: () => Qt(e.id),
|
|
1011
|
+
children: /* @__PURE__ */ x(Ee, { className: "size-4" })
|
|
989
1012
|
})]
|
|
990
1013
|
})
|
|
991
1014
|
]
|
|
@@ -993,73 +1016,73 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
993
1016
|
}, e.id))
|
|
994
1017
|
})
|
|
995
1018
|
}),
|
|
996
|
-
|
|
997
|
-
position:
|
|
998
|
-
columns:
|
|
999
|
-
onChange:
|
|
1019
|
+
ot && st && /* @__PURE__ */ x(me, {
|
|
1020
|
+
position: st,
|
|
1021
|
+
columns: he.cols,
|
|
1022
|
+
onChange: ct
|
|
1000
1023
|
})
|
|
1001
1024
|
] })
|
|
1002
1025
|
}),
|
|
1003
|
-
/* @__PURE__ */
|
|
1026
|
+
/* @__PURE__ */ x(Ve, {
|
|
1004
1027
|
value: "data",
|
|
1005
1028
|
className: "mt-0",
|
|
1006
|
-
children:
|
|
1029
|
+
children: E && /* @__PURE__ */ S(r, { children: [(() => {
|
|
1007
1030
|
let e = l({
|
|
1008
|
-
dataSinkId:
|
|
1009
|
-
parserId:
|
|
1031
|
+
dataSinkId: E.dataSinkId,
|
|
1032
|
+
parserId: E.parserId,
|
|
1010
1033
|
config: {
|
|
1011
|
-
...
|
|
1034
|
+
...E.config,
|
|
1012
1035
|
binding: void 0
|
|
1013
1036
|
}
|
|
1014
1037
|
}), t = ne({
|
|
1015
1038
|
binding: e,
|
|
1016
|
-
loading:
|
|
1017
|
-
error:
|
|
1018
|
-
preview:
|
|
1019
|
-
previewComplete:
|
|
1039
|
+
loading: St || bt,
|
|
1040
|
+
error: Tt,
|
|
1041
|
+
preview: Ct,
|
|
1042
|
+
previewComplete: wt
|
|
1020
1043
|
});
|
|
1021
|
-
return /* @__PURE__ */
|
|
1022
|
-
consoleId:
|
|
1044
|
+
return /* @__PURE__ */ x(pe, {
|
|
1045
|
+
consoleId: N?.dashboardId || "",
|
|
1023
1046
|
binding: e,
|
|
1024
|
-
resolvedParser:
|
|
1025
|
-
dataSinkKey:
|
|
1026
|
-
dataPath: typeof
|
|
1047
|
+
resolvedParser: vt ?? void 0,
|
|
1048
|
+
dataSinkKey: gt,
|
|
1049
|
+
dataPath: typeof E.config.dataPath == "string" ? E.config.dataPath : void 0,
|
|
1027
1050
|
status: t.status,
|
|
1028
|
-
resolving:
|
|
1051
|
+
resolving: bt,
|
|
1029
1052
|
missingFields: t.missingFields,
|
|
1030
|
-
preview:
|
|
1031
|
-
error:
|
|
1032
|
-
onDataSinkChange:
|
|
1033
|
-
onParserChange:
|
|
1053
|
+
preview: Ct,
|
|
1054
|
+
error: Tt,
|
|
1055
|
+
onDataSinkChange: tn,
|
|
1056
|
+
onParserChange: nn,
|
|
1034
1057
|
onDataPathChange: (e) => $({
|
|
1035
|
-
...
|
|
1058
|
+
...E.config,
|
|
1036
1059
|
dataPath: e
|
|
1037
1060
|
})
|
|
1038
1061
|
});
|
|
1039
|
-
})(), /* @__PURE__ */
|
|
1062
|
+
})(), /* @__PURE__ */ x(n, {
|
|
1040
1063
|
emphasis: "muted",
|
|
1041
|
-
title:
|
|
1064
|
+
title: C("bigconsole.widget.properties.data.alternativeSources", "Alternative Data Sources"),
|
|
1042
1065
|
description: "Skip the DataSink pipeline and fetch straight from an API, a GraphQL endpoint or sample JSON.",
|
|
1043
1066
|
headingLevel: 3,
|
|
1044
1067
|
"data-testid": "widget-inspector-alt-sources",
|
|
1045
|
-
children: /* @__PURE__ */
|
|
1068
|
+
children: /* @__PURE__ */ S("div", {
|
|
1046
1069
|
className: "flex flex-col gap-form-gap",
|
|
1047
1070
|
children: [
|
|
1048
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ S("div", {
|
|
1049
1072
|
className: "space-y-2",
|
|
1050
|
-
children: [/* @__PURE__ */
|
|
1051
|
-
value:
|
|
1073
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ S(Ae, {
|
|
1074
|
+
value: E.config?.dataSourceType || "",
|
|
1052
1075
|
onValueChange: (e) => $({
|
|
1053
|
-
...
|
|
1076
|
+
...E.config,
|
|
1054
1077
|
dataSourceType: e || void 0
|
|
1055
1078
|
}),
|
|
1056
|
-
children: [/* @__PURE__ */
|
|
1079
|
+
children: [/* @__PURE__ */ x(Me, {
|
|
1057
1080
|
style: {
|
|
1058
1081
|
height: "var(--size-controlHeight-md)",
|
|
1059
1082
|
fontSize: "var(--font-size-body-sm)"
|
|
1060
1083
|
},
|
|
1061
|
-
children: /* @__PURE__ */
|
|
1062
|
-
}), /* @__PURE__ */
|
|
1084
|
+
children: /* @__PURE__ */ x(Ne, { placeholder: C("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
|
|
1085
|
+
}), /* @__PURE__ */ x(je, {
|
|
1063
1086
|
position: "popper",
|
|
1064
1087
|
side: "bottom",
|
|
1065
1088
|
sideOffset: 4,
|
|
@@ -1072,56 +1095,56 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1072
1095
|
boxShadow: "var(--shadow-elevation-3)",
|
|
1073
1096
|
borderRadius: "var(--radius-button)"
|
|
1074
1097
|
},
|
|
1075
|
-
children:
|
|
1098
|
+
children: un.map((e) => /* @__PURE__ */ x(v, {
|
|
1076
1099
|
value: e.value,
|
|
1077
1100
|
children: e.label
|
|
1078
1101
|
}, e.value))
|
|
1079
1102
|
})]
|
|
1080
1103
|
})]
|
|
1081
1104
|
}),
|
|
1082
|
-
|
|
1105
|
+
E.config?.dataSourceType === "REST_API" && /* @__PURE__ */ S("div", {
|
|
1083
1106
|
className: "space-y-3",
|
|
1084
1107
|
children: [
|
|
1085
|
-
/* @__PURE__ */
|
|
1108
|
+
/* @__PURE__ */ S("div", {
|
|
1086
1109
|
className: "space-y-2",
|
|
1087
|
-
children: [/* @__PURE__ */
|
|
1088
|
-
value:
|
|
1110
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.rest.endpointUrlLabel", "Endpoint URL *") }), /* @__PURE__ */ x(g, {
|
|
1111
|
+
value: E.config?.endpointUrl || "",
|
|
1089
1112
|
onChange: (e) => $({
|
|
1090
|
-
...
|
|
1113
|
+
...E.config,
|
|
1091
1114
|
endpointUrl: e.target.value || void 0
|
|
1092
1115
|
}),
|
|
1093
1116
|
placeholder: "https://api.example.com/data"
|
|
1094
1117
|
})]
|
|
1095
1118
|
}),
|
|
1096
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ S("div", {
|
|
1097
1120
|
className: "space-y-2",
|
|
1098
|
-
children: [/* @__PURE__ */
|
|
1099
|
-
value:
|
|
1121
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ S(Ae, {
|
|
1122
|
+
value: E.config?.httpMethod || "GET",
|
|
1100
1123
|
onValueChange: (e) => $({
|
|
1101
|
-
...
|
|
1124
|
+
...E.config,
|
|
1102
1125
|
httpMethod: e
|
|
1103
1126
|
}),
|
|
1104
|
-
children: [/* @__PURE__ */
|
|
1127
|
+
children: [/* @__PURE__ */ x(Me, {
|
|
1105
1128
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1106
|
-
children: /* @__PURE__ */
|
|
1107
|
-
}), /* @__PURE__ */
|
|
1129
|
+
children: /* @__PURE__ */ x(Ne, {})
|
|
1130
|
+
}), /* @__PURE__ */ S(je, {
|
|
1108
1131
|
position: "popper",
|
|
1109
1132
|
side: "bottom",
|
|
1110
1133
|
sideOffset: 4,
|
|
1111
1134
|
children: [
|
|
1112
|
-
/* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ x(v, {
|
|
1113
1136
|
value: "GET",
|
|
1114
1137
|
children: "GET"
|
|
1115
1138
|
}),
|
|
1116
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ x(v, {
|
|
1117
1140
|
value: "POST",
|
|
1118
1141
|
children: "POST"
|
|
1119
1142
|
}),
|
|
1120
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ x(v, {
|
|
1121
1144
|
value: "PUT",
|
|
1122
1145
|
children: "PUT"
|
|
1123
1146
|
}),
|
|
1124
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ x(v, {
|
|
1125
1148
|
value: "DELETE",
|
|
1126
1149
|
children: "DELETE"
|
|
1127
1150
|
})
|
|
@@ -1129,12 +1152,12 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1129
1152
|
})]
|
|
1130
1153
|
})]
|
|
1131
1154
|
}),
|
|
1132
|
-
/* @__PURE__ */
|
|
1155
|
+
/* @__PURE__ */ S("div", {
|
|
1133
1156
|
className: "space-y-2",
|
|
1134
|
-
children: [/* @__PURE__ */
|
|
1135
|
-
value:
|
|
1157
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.rest.headersLabel", "Headers (JSON)") }), /* @__PURE__ */ x(b, {
|
|
1158
|
+
value: E.config?.headers || "",
|
|
1136
1159
|
onChange: (e) => $({
|
|
1137
|
-
...
|
|
1160
|
+
...E.config,
|
|
1138
1161
|
headers: e.target.value || void 0
|
|
1139
1162
|
}),
|
|
1140
1163
|
rows: 3,
|
|
@@ -1142,60 +1165,60 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1142
1165
|
className: "font-mono text-xs"
|
|
1143
1166
|
})]
|
|
1144
1167
|
}),
|
|
1145
|
-
/* @__PURE__ */
|
|
1168
|
+
/* @__PURE__ */ S("div", {
|
|
1146
1169
|
className: "space-y-2",
|
|
1147
|
-
children: [/* @__PURE__ */
|
|
1148
|
-
value:
|
|
1170
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ S(Ae, {
|
|
1171
|
+
value: E.config?.authType || "none",
|
|
1149
1172
|
onValueChange: (e) => $({
|
|
1150
|
-
...
|
|
1173
|
+
...E.config,
|
|
1151
1174
|
authType: e
|
|
1152
1175
|
}),
|
|
1153
|
-
children: [/* @__PURE__ */
|
|
1176
|
+
children: [/* @__PURE__ */ x(Me, {
|
|
1154
1177
|
style: { height: "var(--size-controlHeight-md)" },
|
|
1155
|
-
children: /* @__PURE__ */
|
|
1156
|
-
}), /* @__PURE__ */
|
|
1178
|
+
children: /* @__PURE__ */ x(Ne, {})
|
|
1179
|
+
}), /* @__PURE__ */ S(je, {
|
|
1157
1180
|
position: "popper",
|
|
1158
1181
|
side: "bottom",
|
|
1159
1182
|
sideOffset: 4,
|
|
1160
1183
|
children: [
|
|
1161
|
-
/* @__PURE__ */
|
|
1184
|
+
/* @__PURE__ */ x(v, {
|
|
1162
1185
|
value: "none",
|
|
1163
|
-
children:
|
|
1186
|
+
children: C("bigconsole.widget.properties.rest.authNone", "None")
|
|
1164
1187
|
}),
|
|
1165
|
-
/* @__PURE__ */
|
|
1188
|
+
/* @__PURE__ */ x(v, {
|
|
1166
1189
|
value: "api_key",
|
|
1167
|
-
children:
|
|
1190
|
+
children: C("bigconsole.widget.properties.rest.authApiKey", "API Key")
|
|
1168
1191
|
}),
|
|
1169
|
-
/* @__PURE__ */
|
|
1192
|
+
/* @__PURE__ */ x(v, {
|
|
1170
1193
|
value: "bearer",
|
|
1171
|
-
children:
|
|
1194
|
+
children: C("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
|
|
1172
1195
|
}),
|
|
1173
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ x(v, {
|
|
1174
1197
|
value: "basic",
|
|
1175
|
-
children:
|
|
1198
|
+
children: C("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
|
|
1176
1199
|
})
|
|
1177
1200
|
]
|
|
1178
1201
|
})]
|
|
1179
1202
|
})]
|
|
1180
1203
|
}),
|
|
1181
|
-
!!(
|
|
1204
|
+
!!(E.config?.authType && E.config.authType !== "none") && /* @__PURE__ */ S("div", {
|
|
1182
1205
|
className: "space-y-2",
|
|
1183
|
-
children: [/* @__PURE__ */
|
|
1206
|
+
children: [/* @__PURE__ */ x(_, { children: String(E.config.authType) === "basic" ? C("bigconsole.widget.properties.rest.credentialsLabel", "Credentials (user:pass)") : C("bigconsole.widget.properties.rest.tokenKeyLabel", "Token/Key") }), /* @__PURE__ */ x(g, {
|
|
1184
1207
|
type: "password",
|
|
1185
|
-
value:
|
|
1208
|
+
value: E.config?.authValue || "",
|
|
1186
1209
|
onChange: (e) => $({
|
|
1187
|
-
...
|
|
1210
|
+
...E.config,
|
|
1188
1211
|
authValue: e.target.value || void 0
|
|
1189
1212
|
}),
|
|
1190
|
-
placeholder:
|
|
1213
|
+
placeholder: E.config.authType === "basic" ? C("bigconsole.widget.properties.rest.credentialsPlaceholder", "username:password") : C("bigconsole.widget.properties.rest.tokenKeyPlaceholder", "Enter token or API key")
|
|
1191
1214
|
})]
|
|
1192
1215
|
}),
|
|
1193
|
-
(
|
|
1216
|
+
(E.config?.httpMethod === "POST" || E.config?.httpMethod === "PUT") && /* @__PURE__ */ S("div", {
|
|
1194
1217
|
className: "space-y-2",
|
|
1195
|
-
children: [/* @__PURE__ */
|
|
1196
|
-
value:
|
|
1218
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.rest.requestBodyLabel", "Request Body (JSON)") }), /* @__PURE__ */ x(b, {
|
|
1219
|
+
value: E.config?.requestBody || "",
|
|
1197
1220
|
onChange: (e) => $({
|
|
1198
|
-
...
|
|
1221
|
+
...E.config,
|
|
1199
1222
|
requestBody: e.target.value || void 0
|
|
1200
1223
|
}),
|
|
1201
1224
|
rows: 4,
|
|
@@ -1203,46 +1226,46 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1203
1226
|
className: "font-mono text-xs"
|
|
1204
1227
|
})]
|
|
1205
1228
|
}),
|
|
1206
|
-
/* @__PURE__ */
|
|
1229
|
+
/* @__PURE__ */ S("div", {
|
|
1207
1230
|
className: "space-y-2",
|
|
1208
1231
|
children: [
|
|
1209
|
-
/* @__PURE__ */
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
value:
|
|
1232
|
+
/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1233
|
+
/* @__PURE__ */ x(g, {
|
|
1234
|
+
value: E.config?.dataPath || "",
|
|
1212
1235
|
onChange: (e) => $({
|
|
1213
|
-
...
|
|
1236
|
+
...E.config,
|
|
1214
1237
|
dataPath: e.target.value || void 0
|
|
1215
1238
|
}),
|
|
1216
1239
|
placeholder: "$.data.items or .data.items"
|
|
1217
1240
|
}),
|
|
1218
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ x("p", {
|
|
1219
1242
|
className: "text-xs text-text-secondary",
|
|
1220
|
-
children:
|
|
1243
|
+
children: C("bigconsole.widget.properties.dataPath.restHelp", "JSONPath or dot notation to extract data from response")
|
|
1221
1244
|
})
|
|
1222
1245
|
]
|
|
1223
1246
|
})
|
|
1224
1247
|
]
|
|
1225
1248
|
}),
|
|
1226
|
-
|
|
1249
|
+
E.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ S("div", {
|
|
1227
1250
|
className: "space-y-3",
|
|
1228
1251
|
children: [
|
|
1229
|
-
/* @__PURE__ */
|
|
1252
|
+
/* @__PURE__ */ S("div", {
|
|
1230
1253
|
className: "space-y-2",
|
|
1231
|
-
children: [/* @__PURE__ */
|
|
1232
|
-
value:
|
|
1254
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.graphql.endpointLabel", "GraphQL Endpoint *") }), /* @__PURE__ */ x(g, {
|
|
1255
|
+
value: E.config?.graphqlEndpoint || "",
|
|
1233
1256
|
onChange: (e) => $({
|
|
1234
|
-
...
|
|
1257
|
+
...E.config,
|
|
1235
1258
|
graphqlEndpoint: e.target.value || void 0
|
|
1236
1259
|
}),
|
|
1237
1260
|
placeholder: "https://api.example.com/graphql"
|
|
1238
1261
|
})]
|
|
1239
1262
|
}),
|
|
1240
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ S("div", {
|
|
1241
1264
|
className: "space-y-2",
|
|
1242
|
-
children: [/* @__PURE__ */
|
|
1243
|
-
value:
|
|
1265
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.graphql.queryLabel", "Query *") }), /* @__PURE__ */ x(b, {
|
|
1266
|
+
value: E.config?.graphqlQuery || "",
|
|
1244
1267
|
onChange: (e) => $({
|
|
1245
|
-
...
|
|
1268
|
+
...E.config,
|
|
1246
1269
|
graphqlQuery: e.target.value || void 0
|
|
1247
1270
|
}),
|
|
1248
1271
|
rows: 6,
|
|
@@ -1250,12 +1273,12 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1250
1273
|
className: "font-mono text-xs"
|
|
1251
1274
|
})]
|
|
1252
1275
|
}),
|
|
1253
|
-
/* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ S("div", {
|
|
1254
1277
|
className: "space-y-2",
|
|
1255
|
-
children: [/* @__PURE__ */
|
|
1256
|
-
value:
|
|
1278
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.graphql.variablesLabel", "Variables (JSON, optional)") }), /* @__PURE__ */ x(b, {
|
|
1279
|
+
value: E.config?.graphqlVariables || "",
|
|
1257
1280
|
onChange: (e) => $({
|
|
1258
|
-
...
|
|
1281
|
+
...E.config,
|
|
1259
1282
|
graphqlVariables: e.target.value || void 0
|
|
1260
1283
|
}),
|
|
1261
1284
|
rows: 3,
|
|
@@ -1263,12 +1286,12 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1263
1286
|
className: "font-mono text-xs"
|
|
1264
1287
|
})]
|
|
1265
1288
|
}),
|
|
1266
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ S("div", {
|
|
1267
1290
|
className: "space-y-2",
|
|
1268
|
-
children: [/* @__PURE__ */
|
|
1269
|
-
value:
|
|
1291
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.graphql.headersLabel", "Headers (JSON, optional)") }), /* @__PURE__ */ x(b, {
|
|
1292
|
+
value: E.config?.headers || "",
|
|
1270
1293
|
onChange: (e) => $({
|
|
1271
|
-
...
|
|
1294
|
+
...E.config,
|
|
1272
1295
|
headers: e.target.value || void 0
|
|
1273
1296
|
}),
|
|
1274
1297
|
rows: 2,
|
|
@@ -1276,32 +1299,32 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1276
1299
|
className: "font-mono text-xs"
|
|
1277
1300
|
})]
|
|
1278
1301
|
}),
|
|
1279
|
-
/* @__PURE__ */
|
|
1302
|
+
/* @__PURE__ */ S("div", {
|
|
1280
1303
|
className: "space-y-2",
|
|
1281
1304
|
children: [
|
|
1282
|
-
/* @__PURE__ */
|
|
1283
|
-
/* @__PURE__ */
|
|
1284
|
-
value:
|
|
1305
|
+
/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
|
|
1306
|
+
/* @__PURE__ */ x(g, {
|
|
1307
|
+
value: E.config?.dataPath || "",
|
|
1285
1308
|
onChange: (e) => $({
|
|
1286
|
-
...
|
|
1309
|
+
...E.config,
|
|
1287
1310
|
dataPath: e.target.value || void 0
|
|
1288
1311
|
}),
|
|
1289
1312
|
placeholder: ".data.items"
|
|
1290
1313
|
}),
|
|
1291
|
-
/* @__PURE__ */
|
|
1314
|
+
/* @__PURE__ */ x("p", {
|
|
1292
1315
|
className: "text-xs text-text-secondary",
|
|
1293
|
-
children:
|
|
1316
|
+
children: C("bigconsole.widget.properties.dataPath.graphqlHelp", "Path to extract data from GraphQL response")
|
|
1294
1317
|
})
|
|
1295
1318
|
]
|
|
1296
1319
|
})
|
|
1297
1320
|
]
|
|
1298
1321
|
}),
|
|
1299
|
-
|
|
1322
|
+
E.config?.dataSourceType === "MOCK" && /* @__PURE__ */ S("div", {
|
|
1300
1323
|
className: "space-y-2",
|
|
1301
|
-
children: [/* @__PURE__ */
|
|
1302
|
-
value:
|
|
1324
|
+
children: [/* @__PURE__ */ x(_, { children: C("bigconsole.widget.properties.mock.sampleDataLabel", "Sample Data (JSON)") }), /* @__PURE__ */ x(b, {
|
|
1325
|
+
value: E.config?.mockData || "",
|
|
1303
1326
|
onChange: (e) => $({
|
|
1304
|
-
...
|
|
1327
|
+
...E.config,
|
|
1305
1328
|
mockData: e.target.value || void 0
|
|
1306
1329
|
}),
|
|
1307
1330
|
rows: 5,
|
|
@@ -1313,86 +1336,86 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1313
1336
|
})
|
|
1314
1337
|
})] })
|
|
1315
1338
|
}),
|
|
1316
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ x(Ve, {
|
|
1317
1340
|
value: "advanced",
|
|
1318
1341
|
className: "mt-0",
|
|
1319
|
-
children: /* @__PURE__ */
|
|
1320
|
-
|
|
1321
|
-
renderer:
|
|
1322
|
-
rendererOptions:
|
|
1342
|
+
children: /* @__PURE__ */ S(r, { children: [
|
|
1343
|
+
E && /* @__PURE__ */ x(ue, {
|
|
1344
|
+
renderer: E.renderer,
|
|
1345
|
+
rendererOptions: ln,
|
|
1323
1346
|
onRendererChange: (e) => {
|
|
1324
1347
|
Q("renderer", e), e === "BIGCONSOLE" && Q("template", void 0);
|
|
1325
1348
|
},
|
|
1326
|
-
templateEditor:
|
|
1349
|
+
templateEditor: E.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ x($e, {
|
|
1327
1350
|
widget: {
|
|
1328
|
-
...
|
|
1329
|
-
template:
|
|
1330
|
-
renderer:
|
|
1351
|
+
...N,
|
|
1352
|
+
template: E.template,
|
|
1353
|
+
renderer: E.renderer
|
|
1331
1354
|
},
|
|
1332
1355
|
onSave: (e) => Q("template", e)
|
|
1333
1356
|
})
|
|
1334
1357
|
}),
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
title:
|
|
1358
|
+
/* @__PURE__ */ x(n, {
|
|
1359
|
+
title: C("bigconsole.widget.properties.section.drilldown", "Drilldown"),
|
|
1337
1360
|
description: "Where a click on this widget's data takes the viewer.",
|
|
1338
1361
|
headingLevel: 3,
|
|
1339
1362
|
"data-testid": "widget-inspector-drilldown",
|
|
1340
|
-
children: /* @__PURE__ */
|
|
1341
|
-
widget:
|
|
1342
|
-
onChange:
|
|
1363
|
+
children: /* @__PURE__ */ x(le, {
|
|
1364
|
+
widget: N,
|
|
1365
|
+
onChange: sn
|
|
1343
1366
|
})
|
|
1344
1367
|
}),
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
title:
|
|
1368
|
+
/* @__PURE__ */ x(n, {
|
|
1369
|
+
title: C("bigconsole.widget.properties.section.webhooks", "Webhooks"),
|
|
1347
1370
|
description: "HTTP endpoints called when this widget emits an event.",
|
|
1348
1371
|
headingLevel: 3,
|
|
1349
1372
|
"data-testid": "widget-inspector-webhooks",
|
|
1350
|
-
children: /* @__PURE__ */
|
|
1351
|
-
dashboardId:
|
|
1352
|
-
widgetId:
|
|
1373
|
+
children: /* @__PURE__ */ x(se, {
|
|
1374
|
+
dashboardId: N.dashboardId,
|
|
1375
|
+
widgetId: N.id
|
|
1353
1376
|
})
|
|
1354
1377
|
}),
|
|
1355
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ x(n, {
|
|
1356
1379
|
emphasis: "muted",
|
|
1357
|
-
title:
|
|
1380
|
+
title: C("bigconsole.widget.properties.section.events", "Events"),
|
|
1358
1381
|
description: "Recent deliveries for this widget, newest first. Supporting detail — nothing here changes the widget.",
|
|
1359
1382
|
headingLevel: 3,
|
|
1360
1383
|
"data-testid": "widget-inspector-events",
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1362
|
-
dashboardId:
|
|
1363
|
-
widgetId:
|
|
1384
|
+
children: /* @__PURE__ */ x(ce, {
|
|
1385
|
+
dashboardId: N.dashboardId,
|
|
1386
|
+
widgetId: N.id,
|
|
1364
1387
|
maxHeight: "min(50vh, 360px)"
|
|
1365
1388
|
})
|
|
1366
1389
|
})
|
|
1367
1390
|
] })
|
|
1368
1391
|
}),
|
|
1369
|
-
/* @__PURE__ */
|
|
1392
|
+
/* @__PURE__ */ x(Ve, {
|
|
1370
1393
|
value: "appearance",
|
|
1371
1394
|
className: "mt-0",
|
|
1372
|
-
children:
|
|
1373
|
-
widgetType:
|
|
1374
|
-
config:
|
|
1375
|
-
onChange:
|
|
1395
|
+
children: E && /* @__PURE__ */ x(de, {
|
|
1396
|
+
widgetType: N.type,
|
|
1397
|
+
config: E.config || {},
|
|
1398
|
+
onChange: on
|
|
1376
1399
|
})
|
|
1377
1400
|
})
|
|
1378
1401
|
]
|
|
1379
1402
|
})]
|
|
1380
|
-
}) : /* @__PURE__ */
|
|
1403
|
+
}) : /* @__PURE__ */ x("div", {
|
|
1381
1404
|
className: "flex min-h-0 flex-1 items-center justify-center p-card-padding",
|
|
1382
|
-
children: /* @__PURE__ */
|
|
1405
|
+
children: /* @__PURE__ */ x(n, {
|
|
1383
1406
|
tone: "info",
|
|
1384
|
-
title:
|
|
1407
|
+
title: C("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
|
|
1385
1408
|
headingLevel: 3,
|
|
1386
|
-
icon: /* @__PURE__ */
|
|
1409
|
+
icon: /* @__PURE__ */ x(Ce, { className: "h-icon-md w-icon-md" }),
|
|
1387
1410
|
className: "w-full max-w-sm",
|
|
1388
1411
|
"data-testid": "widget-inspector-empty",
|
|
1389
|
-
children: /* @__PURE__ */
|
|
1412
|
+
children: /* @__PURE__ */ x("p", {
|
|
1390
1413
|
className: "text-sm text-text-secondary",
|
|
1391
1414
|
children: "Pick a widget on the canvas and its identity, data binding, actions and style options appear here."
|
|
1392
1415
|
})
|
|
1393
1416
|
})
|
|
1394
1417
|
}),
|
|
1395
|
-
|
|
1418
|
+
N && /* @__PURE__ */ S("div", {
|
|
1396
1419
|
style: {
|
|
1397
1420
|
padding: "var(--space-cardPadding)",
|
|
1398
1421
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
@@ -1400,94 +1423,94 @@ var T = u(function({ isOpen: u, onClose: be }) {
|
|
|
1400
1423
|
flexShrink: 0
|
|
1401
1424
|
},
|
|
1402
1425
|
children: [
|
|
1403
|
-
|
|
1426
|
+
O && /* @__PURE__ */ x(n, {
|
|
1404
1427
|
tone: "warning",
|
|
1405
1428
|
padding: "compact",
|
|
1406
|
-
title:
|
|
1429
|
+
title: C("bigconsole.widget.properties.footer.unsavedChanges", "You have unsaved changes"),
|
|
1407
1430
|
headingLevel: 3,
|
|
1408
1431
|
className: "mb-control-gap",
|
|
1409
1432
|
"data-testid": "widget-inspector-save-unsaved"
|
|
1410
1433
|
}),
|
|
1411
|
-
|
|
1434
|
+
w === "saved" && !O && /* @__PURE__ */ x(n, {
|
|
1412
1435
|
tone: "success",
|
|
1413
1436
|
padding: "compact",
|
|
1414
|
-
title:
|
|
1437
|
+
title: C("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
|
|
1415
1438
|
headingLevel: 3,
|
|
1416
|
-
icon: /* @__PURE__ */
|
|
1439
|
+
icon: /* @__PURE__ */ x(ye, { className: "h-icon-sm w-icon-sm" }),
|
|
1417
1440
|
className: "mb-control-gap",
|
|
1418
1441
|
"data-testid": "widget-inspector-save-saved"
|
|
1419
1442
|
}),
|
|
1420
|
-
|
|
1443
|
+
w === "error" && /* @__PURE__ */ x(n, {
|
|
1421
1444
|
tone: "danger",
|
|
1422
1445
|
padding: "compact",
|
|
1423
|
-
title:
|
|
1446
|
+
title: C("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
|
|
1424
1447
|
headingLevel: 3,
|
|
1425
|
-
icon: /* @__PURE__ */
|
|
1448
|
+
icon: /* @__PURE__ */ x(De, { className: "h-icon-sm w-icon-sm" }),
|
|
1426
1449
|
className: "mb-control-gap",
|
|
1427
1450
|
"data-testid": "widget-inspector-save-error"
|
|
1428
1451
|
}),
|
|
1429
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ S("div", {
|
|
1430
1453
|
className: "flex flex-wrap gap-control-gap",
|
|
1431
|
-
children: [/* @__PURE__ */
|
|
1432
|
-
onClick:
|
|
1433
|
-
disabled:
|
|
1454
|
+
children: [/* @__PURE__ */ x(h, {
|
|
1455
|
+
onClick: rn,
|
|
1456
|
+
disabled: w === "saving" || !O,
|
|
1434
1457
|
style: {
|
|
1435
1458
|
flex: 1,
|
|
1436
1459
|
height: "var(--size-controlHeight-md)",
|
|
1437
|
-
backgroundColor:
|
|
1438
|
-
opacity:
|
|
1460
|
+
backgroundColor: O ? "var(--color-action-primary-bg)" : void 0,
|
|
1461
|
+
opacity: O ? 1 : .5
|
|
1439
1462
|
},
|
|
1440
|
-
children:
|
|
1463
|
+
children: w === "saving" ? /* @__PURE__ */ S("span", {
|
|
1441
1464
|
style: {
|
|
1442
1465
|
display: "flex",
|
|
1443
1466
|
alignItems: "center",
|
|
1444
1467
|
gap: "var(--space-iconGap)"
|
|
1445
1468
|
},
|
|
1446
|
-
children: [/* @__PURE__ */
|
|
1469
|
+
children: [/* @__PURE__ */ x(ze, { style: {
|
|
1447
1470
|
width: "var(--size-icon-sm)",
|
|
1448
1471
|
height: "var(--size-icon-sm)"
|
|
1449
|
-
} }),
|
|
1450
|
-
}) : /* @__PURE__ */
|
|
1472
|
+
} }), C("bigconsole.widget.properties.footer.saving", "Saving...")]
|
|
1473
|
+
}) : /* @__PURE__ */ S("span", {
|
|
1451
1474
|
style: {
|
|
1452
1475
|
display: "flex",
|
|
1453
1476
|
alignItems: "center",
|
|
1454
1477
|
gap: "var(--space-iconGap)"
|
|
1455
1478
|
},
|
|
1456
|
-
children: [/* @__PURE__ */
|
|
1479
|
+
children: [/* @__PURE__ */ x(ye, { style: {
|
|
1457
1480
|
width: "var(--size-icon-sm)",
|
|
1458
1481
|
height: "var(--size-icon-sm)"
|
|
1459
|
-
} }),
|
|
1482
|
+
} }), C("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
|
|
1460
1483
|
})
|
|
1461
|
-
}), /* @__PURE__ */
|
|
1484
|
+
}), /* @__PURE__ */ S(h, {
|
|
1462
1485
|
variant: "outline",
|
|
1463
|
-
onClick:
|
|
1464
|
-
disabled:
|
|
1486
|
+
onClick: an,
|
|
1487
|
+
disabled: w === "saving" || !O,
|
|
1465
1488
|
style: {
|
|
1466
1489
|
height: "var(--size-controlHeight-md)",
|
|
1467
|
-
opacity:
|
|
1490
|
+
opacity: O ? 1 : .5
|
|
1468
1491
|
},
|
|
1469
|
-
children: [/* @__PURE__ */
|
|
1492
|
+
children: [/* @__PURE__ */ x(De, { style: {
|
|
1470
1493
|
width: "var(--size-icon-sm)",
|
|
1471
1494
|
height: "var(--size-icon-sm)"
|
|
1472
|
-
} }),
|
|
1495
|
+
} }), C("bigconsole.widget.properties.footer.discard", "Discard")]
|
|
1473
1496
|
})]
|
|
1474
1497
|
})
|
|
1475
1498
|
]
|
|
1476
1499
|
}),
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
isOpen:
|
|
1479
|
-
action:
|
|
1480
|
-
initialWebhook:
|
|
1481
|
-
isLoading:
|
|
1482
|
-
saveError:
|
|
1500
|
+
/* @__PURE__ */ x(oe, {
|
|
1501
|
+
isOpen: zt,
|
|
1502
|
+
action: Vt,
|
|
1503
|
+
initialWebhook: qt,
|
|
1504
|
+
isLoading: Ht,
|
|
1505
|
+
saveError: Gt,
|
|
1483
1506
|
onClose: () => {
|
|
1484
|
-
|
|
1507
|
+
Bt(!1), Y(void 0), X(void 0), Z(null);
|
|
1485
1508
|
},
|
|
1486
|
-
onSave:
|
|
1509
|
+
onSave: Zt
|
|
1487
1510
|
})
|
|
1488
1511
|
]
|
|
1489
1512
|
})
|
|
1490
1513
|
});
|
|
1491
1514
|
});
|
|
1492
1515
|
//#endregion
|
|
1493
|
-
export {
|
|
1516
|
+
export { C as PropertiesPanel, C as default };
|