@burdenoff/microfe-bigconsole 2026.729.2 → 2026.729.4

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