@burdenoff/microfe-bigconsole 2026.1008.12 → 2026.1008.13

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