@burdenoff/microfe-bigconsole 2026.1113.2 → 2026.1115.2

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