@burdenoff/microfe-bigconsole 2026.1124.4 → 2026.1124.6

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