@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.
@@ -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, reconcilePanelConfig as re, serializeWidgetBinding as ie } from "../../utils/widgetBinding.js";
15
- import { ActionConfigDialog as ae } from "./ActionConfigDialog.js";
16
- import { WebhookConfigPanel as oe } from "./webhook-config/WebhookConfigPanel.js";
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 se } from "./event-logs/EventLogViewer.js";
18
+ import { EventLogViewer as ce } from "./event-logs/EventLogViewer.js";
19
19
  import "./event-logs/index.js";
20
- import { DrilldownConfigPanel as ce } from "./DrilldownConfigPanel.js";
21
- import { AdvancedSection as le } from "../builder/inspector/AdvancedSection.js";
22
- import { AppearanceSection as ue } from "../builder/inspector/AppearanceSection.js";
23
- import { GeneralSection as de } from "../builder/inspector/GeneralSection.js";
24
- import { DataBindingSection as fe } from "../builder/inspector/DataBindingSection.js";
25
- import { LayoutSection as pe } from "../builder/inspector/LayoutSection.js";
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 me } from "../../utils/widgetPositioning.js";
28
- import { isWidgetFormEdited as he, withInferredDataSink as ge } from "../../utils/widgetFormDirty.js";
29
- import { memo as u, useCallback as d, useEffect as f, useMemo as p, useRef as _e, useState as m } from "react";
30
- import { Check as h, ChevronDown as ve, ChevronUp as ye, ExternalLink as be, Info as xe, Pencil as Se, Plus as Ce, Trash2 as we, X as Te } from "lucide-react";
31
- import { Button as g, Card as Ee, CardContent as De, Input as _, Label as v, Select as Oe, SelectContent as ke, SelectItem as y, SelectTrigger as Ae, SelectValue as je, Sheet as Me, SheetContent as Ne, SheetDescription as Pe, SheetHeader as Fe, SheetTitle as Ie, Spinner as Le, Tabs as Re, TabsContent as b, TabsList as ze, TabsTrigger as x, Textarea as S } from "@burdenoff/fe-libs/ui";
32
- import { useUnsavedChanges as Be } from "@burdenoff/fe-libs/shared/hooks";
33
- import { useI18n as Ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
34
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
35
- import { toast as He } from "sonner";
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 Ue = [
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
- ], We = [
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 Ge(e) {
110
+ function Je(e) {
111
111
  return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
112
112
  }
113
- var Ke = {
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
- }, qe = "bg-[var(--color-text-muted)]", Je = {
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 Ye(e) {
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 Xe = u(function({ widget: e, onSave: t }) {
171
- let { t: r } = Ve(), [i, a] = m(""), [o, s] = m(null), c = _e(!1);
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__ */ w(n, {
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__ */ C("span", {
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__ */ C(S, {
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__ */ C("p", {
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__ */ w("div", {
235
+ /* @__PURE__ */ S("div", {
236
236
  className: "mt-control-gap flex flex-wrap items-center gap-control-gap",
237
- children: [/* @__PURE__ */ C(g, {
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__ */ w("span", {
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__ */ C(h, { style: {
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__ */ w("div", {
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__ */ C("span", {
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__ */ w("a", {
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__ */ C(be, { style: {
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__ */ w("a", {
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__ */ C(be, { style: {
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 Ze(e) {
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 T = u(function({ isOpen: u, onClose: be }) {
338
- let { t: T } = Ve(), [Qe, $e] = m("general"), [E, D] = m("idle"), [O, k] = m(null), [A, j] = m(!1), [et, M] = m(null);
339
- Be({
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: T("bigconsole.assistant.unsaved.widgetProperties", "the widget properties"),
342
- dirty: he(O, et)
341
+ label: C("bigconsole.assistant.unsaved.widgetProperties", "the widget properties"),
342
+ dirty: ge(E, rt)
343
343
  });
344
- let N = e((e) => e.selectedWidgetId), tt = e((e) => e.widgets), P = e((e) => e.updateWidget), nt = e((e) => e.updateWidgetPosition), rt = t(), F = N ? tt.get(N) : void 0, it = F ? {
345
- x: F.position?.x ?? F.positionX ?? 0,
346
- y: F.position?.y ?? F.positionY ?? 0,
347
- width: F.position?.width ?? F.positionWidth ?? 4,
348
- height: F.position?.height ?? F.positionHeight ?? 4
349
- } : null, at = d((e) => {
350
- N && nt(N, e);
351
- }, [N, nt]), ot = _e(null), st = _e({}), ct = _e(0), I = d(() => {
352
- ct.current += 1, j(!0);
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 (!N) {
356
- ot.current = null, k(null), M(null), j(!1), D("idle");
355
+ if (!j) {
356
+ lt.current = null, D(null), A(null), k(!1), T("idle");
357
357
  return;
358
358
  }
359
- let e = ot.current !== N;
360
- if (ot.current = N, F) {
361
- if (A && !e) return;
362
- let t = Ze(F);
363
- k(t), M(t), st.current = F.config || {}, j(!1), D("idle");
364
- } else k(null), M(null), j(!1), D("idle");
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
- F,
368
- A
368
+ O
369
369
  ]);
370
- let { updateWidget: lt } = i(F?.pageId, F?.dashboardId, { skipFetch: !0 }), { createDrilldown: ut, updateDrilldown: dt, deleteDrilldown: ft } = o(), { dataSinks: L } = ee({ skipFetch: !1 }), [pt, R] = m(null), { executeParser: mt, fetchParser: ht } = te({
371
- consoleId: F?.dashboardId,
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
- }), [z, gt] = m(null), [_t, vt] = m(!1), yt = O?.parserId;
373
+ }), [vt, yt] = m(null), [bt, xt] = m(!1), R = E?.parserId;
374
374
  f(() => {
375
375
  let e = !1;
376
- if (gt(null), !u || !yt) {
377
- vt(!1);
376
+ if (yt(null), !u || !R) {
377
+ xt(!1);
378
378
  return;
379
379
  }
380
- return vt(!0), ht(yt).then((t) => {
381
- e || (gt(t), vt(!1));
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
- yt,
388
- N,
389
- ht
387
+ R,
388
+ j,
389
+ _t
390
390
  ]);
391
- let [bt, xt] = m(!1), [St, B] = m(void 0), [Ct, V] = m(!1), [wt, H] = m(null);
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), xt(!1);
394
- }, [N]);
395
- let { actions: U, loading: W, error: G, refetch: Tt, createAction: Et, updateAction: Dt, deleteAction: Ot, reorderActions: K } = s(N || void 0), { webhooks: kt, loading: At, error: q, createWebhook: jt, updateWebhook: Mt, deleteWebhook: Nt, refetch: Pt } = c({
396
- widgetId: N || void 0,
397
- skipFetch: !N
398
- }), Ft = d((e, t) => {
399
- let n = Ge(t);
400
- return e.find((e) => e.widgetId === N && e.eventPattern === n) ?? null;
401
- }, [N]), J = d((e) => Ft(kt, e), [Ft, kt]), It = d(async (e, t) => {
402
- if (!N || t === void 0) return !0;
403
- if (q) return !1;
404
- let n = Ge(e), r = J(e);
405
- if (!r && At) {
406
- let t = (await Pt())?.data?.listEventWebhookMappings ?? [];
407
- r = Ft(t, e);
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 Mt({
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 jt({
416
- widgetId: N,
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 ? Nt(r.id) : !0;
442
+ }) !== null : t === null && r ? Ft(r.id) : !0;
421
443
  }, [
422
- N,
444
+ j,
423
445
  J,
424
- At,
425
- q,
426
- Pt,
427
- Ft,
428
446
  jt,
429
447
  Mt,
430
- Nt
431
- ]), [Lt, Rt] = m(!1), [zt, Y] = m(void 0), [Bt, Vt] = m(!1), [Ht, X] = m(void 0), [Ut, Z] = m(null), Wt = p(() => {
432
- if (!zt) return null;
433
- let e = J(zt.name);
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
- }, [zt, J]), Gt = Ht === void 0 ? Wt : Ht, Kt = p(() => {
460
+ }, [Vt, J]), qt = Wt === void 0 ? Kt : Wt, Jt = ve(() => {
439
461
  let e = /* @__PURE__ */ new Map();
440
- for (let t of U) {
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
- }, [U, J]), qt = d(() => {
446
- X(void 0), Z(null), Y(void 0), Rt(!0);
447
- }, []), Jt = d((e) => {
448
- X(void 0), Z(null), Y(e), Rt(!0);
449
- }, []), Yt = d(async (e, t) => {
450
- if (N) {
451
- if (G) {
452
- Z(T("bigconsole.widget.properties.actions.readFailed", "Buttons could not be verified. Retry before saving."));
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 (q) {
456
- Z(T("bigconsole.widget.properties.action.webhookReadFailed", "Webhook mappings could not be verified. Retry the webhook read before saving."));
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
- Vt(!0), Z(null);
481
+ Ut(!0), Z(null);
460
482
  try {
461
483
  let n = "id" in e && !!e.id, r = null;
462
- if (r = n ? await Dt(e) : await Et(e), r) {
463
- let e = [...U];
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 (P(N, { actions: i }), !await It(r.name, t)) {
470
- X(t), Z(t ? T("bigconsole.widget.properties.action.webhookSaveFailed", "The button was saved, but its webhook could not be saved. Check the URL and try again.") : T("bigconsole.widget.properties.action.webhookRemoveFailed", "The button was saved, but its old webhook could not be removed. Try again.")), Y(r);
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), Rt(!1), Y(void 0);
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 : T("bigconsole.widget.properties.action.saveFailed", "Could not save the button. Please try again."));
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
- Vt(!1);
500
+ Ut(!1);
479
501
  }
480
502
  }
481
503
  }, [
482
- N,
483
- q,
484
- G,
485
- U,
486
- Et,
504
+ j,
505
+ Mt,
506
+ K,
507
+ W,
487
508
  Dt,
488
- P,
489
- It,
490
- T
491
- ]), Xt = d(async (e) => {
492
- if (N && window.confirm(T("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
493
- let t = U.find((t) => t.id === e);
494
- if (await Ot(e)) {
495
- let n = U.filter((t) => t.id !== e);
496
- if (P(N, { actions: n }), t) {
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 Nt(e.id);
520
+ e && await Ft(e.id);
499
521
  }
500
522
  }
501
523
  }
502
524
  }, [
503
- N,
504
- U,
505
- Ot,
506
- P,
525
+ j,
526
+ W,
527
+ kt,
528
+ M,
507
529
  J,
508
- Nt,
509
- T
510
- ]), Zt = d(async (e) => {
511
- if (!N || e === 0) return;
512
- let t = [...U].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
513
- if ([n[e - 1], n[e]] = [n[e], n[e - 1]], await K(n)) {
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
- P(N, { actions: e });
540
+ M(j, { actions: e });
519
541
  }
520
542
  }, [
521
- N,
522
- U,
523
- K,
524
- P
525
- ]), Qt = d(async (e) => {
526
- if (!N) return;
527
- let t = [...U].sort((e, t) => e.order - t.order);
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 K(n)) {
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
- P(N, { actions: e });
557
+ M(j, { actions: e });
536
558
  }
537
559
  }, [
538
- N,
539
- U,
540
- K,
541
- P
560
+ j,
561
+ W,
562
+ q,
563
+ M
542
564
  ]);
543
565
  f(() => {
544
- N && U.length >= 0 && !W && P(N, { actions: U });
566
+ j && W.length >= 0 && !G && M(j, { actions: W });
545
567
  }, [
546
- N,
547
- U,
568
+ j,
548
569
  W,
549
- P
570
+ G,
571
+ M
550
572
  ]);
551
573
  let Q = d((e, t) => {
552
- k((n) => n && {
574
+ D((n) => n && {
553
575
  ...n,
554
576
  [e]: t
555
- }), I();
556
- }, [I]), $ = d((e) => {
557
- k((t) => t && {
577
+ }), P();
578
+ }, [P]), $ = d((e) => {
579
+ D((t) => t && {
558
580
  ...t,
559
581
  config: e
560
- }), I();
561
- }, [I]);
582
+ }), P();
583
+ }, [P]);
562
584
  f(() => {
563
- if (!O) {
564
- R(null);
585
+ if (!E) {
586
+ I(null);
565
587
  return;
566
588
  }
567
- if (O.dataSinkId) {
568
- R(L.find((e) => e.id === O.dataSinkId)?.key ?? null);
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: O.parserId,
573
- config: O.config
574
- }), t = z?.id === O.parserId ? z : null, n = e.source.kind === "DATASINK" && !e.source.ref && t ? L.find((e) => e.key === t.inputSinkKey) : void 0;
575
- R(n?.key ?? null), n && t && (k((e) => ge(e, t.id, n.id)), M((e) => ge(e, t.id, n.id)));
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
- O,
578
- L,
579
- z
599
+ E,
600
+ F,
601
+ vt
580
602
  ]);
581
- let $t = d((e) => {
582
- if (B(void 0), V(!1), H(null), R(e), e) {
583
- let t = L.find((t) => t.key === e);
584
- t && (Q("dataSinkId", t.id), k((t) => t && {
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
- }), I());
591
- } else Q("dataSinkId", void 0), k((e) => e && {
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
- }), I();
620
+ }), P();
599
621
  }, [
600
- L,
622
+ F,
601
623
  Q,
602
- I
603
- ]), en = d(async (e) => {
604
- if (Q("parserId", e || void 0), B(void 0), V(!1), H(null), e && F) {
605
- xt(!0);
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 mt(e);
629
+ let t = await L(e);
608
630
  if (t?.success) {
609
631
  B(t.output), V(!0);
610
- let e = Ye(t.output);
611
- (e.labelField || e.valueField) && (k((t) => {
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
- }), I());
619
- } else V(!0), H(t?.error || T("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview."));
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 : T("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.")), console.warn("Failed to auto-detect parser fields:", e);
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
- xt(!1);
645
+ z(!1);
624
646
  }
625
647
  }
626
648
  }, [
627
649
  Q,
628
- mt,
629
- F,
630
- I,
631
- T
632
- ]), tn = d(async () => {
633
- if (!F || !O) return;
634
- let t = ct.current;
635
- D("saving");
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
- ...F.metadata || {},
639
- description: O.description || ""
640
- }, r = re(e.getState().widgets.get(F.id)?.config ?? {}, st.current, O.config), i = ie(l({
641
- dataSinkId: O.dataSinkId,
642
- parserId: O.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 lt({
648
- id: F.id,
649
- title: O.title,
650
- renderer: O.renderer,
651
- template: O.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: O.refreshInterval,
676
+ refreshInterval: E.refreshInterval,
654
677
  dataSinkId: i.dataSinkId,
655
- datasetId: O.datasetId,
678
+ datasetId: E.datasetId,
656
679
  parserId: i.parserId,
657
- parserRules: O.parserRules,
680
+ parserRules: E.parserRules,
658
681
  metadata: n
659
- }), o = F.drilldown, s = null, c = F.drilldown?.id;
682
+ }), o = N.drilldown, s = null, c = N.drilldown?.id;
660
683
  try {
661
- if (O.drilldownConfig) {
662
- let { enabled: e, targetDashboardId: t, targetPageId: n, navigationMode: r, parameterMapping: i, passGlobalFilters: a, maxDepth: s } = O.drilldownConfig;
663
- if (c && !e) await ft(c), o = void 0;
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 dt({
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 ut({
678
- sourceWidgetId: F.id,
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 (P(F.id, {
694
- title: O.title,
695
- description: O.description,
696
- renderer: O.renderer,
697
- template: O.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: O.refreshInterval,
722
+ refreshInterval: E.refreshInterval,
700
723
  dataSinkId: i.dataSinkId,
701
- datasetId: O.datasetId,
724
+ datasetId: E.datasetId,
702
725
  parserId: i.parserId,
703
- parserRules: O.parserRules,
726
+ parserRules: E.parserRules,
704
727
  drilldown: o,
705
728
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
706
729
  }), s) {
707
- D("error"), He.error(T("bigconsole.widget.drilldown.saveFailed", "Drilldown not saved"), { description: s.message });
730
+ T("error"), Ge.error(C("bigconsole.widget.drilldown.saveFailed", "Drilldown not saved"), { description: s.message });
708
731
  return;
709
732
  }
710
- D("saved"), M(O), ct.current === t && j(!1), setTimeout(() => D("idle"), 2e3);
711
- } else D("error");
733
+ T("saved"), A(E), dt.current === t && k(!1), setTimeout(() => T("idle"), 2e3);
734
+ } else T("error");
712
735
  } catch {
713
- D("error");
736
+ T("error");
714
737
  }
715
738
  }, [
716
- F,
717
- O,
718
- lt,
719
- P,
720
- ut,
721
- dt,
739
+ N,
740
+ E,
722
741
  ft,
723
- T
724
- ]), nn = d(() => {
725
- if (!F) return;
726
- let e = Ze(F);
727
- k(e), M(e), st.current = F.config || {}, j(!1), D("idle");
728
- }, [F]), rn = d((e) => {
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
- }, [$]), an = d((e) => {
731
- k((t) => t && {
753
+ }, [$]), sn = d((e) => {
754
+ D((t) => t && {
732
755
  ...t,
733
756
  drilldownConfig: e
734
- }), I();
735
- }, [I]), on = F ? a(F.type) : null, sn = p(() => Ue.map((e) => ({
757
+ }), P();
758
+ }, [P]), cn = N ? a(N.type) : null, ln = ve(() => Ke.map((e) => ({
736
759
  value: e.value,
737
- label: T(e.labelKey, e.label),
738
- description: T(e.descriptionKey, e.description)
739
- })), [T]), cn = p(() => We.map((e) => ({
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: T(e.labelKey, e.label)
742
- })), [T]);
743
- return /* @__PURE__ */ C(Me, {
764
+ label: C(e.labelKey, e.label)
765
+ })), [C]);
766
+ return /* @__PURE__ */ x(Pe, {
744
767
  open: u,
745
- onOpenChange: (e) => !e && be(),
768
+ onOpenChange: (e) => !e && Se(),
746
769
  modal: !1,
747
- children: /* @__PURE__ */ w(Ne, {
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__ */ C(Fe, {
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__ */ w("div", {
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__ */ C("div", {
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__ */ C(xe, { style: {
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__ */ w("div", {
811
+ }), /* @__PURE__ */ S("div", {
789
812
  style: {
790
813
  flex: 1,
791
814
  minWidth: 0
792
815
  },
793
- children: [/* @__PURE__ */ w("div", {
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__ */ C(Ie, {
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: F ? T("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : T("bigconsole.widget.properties.header.properties", "Properties")
830
+ children: N ? C("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : C("bigconsole.widget.properties.header.properties", "Properties")
808
831
  }),
809
- E === "saving" && /* @__PURE__ */ C(Le, { style: {
832
+ w === "saving" && /* @__PURE__ */ x(ze, { style: {
810
833
  height: "var(--size-icon-sm)",
811
834
  width: "var(--size-icon-sm)"
812
835
  } }),
813
- E === "saved" && /* @__PURE__ */ C(h, { style: {
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
- E === "error" && /* @__PURE__ */ C(Te, { style: {
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
- }), on && /* @__PURE__ */ C(Pe, {
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: on.name
854
+ children: cn.name
832
855
  })]
833
856
  })]
834
857
  })
835
858
  }),
836
- F ? /* @__PURE__ */ w(Re, {
837
- value: Qe,
838
- onValueChange: (e) => $e(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__ */ w(ze, {
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__ */ C(x, {
885
+ /* @__PURE__ */ x(y, {
863
886
  value: "general",
864
- style: Je,
865
- children: T("bigconsole.widget.properties.tab.general", "General")
887
+ style: Ze,
888
+ children: C("bigconsole.widget.properties.tab.general", "General")
866
889
  }),
867
- /* @__PURE__ */ C(x, {
890
+ /* @__PURE__ */ x(y, {
868
891
  value: "data",
869
- style: Je,
870
- children: T("bigconsole.widget.properties.tab.data", "Data")
892
+ style: Ze,
893
+ children: C("bigconsole.widget.properties.tab.data", "Data")
871
894
  }),
872
- /* @__PURE__ */ C(x, {
895
+ /* @__PURE__ */ x(y, {
873
896
  value: "advanced",
874
- style: Je,
875
- children: T("bigconsole.widget.properties.tab.advanced", "Advanced")
897
+ style: Ze,
898
+ children: C("bigconsole.widget.properties.tab.advanced", "Advanced")
876
899
  }),
877
- /* @__PURE__ */ C(x, {
900
+ /* @__PURE__ */ x(y, {
878
901
  value: "appearance",
879
- style: Je,
880
- children: T("bigconsole.widget.properties.tab.style", "Style")
902
+ style: Ze,
903
+ children: C("bigconsole.widget.properties.tab.style", "Style")
881
904
  })
882
905
  ]
883
- }), /* @__PURE__ */ w("div", {
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__ */ C(b, {
914
+ /* @__PURE__ */ x(Ve, {
892
915
  value: "general",
893
916
  className: "mt-0",
894
- children: O && /* @__PURE__ */ w(r, { children: [
895
- /* @__PURE__ */ C(de, {
896
- title: O.title,
897
- description: O.description,
898
- refreshInterval: O.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__ */ C(n, {
904
- title: T("bigconsole.widget.properties.actions.heading", "Buttons"),
905
- description: T("bigconsole.widget.properties.actions.subheading", "Configure buttons on this widget"),
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: U.length > 0 ? /* @__PURE__ */ C("span", {
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: U.length
932
+ children: W.length
910
933
  }) : void 0,
911
- actions: !G && /* @__PURE__ */ w(g, {
934
+ actions: !K && /* @__PURE__ */ S(h, {
912
935
  size: "sm",
913
- onClick: qt,
914
- children: [/* @__PURE__ */ C(Ce, { className: "size-4" }), T("bigconsole.widget.properties.actions.add", "Add button")]
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: G ? /* @__PURE__ */ w("div", {
940
+ children: K ? /* @__PURE__ */ S("div", {
918
941
  role: "alert",
919
- children: [/* @__PURE__ */ C("p", { children: T("bigconsole.widget.properties.actions.readFailed", "Buttons could not be verified. Retry before saving.") }), /* @__PURE__ */ C(g, {
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: W,
922
- onClick: () => void Promise.resolve(Tt()).catch(() => {}),
923
- children: T("bigconsole.widget.properties.actions.retry", "Retry")
944
+ disabled: G,
945
+ onClick: () => void Promise.resolve(Et()).catch(() => {}),
946
+ children: C("bigconsole.widget.properties.actions.retry", "Retry")
924
947
  })]
925
- }) : W ? /* @__PURE__ */ C("div", {
948
+ }) : G ? /* @__PURE__ */ x("div", {
926
949
  className: "flex justify-center py-8",
927
- children: /* @__PURE__ */ C(Le, { className: "size-6" })
928
- }) : U.length === 0 ? /* @__PURE__ */ C("p", {
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: T("bigconsole.widget.properties.actions.empty", "No buttons yet — add one to let viewers take an action.")
931
- }) : /* @__PURE__ */ C("div", {
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: [...U].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ C(Ee, {
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__ */ w(De, {
958
+ children: /* @__PURE__ */ S(ke, {
936
959
  className: "p-3 flex items-center gap-2",
937
960
  children: [
938
- /* @__PURE__ */ w("div", {
961
+ /* @__PURE__ */ S("div", {
939
962
  className: "flex flex-col gap-0.5",
940
- children: [/* @__PURE__ */ C(g, {
963
+ children: [/* @__PURE__ */ x(h, {
941
964
  variant: "ghost",
942
965
  size: "icon-sm",
943
- onClick: () => Zt(t),
966
+ onClick: () => $t(t),
944
967
  disabled: t === 0,
945
968
  className: "h-5 w-5",
946
- children: /* @__PURE__ */ C(ye, { className: "size-3" })
947
- }), /* @__PURE__ */ C(g, {
969
+ children: /* @__PURE__ */ x(xe, { className: "size-3" })
970
+ }), /* @__PURE__ */ x(h, {
948
971
  variant: "ghost",
949
972
  size: "icon-sm",
950
- onClick: () => Qt(t),
951
- disabled: t === U.length - 1,
973
+ onClick: () => en(t),
974
+ disabled: t === W.length - 1,
952
975
  className: "h-5 w-5",
953
- children: /* @__PURE__ */ C(ve, { className: "size-3" })
976
+ children: /* @__PURE__ */ x(be, { className: "size-3" })
954
977
  })]
955
978
  }),
956
- /* @__PURE__ */ w("div", {
979
+ /* @__PURE__ */ S("div", {
957
980
  className: "flex-1 min-w-0",
958
- children: [/* @__PURE__ */ w("div", {
981
+ children: [/* @__PURE__ */ S("div", {
959
982
  className: "flex items-center gap-2",
960
- children: [/* @__PURE__ */ C("span", {
983
+ children: [/* @__PURE__ */ x("span", {
961
984
  "aria-hidden": "true",
962
- className: `size-2 shrink-0 rounded-full ${Ke[e.style] || qe}`
963
- }), /* @__PURE__ */ C("span", {
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__ */ C("p", {
990
+ }), /* @__PURE__ */ x("p", {
968
991
  className: "text-xs text-text-secondary truncate",
969
- children: Kt.has(e.name) ? T("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
970
- method: Kt.get(e.name)?.method ?? "",
971
- url: Kt.get(e.name)?.webhookUrl ?? ""
972
- }) : T("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
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__ */ w("div", {
998
+ /* @__PURE__ */ S("div", {
976
999
  className: "flex shrink-0 gap-1",
977
- children: [/* @__PURE__ */ C(g, {
1000
+ children: [/* @__PURE__ */ x(h, {
978
1001
  variant: "ghost",
979
1002
  size: "icon-sm",
980
1003
  "aria-label": `Edit ${e.label}`,
981
- onClick: () => Jt(e),
982
- children: /* @__PURE__ */ C(Se, { className: "size-4" })
983
- }), /* @__PURE__ */ C(g, {
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: () => Xt(e.id),
988
- children: /* @__PURE__ */ C(we, { className: "size-4" })
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
- rt && it && /* @__PURE__ */ C(pe, {
997
- position: it,
998
- columns: me.cols,
999
- onChange: at
1019
+ ot && st && /* @__PURE__ */ x(me, {
1020
+ position: st,
1021
+ columns: he.cols,
1022
+ onChange: ct
1000
1023
  })
1001
1024
  ] })
1002
1025
  }),
1003
- /* @__PURE__ */ C(b, {
1026
+ /* @__PURE__ */ x(Ve, {
1004
1027
  value: "data",
1005
1028
  className: "mt-0",
1006
- children: O && /* @__PURE__ */ w(r, { children: [(() => {
1029
+ children: E && /* @__PURE__ */ S(r, { children: [(() => {
1007
1030
  let e = l({
1008
- dataSinkId: O.dataSinkId,
1009
- parserId: O.parserId,
1031
+ dataSinkId: E.dataSinkId,
1032
+ parserId: E.parserId,
1010
1033
  config: {
1011
- ...O.config,
1034
+ ...E.config,
1012
1035
  binding: void 0
1013
1036
  }
1014
1037
  }), t = ne({
1015
1038
  binding: e,
1016
- loading: bt || _t,
1017
- error: wt,
1018
- preview: St,
1019
- previewComplete: Ct
1039
+ loading: St || bt,
1040
+ error: Tt,
1041
+ preview: Ct,
1042
+ previewComplete: wt
1020
1043
  });
1021
- return /* @__PURE__ */ C(fe, {
1022
- consoleId: F?.dashboardId || "",
1044
+ return /* @__PURE__ */ x(pe, {
1045
+ consoleId: N?.dashboardId || "",
1023
1046
  binding: e,
1024
- resolvedParser: z ?? void 0,
1025
- dataSinkKey: pt,
1026
- dataPath: typeof O.config.dataPath == "string" ? O.config.dataPath : void 0,
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: _t,
1051
+ resolving: bt,
1029
1052
  missingFields: t.missingFields,
1030
- preview: St,
1031
- error: wt,
1032
- onDataSinkChange: $t,
1033
- onParserChange: en,
1053
+ preview: Ct,
1054
+ error: Tt,
1055
+ onDataSinkChange: tn,
1056
+ onParserChange: nn,
1034
1057
  onDataPathChange: (e) => $({
1035
- ...O.config,
1058
+ ...E.config,
1036
1059
  dataPath: e
1037
1060
  })
1038
1061
  });
1039
- })(), /* @__PURE__ */ C(n, {
1062
+ })(), /* @__PURE__ */ x(n, {
1040
1063
  emphasis: "muted",
1041
- title: T("bigconsole.widget.properties.data.alternativeSources", "Alternative Data Sources"),
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__ */ w("div", {
1068
+ children: /* @__PURE__ */ S("div", {
1046
1069
  className: "flex flex-col gap-form-gap",
1047
1070
  children: [
1048
- /* @__PURE__ */ w("div", {
1071
+ /* @__PURE__ */ S("div", {
1049
1072
  className: "space-y-2",
1050
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ w(Oe, {
1051
- value: O.config?.dataSourceType || "",
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
- ...O.config,
1076
+ ...E.config,
1054
1077
  dataSourceType: e || void 0
1055
1078
  }),
1056
- children: [/* @__PURE__ */ C(Ae, {
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__ */ C(je, { placeholder: T("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
1062
- }), /* @__PURE__ */ C(ke, {
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: cn.map((e) => /* @__PURE__ */ C(y, {
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
- O.config?.dataSourceType === "REST_API" && /* @__PURE__ */ w("div", {
1105
+ E.config?.dataSourceType === "REST_API" && /* @__PURE__ */ S("div", {
1083
1106
  className: "space-y-3",
1084
1107
  children: [
1085
- /* @__PURE__ */ w("div", {
1108
+ /* @__PURE__ */ S("div", {
1086
1109
  className: "space-y-2",
1087
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.rest.endpointUrlLabel", "Endpoint URL *") }), /* @__PURE__ */ C(_, {
1088
- value: O.config?.endpointUrl || "",
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
- ...O.config,
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__ */ w("div", {
1119
+ /* @__PURE__ */ S("div", {
1097
1120
  className: "space-y-2",
1098
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ w(Oe, {
1099
- value: O.config?.httpMethod || "GET",
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
- ...O.config,
1124
+ ...E.config,
1102
1125
  httpMethod: e
1103
1126
  }),
1104
- children: [/* @__PURE__ */ C(Ae, {
1127
+ children: [/* @__PURE__ */ x(Me, {
1105
1128
  style: { height: "var(--size-controlHeight-md)" },
1106
- children: /* @__PURE__ */ C(je, {})
1107
- }), /* @__PURE__ */ w(ke, {
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__ */ C(y, {
1135
+ /* @__PURE__ */ x(v, {
1113
1136
  value: "GET",
1114
1137
  children: "GET"
1115
1138
  }),
1116
- /* @__PURE__ */ C(y, {
1139
+ /* @__PURE__ */ x(v, {
1117
1140
  value: "POST",
1118
1141
  children: "POST"
1119
1142
  }),
1120
- /* @__PURE__ */ C(y, {
1143
+ /* @__PURE__ */ x(v, {
1121
1144
  value: "PUT",
1122
1145
  children: "PUT"
1123
1146
  }),
1124
- /* @__PURE__ */ C(y, {
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__ */ w("div", {
1155
+ /* @__PURE__ */ S("div", {
1133
1156
  className: "space-y-2",
1134
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.rest.headersLabel", "Headers (JSON)") }), /* @__PURE__ */ C(S, {
1135
- value: O.config?.headers || "",
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
- ...O.config,
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__ */ w("div", {
1168
+ /* @__PURE__ */ S("div", {
1146
1169
  className: "space-y-2",
1147
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ w(Oe, {
1148
- value: O.config?.authType || "none",
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
- ...O.config,
1173
+ ...E.config,
1151
1174
  authType: e
1152
1175
  }),
1153
- children: [/* @__PURE__ */ C(Ae, {
1176
+ children: [/* @__PURE__ */ x(Me, {
1154
1177
  style: { height: "var(--size-controlHeight-md)" },
1155
- children: /* @__PURE__ */ C(je, {})
1156
- }), /* @__PURE__ */ w(ke, {
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__ */ C(y, {
1184
+ /* @__PURE__ */ x(v, {
1162
1185
  value: "none",
1163
- children: T("bigconsole.widget.properties.rest.authNone", "None")
1186
+ children: C("bigconsole.widget.properties.rest.authNone", "None")
1164
1187
  }),
1165
- /* @__PURE__ */ C(y, {
1188
+ /* @__PURE__ */ x(v, {
1166
1189
  value: "api_key",
1167
- children: T("bigconsole.widget.properties.rest.authApiKey", "API Key")
1190
+ children: C("bigconsole.widget.properties.rest.authApiKey", "API Key")
1168
1191
  }),
1169
- /* @__PURE__ */ C(y, {
1192
+ /* @__PURE__ */ x(v, {
1170
1193
  value: "bearer",
1171
- children: T("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
1194
+ children: C("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
1172
1195
  }),
1173
- /* @__PURE__ */ C(y, {
1196
+ /* @__PURE__ */ x(v, {
1174
1197
  value: "basic",
1175
- children: T("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
1198
+ children: C("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
1176
1199
  })
1177
1200
  ]
1178
1201
  })]
1179
1202
  })]
1180
1203
  }),
1181
- !!(O.config?.authType && O.config.authType !== "none") && /* @__PURE__ */ w("div", {
1204
+ !!(E.config?.authType && E.config.authType !== "none") && /* @__PURE__ */ S("div", {
1182
1205
  className: "space-y-2",
1183
- children: [/* @__PURE__ */ C(v, { children: String(O.config.authType) === "basic" ? T("bigconsole.widget.properties.rest.credentialsLabel", "Credentials (user:pass)") : T("bigconsole.widget.properties.rest.tokenKeyLabel", "Token/Key") }), /* @__PURE__ */ C(_, {
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: O.config?.authValue || "",
1208
+ value: E.config?.authValue || "",
1186
1209
  onChange: (e) => $({
1187
- ...O.config,
1210
+ ...E.config,
1188
1211
  authValue: e.target.value || void 0
1189
1212
  }),
1190
- placeholder: O.config.authType === "basic" ? T("bigconsole.widget.properties.rest.credentialsPlaceholder", "username:password") : T("bigconsole.widget.properties.rest.tokenKeyPlaceholder", "Enter token or API key")
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
- (O.config?.httpMethod === "POST" || O.config?.httpMethod === "PUT") && /* @__PURE__ */ w("div", {
1216
+ (E.config?.httpMethod === "POST" || E.config?.httpMethod === "PUT") && /* @__PURE__ */ S("div", {
1194
1217
  className: "space-y-2",
1195
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.rest.requestBodyLabel", "Request Body (JSON)") }), /* @__PURE__ */ C(S, {
1196
- value: O.config?.requestBody || "",
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
- ...O.config,
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__ */ w("div", {
1229
+ /* @__PURE__ */ S("div", {
1207
1230
  className: "space-y-2",
1208
1231
  children: [
1209
- /* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
1210
- /* @__PURE__ */ C(_, {
1211
- value: O.config?.dataPath || "",
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
- ...O.config,
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__ */ C("p", {
1241
+ /* @__PURE__ */ x("p", {
1219
1242
  className: "text-xs text-text-secondary",
1220
- children: T("bigconsole.widget.properties.dataPath.restHelp", "JSONPath or dot notation to extract data from response")
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
- O.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ w("div", {
1249
+ E.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ S("div", {
1227
1250
  className: "space-y-3",
1228
1251
  children: [
1229
- /* @__PURE__ */ w("div", {
1252
+ /* @__PURE__ */ S("div", {
1230
1253
  className: "space-y-2",
1231
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.graphql.endpointLabel", "GraphQL Endpoint *") }), /* @__PURE__ */ C(_, {
1232
- value: O.config?.graphqlEndpoint || "",
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
- ...O.config,
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__ */ w("div", {
1263
+ /* @__PURE__ */ S("div", {
1241
1264
  className: "space-y-2",
1242
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.graphql.queryLabel", "Query *") }), /* @__PURE__ */ C(S, {
1243
- value: O.config?.graphqlQuery || "",
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
- ...O.config,
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__ */ w("div", {
1276
+ /* @__PURE__ */ S("div", {
1254
1277
  className: "space-y-2",
1255
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.graphql.variablesLabel", "Variables (JSON, optional)") }), /* @__PURE__ */ C(S, {
1256
- value: O.config?.graphqlVariables || "",
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
- ...O.config,
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__ */ w("div", {
1289
+ /* @__PURE__ */ S("div", {
1267
1290
  className: "space-y-2",
1268
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.graphql.headersLabel", "Headers (JSON, optional)") }), /* @__PURE__ */ C(S, {
1269
- value: O.config?.headers || "",
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
- ...O.config,
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__ */ w("div", {
1302
+ /* @__PURE__ */ S("div", {
1280
1303
  className: "space-y-2",
1281
1304
  children: [
1282
- /* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
1283
- /* @__PURE__ */ C(_, {
1284
- value: O.config?.dataPath || "",
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
- ...O.config,
1309
+ ...E.config,
1287
1310
  dataPath: e.target.value || void 0
1288
1311
  }),
1289
1312
  placeholder: ".data.items"
1290
1313
  }),
1291
- /* @__PURE__ */ C("p", {
1314
+ /* @__PURE__ */ x("p", {
1292
1315
  className: "text-xs text-text-secondary",
1293
- children: T("bigconsole.widget.properties.dataPath.graphqlHelp", "Path to extract data from GraphQL response")
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
- O.config?.dataSourceType === "MOCK" && /* @__PURE__ */ w("div", {
1322
+ E.config?.dataSourceType === "MOCK" && /* @__PURE__ */ S("div", {
1300
1323
  className: "space-y-2",
1301
- children: [/* @__PURE__ */ C(v, { children: T("bigconsole.widget.properties.mock.sampleDataLabel", "Sample Data (JSON)") }), /* @__PURE__ */ C(S, {
1302
- value: O.config?.mockData || "",
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
- ...O.config,
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__ */ C(b, {
1339
+ /* @__PURE__ */ x(Ve, {
1317
1340
  value: "advanced",
1318
1341
  className: "mt-0",
1319
- children: /* @__PURE__ */ w(r, { children: [
1320
- O && /* @__PURE__ */ C(le, {
1321
- renderer: O.renderer,
1322
- rendererOptions: sn,
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: O.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ C(Xe, {
1349
+ templateEditor: E.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ x($e, {
1327
1350
  widget: {
1328
- ...F,
1329
- template: O.template,
1330
- renderer: O.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__ */ C(n, {
1336
- title: T("bigconsole.widget.properties.section.drilldown", "Drilldown"),
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__ */ C(ce, {
1341
- widget: F,
1342
- onChange: an
1363
+ children: /* @__PURE__ */ x(le, {
1364
+ widget: N,
1365
+ onChange: sn
1343
1366
  })
1344
1367
  }),
1345
- /* @__PURE__ */ C(n, {
1346
- title: T("bigconsole.widget.properties.section.webhooks", "Webhooks"),
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__ */ C(oe, {
1351
- dashboardId: F.dashboardId,
1352
- widgetId: F.id
1373
+ children: /* @__PURE__ */ x(se, {
1374
+ dashboardId: N.dashboardId,
1375
+ widgetId: N.id
1353
1376
  })
1354
1377
  }),
1355
- /* @__PURE__ */ C(n, {
1378
+ /* @__PURE__ */ x(n, {
1356
1379
  emphasis: "muted",
1357
- title: T("bigconsole.widget.properties.section.events", "Events"),
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__ */ C(se, {
1362
- dashboardId: F.dashboardId,
1363
- widgetId: F.id,
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__ */ C(b, {
1392
+ /* @__PURE__ */ x(Ve, {
1370
1393
  value: "appearance",
1371
1394
  className: "mt-0",
1372
- children: O && /* @__PURE__ */ C(ue, {
1373
- widgetType: F.type,
1374
- config: O.config || {},
1375
- onChange: rn
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__ */ C("div", {
1403
+ }) : /* @__PURE__ */ x("div", {
1381
1404
  className: "flex min-h-0 flex-1 items-center justify-center p-card-padding",
1382
- children: /* @__PURE__ */ C(n, {
1405
+ children: /* @__PURE__ */ x(n, {
1383
1406
  tone: "info",
1384
- title: T("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
1407
+ title: C("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
1385
1408
  headingLevel: 3,
1386
- icon: /* @__PURE__ */ C(xe, { className: "h-icon-md w-icon-md" }),
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__ */ C("p", {
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
- F && /* @__PURE__ */ w("div", {
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
- A && /* @__PURE__ */ C(n, {
1426
+ O && /* @__PURE__ */ x(n, {
1404
1427
  tone: "warning",
1405
1428
  padding: "compact",
1406
- title: T("bigconsole.widget.properties.footer.unsavedChanges", "You have unsaved changes"),
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
- E === "saved" && !A && /* @__PURE__ */ C(n, {
1434
+ w === "saved" && !O && /* @__PURE__ */ x(n, {
1412
1435
  tone: "success",
1413
1436
  padding: "compact",
1414
- title: T("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
1437
+ title: C("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
1415
1438
  headingLevel: 3,
1416
- icon: /* @__PURE__ */ C(h, { className: "h-icon-sm w-icon-sm" }),
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
- E === "error" && /* @__PURE__ */ C(n, {
1443
+ w === "error" && /* @__PURE__ */ x(n, {
1421
1444
  tone: "danger",
1422
1445
  padding: "compact",
1423
- title: T("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
1446
+ title: C("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
1424
1447
  headingLevel: 3,
1425
- icon: /* @__PURE__ */ C(Te, { className: "h-icon-sm w-icon-sm" }),
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__ */ w("div", {
1452
+ /* @__PURE__ */ S("div", {
1430
1453
  className: "flex flex-wrap gap-control-gap",
1431
- children: [/* @__PURE__ */ C(g, {
1432
- onClick: tn,
1433
- disabled: E === "saving" || !A,
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: A ? "var(--color-action-primary-bg)" : void 0,
1438
- opacity: A ? 1 : .5
1460
+ backgroundColor: O ? "var(--color-action-primary-bg)" : void 0,
1461
+ opacity: O ? 1 : .5
1439
1462
  },
1440
- children: E === "saving" ? /* @__PURE__ */ w("span", {
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__ */ C(Le, { style: {
1469
+ children: [/* @__PURE__ */ x(ze, { style: {
1447
1470
  width: "var(--size-icon-sm)",
1448
1471
  height: "var(--size-icon-sm)"
1449
- } }), T("bigconsole.widget.properties.footer.saving", "Saving...")]
1450
- }) : /* @__PURE__ */ w("span", {
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__ */ C(h, { style: {
1479
+ children: [/* @__PURE__ */ x(ye, { style: {
1457
1480
  width: "var(--size-icon-sm)",
1458
1481
  height: "var(--size-icon-sm)"
1459
- } }), T("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
1482
+ } }), C("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
1460
1483
  })
1461
- }), /* @__PURE__ */ w(g, {
1484
+ }), /* @__PURE__ */ S(h, {
1462
1485
  variant: "outline",
1463
- onClick: nn,
1464
- disabled: E === "saving" || !A,
1486
+ onClick: an,
1487
+ disabled: w === "saving" || !O,
1465
1488
  style: {
1466
1489
  height: "var(--size-controlHeight-md)",
1467
- opacity: A ? 1 : .5
1490
+ opacity: O ? 1 : .5
1468
1491
  },
1469
- children: [/* @__PURE__ */ C(Te, { style: {
1492
+ children: [/* @__PURE__ */ x(De, { style: {
1470
1493
  width: "var(--size-icon-sm)",
1471
1494
  height: "var(--size-icon-sm)"
1472
- } }), T("bigconsole.widget.properties.footer.discard", "Discard")]
1495
+ } }), C("bigconsole.widget.properties.footer.discard", "Discard")]
1473
1496
  })]
1474
1497
  })
1475
1498
  ]
1476
1499
  }),
1477
- /* @__PURE__ */ C(ae, {
1478
- isOpen: Lt,
1479
- action: zt,
1480
- initialWebhook: Gt,
1481
- isLoading: Bt,
1482
- saveError: Ut,
1500
+ /* @__PURE__ */ x(oe, {
1501
+ isOpen: zt,
1502
+ action: Vt,
1503
+ initialWebhook: qt,
1504
+ isLoading: Ht,
1505
+ saveError: Gt,
1483
1506
  onClose: () => {
1484
- Rt(!1), Y(void 0), X(void 0), Z(null);
1507
+ Bt(!1), Y(void 0), X(void 0), Z(null);
1485
1508
  },
1486
- onSave: Yt
1509
+ onSave: Zt
1487
1510
  })
1488
1511
  ]
1489
1512
  })
1490
1513
  });
1491
1514
  });
1492
1515
  //#endregion
1493
- export { T as PropertiesPanel, T as default };
1516
+ export { C as PropertiesPanel, C as default };