@burdenoff/microfe-bigconsole 2026.613.6 → 2026.615.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.
@@ -3,35 +3,35 @@ import { useDashboardStore as r, useGlobalFilterValues as i } from "../../store/
3
3
  import "../../store/index.js";
4
4
  import a from "../../hooks/useWidgetData.js";
5
5
  import { getWidgetDefinition as o } from "./WidgetRegistry.js";
6
- import { formatTimeUntilRefresh as ee, useWidgetAutoRefresh as te } from "../../hooks/useAutoRefresh.js";
7
- import ne from "../../hooks/useWidgetExport.js";
8
- import re from "../../hooks/useDrilldown.js";
6
+ import { formatTimeUntilRefresh as s, useWidgetAutoRefresh as c } from "../../hooks/useAutoRefresh.js";
7
+ import ee from "../../hooks/useWidgetExport.js";
8
+ import te from "../../hooks/useDrilldown.js";
9
9
  import "../../hooks/index.js";
10
- import ie from "./WidgetHeader.js";
11
- import s from "./states/LoadingState.js";
12
- import ae from "./states/ErrorState.js";
13
- import c from "./states/EmptyState.js";
14
- import l from "./WidgetErrorBoundary.js";
15
- import { hasCustomIframeConfig as u, hasRenderableCustomConfig as oe } from "./custom/config.js";
16
- import se from "../../renderers/factory/WidgetRendererFactory.js";
17
- import d from "./widget-actions/WidgetActions.js";
10
+ import l from "./WidgetHeader.js";
11
+ import u from "./states/LoadingState.js";
12
+ import ne from "./states/ErrorState.js";
13
+ import d from "./states/EmptyState.js";
14
+ import re from "./WidgetErrorBoundary.js";
15
+ import { hasCustomIframeConfig as ie, hasRenderableCustomConfig as ae } from "./custom/config.js";
16
+ import oe from "../../renderers/factory/WidgetRendererFactory.js";
17
+ import se from "./widget-actions/WidgetActions.js";
18
18
  import "./widget-actions/index.js";
19
- import { Suspense as ce, lazy as f, memo as p, useCallback as m, useEffect as le, useMemo as h, useRef as g } from "react";
20
- import { jsx as _, jsxs as ue } from "react/jsx-runtime";
19
+ import { Suspense as ce, lazy as f, memo as p, useCallback as m, useEffect as h, useMemo as g, useRef as _ } from "react";
20
+ import { jsx as v, jsxs as le } from "react/jsx-runtime";
21
21
  //#region src/bigconsole/components/widgets/WidgetWrapper.tsx
22
- var de = f(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), v = f(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), y = f(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), fe = f(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), pe = f(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), me = f(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), he = f(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), ge = f(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), _e = f(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), ve = f(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), ye = f(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), be = f(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), xe = f(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), Se = f(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), Ce = f(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget }))), we = f(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget })));
23
- function b(e, t) {
22
+ var ue = f(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), de = f(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), fe = f(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), pe = f(() => import("./pivot-table/index.js").then((e) => ({ default: e.PivotTableWidget }))), me = f(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), he = f(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), ge = f(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), _e = f(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), ve = f(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), ye = f(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), be = f(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), xe = f(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), Se = f(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), Ce = f(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), we = f(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), Te = f(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget }))), Ee = f(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget })));
23
+ function y(e, t) {
24
24
  if (e.widget.id !== t.widget.id || e.widget.updatedAt !== t.widget.updatedAt || e.isLoading !== t.isLoading || e.error !== t.error || (e.actions?.length ?? 0) !== (t.actions?.length ?? 0)) return !1;
25
25
  if (e.actions && t.actions) {
26
26
  for (let n = 0; n < e.actions.length; n++) if (e.actions[n]?.id !== t.actions[n]?.id) return !1;
27
27
  }
28
28
  return !(e.data !== t.data || JSON.stringify(e.filterValues) !== JSON.stringify(t.filterValues));
29
29
  }
30
- var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoading: Te, error: Ee, onRefresh: S, onDrilldown: C, actions: w, onAction: T, filterValues: E }) {
31
- let D = r((e) => e.viewMode === "edit"), O = t((e) => e.selectWidget), k = e(f.id), A = n(f.id), j = i(), De = !!f.dataSinkId || !!f.datasetId || !!f.parserId, { data: M, loading: Oe } = a(f.id, {
32
- skip: !De,
30
+ var b = p(function({ widget: f, children: p, data: y, className: b = "", isLoading: De, error: Oe, onRefresh: x, onDrilldown: S, actions: C, onAction: w, filterValues: T }) {
31
+ let E = r((e) => e.viewMode === "edit"), D = t((e) => e.selectWidget), O = e(f.id), k = n(f.id), A = i(), ke = !!f.dataSinkId || !!f.datasetId || !!f.parserId, { data: j, loading: Ae } = a(f.id, {
32
+ skip: !ke,
33
33
  pollInterval: (f.refreshInterval ?? 0) * 1e3 || 0
34
- }), N = h(() => {
34
+ }), M = g(() => {
35
35
  if (typeof window > "u") return {};
36
36
  let e = new URLSearchParams(window.location.search), t = {};
37
37
  return e.forEach((e, n) => {
@@ -40,26 +40,26 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
40
40
  r.startsWith("__") || (t[r] = e);
41
41
  }
42
42
  }), t;
43
- }, []), P = h(() => {
43
+ }, []), N = g(() => {
44
44
  let e = {};
45
- return N && Object.keys(N).length > 0 && Object.assign(e, N), j && Object.keys(j).length > 0 && Object.assign(e, j), E && Object.keys(E).length > 0 && Object.assign(e, E), e;
45
+ return M && Object.keys(M).length > 0 && Object.assign(e, M), A && Object.keys(A).length > 0 && Object.assign(e, A), T && Object.keys(T).length > 0 && Object.assign(e, T), e;
46
46
  }, [
47
- N,
48
- j,
49
- E
50
- ]), F = Object.keys(P).length > 0, I = Te ?? (Oe && !M) ?? A.isLoading, L = Ee ?? A.errorMessage, ke = o(f.type), R = g(S);
51
- le(() => {
52
- R.current = S;
53
- }, [S]);
54
- let Ae = m(async () => {
55
- R.current && await R.current();
56
- }, []), { timeUntilRefresh: je, isPaused: Me } = te({
47
+ M,
48
+ A,
49
+ T
50
+ ]), P = Object.keys(N).length > 0, F = De ?? (Ae && !j) ?? k.isLoading, I = Oe ?? k.errorMessage, je = o(f.type), L = _(x);
51
+ h(() => {
52
+ L.current = x;
53
+ }, [x]);
54
+ let Me = m(async () => {
55
+ L.current && await L.current();
56
+ }, []), { timeUntilRefresh: Ne, isPaused: Pe } = c({
57
57
  widgetId: f.id,
58
58
  refreshInterval: f.refreshInterval,
59
- onRefresh: Ae,
60
- enabled: !D && !!f.refreshInterval
61
- }), z = g(null), B = h(() => {
62
- if (b && Array.isArray(b)) return b;
59
+ onRefresh: Me,
60
+ enabled: !E && !!f.refreshInterval
61
+ }), R = _(null), z = g(() => {
62
+ if (y && Array.isArray(y)) return y;
63
63
  let e = f.data;
64
64
  if (e?.processed && Array.isArray(e.processed)) return e.processed;
65
65
  if (e?.raw) {
@@ -67,24 +67,24 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
67
67
  if (Array.isArray(t)) return t;
68
68
  }
69
69
  return null;
70
- }, [b, f]), { exportCSV: Ne, exportPNG: Pe } = ne(f, {
71
- data: B,
72
- containerRef: z
73
- }), V = m((e) => {
70
+ }, [y, f]), { exportCSV: Fe, exportPNG: Ie } = ee(f, {
71
+ data: z,
72
+ containerRef: R
73
+ }), B = m((e) => {
74
74
  if (e == null) return !1;
75
75
  if (Array.isArray(e)) return e.length > 0;
76
76
  if (typeof e == "object") {
77
77
  let t = e, n = Object.keys(t);
78
78
  return n.length === 0 ? !1 : n.some((e) => {
79
79
  let n = t[e];
80
- return n == null || n === "" ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "object" ? V(n) : !0;
80
+ return n == null || n === "" ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "object" ? B(n) : !0;
81
81
  });
82
82
  }
83
83
  return !0;
84
- }, []), H = m((e) => {
85
- if (!F || !e) return e;
84
+ }, []), V = m((e) => {
85
+ if (!P || !e) return e;
86
86
  let t = {}, n = {};
87
- Object.entries(P || {}).forEach(([e, r]) => {
87
+ Object.entries(N || {}).forEach(([e, r]) => {
88
88
  if (e.startsWith("ctx_")) {
89
89
  let n = e.slice(4);
90
90
  t[n] = r;
@@ -202,51 +202,51 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
202
202
  }
203
203
  return e;
204
204
  }, [
205
- F,
206
205
  P,
206
+ N,
207
207
  f.id
208
- ]), U = h(() => {
208
+ ]), H = g(() => {
209
209
  let e = null;
210
- if (b && V(b)) e = b;
211
- else if (M) {
212
- let t = M;
213
- if (t?.processed && V(t.processed)) e = t.processed;
210
+ if (y && B(y)) e = y;
211
+ else if (j) {
212
+ let t = j;
213
+ if (t?.processed && B(t.processed)) e = t.processed;
214
214
  else if (t?.raw) try {
215
215
  let n = typeof t.raw == "string" ? JSON.parse(t.raw) : t.raw;
216
- V(n) && (e = n);
216
+ B(n) && (e = n);
217
217
  } catch {}
218
218
  } else {
219
219
  let t = f.data;
220
- if (t?.processed && V(t.processed)) e = t.processed;
220
+ if (t?.processed && B(t.processed)) e = t.processed;
221
221
  else if (t?.raw) try {
222
222
  let n = typeof t.raw == "string" ? JSON.parse(t.raw) : t.raw;
223
- V(n) && (e = n);
223
+ B(n) && (e = n);
224
224
  } catch {}
225
225
  }
226
226
  if (!e) {
227
227
  let t = f.config?.mockData;
228
228
  if (t) try {
229
229
  let n = typeof t == "string" ? JSON.parse(t) : t;
230
- V(n) && (e = n);
230
+ B(n) && (e = n);
231
231
  } catch {}
232
232
  }
233
- return F && e ? H(e) : e;
233
+ return P && e ? V(e) : e;
234
234
  }, [
235
- b,
235
+ y,
236
236
  f,
237
- M,
238
- F,
239
- H,
237
+ j,
240
238
  P,
241
- V
242
- ]), W = h(() => U ?? null, [U]), { executeDrilldown: G, canDrilldown: K } = re({ onDrilldown: (e, t) => {
243
- C?.(e);
244
- } }), q = h(() => K(f), [f, K]), J = m((e) => {
239
+ V,
240
+ N,
241
+ B
242
+ ]), U = g(() => H ?? null, [H]), { executeDrilldown: W, canDrilldown: G } = te({ onDrilldown: (e, t) => {
243
+ S?.(e);
244
+ } }), K = g(() => G(f), [f, G]), q = m((e) => {
245
245
  if (!f.drilldown?.enabled) return;
246
246
  let t = {
247
247
  selectedData: e || {},
248
- globalFilters: j || {},
249
- widgetData: W || {},
248
+ globalFilters: A || {},
249
+ widgetData: U || {},
250
250
  metadata: {
251
251
  widgetId: f.id,
252
252
  widgetType: f.type,
@@ -254,64 +254,64 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
254
254
  },
255
255
  sourceDashboardId: f.dashboardId
256
256
  };
257
- G(f.drilldown, t);
257
+ W(f.drilldown, t);
258
258
  }, [
259
259
  f,
260
- W,
261
- j,
262
- G
263
- ]), Y = g(null), Fe = m((e) => {
264
- Y.current = {
260
+ U,
261
+ A,
262
+ W
263
+ ]), J = _(null), Le = m((e) => {
264
+ J.current = {
265
265
  x: e.clientX,
266
266
  y: e.clientY
267
267
  };
268
- }, []), Ie = m((e) => {
269
- if (e.stopPropagation(), Y.current) {
270
- let t = Math.abs(e.clientX - Y.current.x), n = Math.abs(e.clientY - Y.current.y);
268
+ }, []), Re = m((e) => {
269
+ if (e.stopPropagation(), J.current) {
270
+ let t = Math.abs(e.clientX - J.current.x), n = Math.abs(e.clientY - J.current.y);
271
271
  if (t > 5 || n > 5) {
272
- Y.current = null;
272
+ J.current = null;
273
273
  return;
274
274
  }
275
275
  }
276
- Y.current = null, D && O(f.id);
276
+ J.current = null, E && D(f.id);
277
277
  }, [
278
+ E,
278
279
  D,
279
- O,
280
280
  f.id
281
- ]), Le = m((e) => {
282
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), D && O(f.id));
281
+ ]), ze = m((e) => {
282
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), E && D(f.id));
283
283
  }, [
284
+ E,
284
285
  D,
285
- O,
286
286
  f.id
287
- ]), Re = h(() => f.type === "custom" && oe(f.config), [f.type, f.config]), ze = h(() => f.type === "custom" && u(f.config), [f.type, f.config]), X = q && !ze, Be = !I && !L && !W && !Re, Z = h(() => f.renderer, [f]), Q = h(() => Z && Z !== "BIGCONSOLE", [Z]), Ve = h(() => ({
287
+ ]), Be = g(() => f.type === "custom" && ae(f.config), [f.type, f.config]), Ve = g(() => f.type === "custom" && ie(f.config), [f.type, f.config]), Y = K && !Ve, He = !F && !I && !U && !Be, X = g(() => f.renderer, [f]), Z = g(() => X && X !== "BIGCONSOLE", [X]), Ue = g(() => ({
288
288
  widgetId: f.id,
289
- data: W || {}
290
- }), [f.id, W]), $ = m((e, t) => {
291
- if (!T) return;
292
- let n = w?.find((t) => t.name === e.name);
293
- T(n || e, t);
294
- }, [T, w]), He = m(() => {
289
+ data: U || {}
290
+ }), [f.id, U]), Q = m((e, t) => {
291
+ if (!w) return;
292
+ let n = C?.find((t) => t.name === e.name);
293
+ w(n || e, t);
294
+ }, [w, C]), $ = m(() => {
295
295
  let e = {
296
296
  widget: f,
297
297
  data: (() => {
298
- if (!W) return W;
298
+ if (!U) return U;
299
299
  if (f.type === "table" || f.type === "pivot_table") {
300
- if (Array.isArray(W)) return W;
301
- if (W && typeof W == "object" && "rows" in W) return W.rows;
300
+ if (Array.isArray(U)) return U;
301
+ if (U && typeof U == "object" && "rows" in U) return U.rows;
302
302
  }
303
303
  if (f.type === "list") {
304
- if (Array.isArray(W)) return W;
305
- if (W && typeof W == "object" && "items" in W) return W.items;
304
+ if (Array.isArray(U)) return U;
305
+ if (U && typeof U == "object" && "items" in U) return U.items;
306
306
  }
307
307
  if (f.type === "funnel_chart") {
308
- if (Array.isArray(W)) return W;
309
- if (W && typeof W == "object" && "stages" in W) return W.stages;
308
+ if (Array.isArray(U)) return U;
309
+ if (U && typeof U == "object" && "stages" in U) return U.stages;
310
310
  }
311
311
  if (f.type === "chart") {
312
- if (Array.isArray(W)) return W;
313
- if (W && typeof W == "object" && "datasets" in W) {
314
- let e = W;
312
+ if (Array.isArray(U)) return U;
313
+ if (U && typeof U == "object" && "datasets" in U) {
314
+ let e = U;
315
315
  if (e.labels && e.datasets) return e.labels.map((t, n) => {
316
316
  let r = { name: t };
317
317
  return e.datasets?.forEach((e) => {
@@ -320,8 +320,8 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
320
320
  });
321
321
  }
322
322
  }
323
- if (f.type === "text" && W && typeof W == "object" && !("content" in W)) {
324
- let e = W, t = [];
323
+ if (f.type === "text" && U && typeof U == "object" && !("content" in U)) {
324
+ let e = U, t = [];
325
325
  for (let [n, r] of Object.entries(e)) if (r && typeof r == "object" && !Array.isArray(r)) {
326
326
  t.push(`### ${n}`);
327
327
  for (let [e, n] of Object.entries(r)) t.push(`- **${e}:** ${n}`);
@@ -338,8 +338,8 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
338
338
  }
339
339
  if (f.type === "custom") {
340
340
  let e = f.config?.valueField;
341
- if (e && W && typeof W == "object" && !Array.isArray(W)) {
342
- let t = W;
341
+ if (e && U && typeof U == "object" && !Array.isArray(U)) {
342
+ let t = U;
343
343
  if (e in t) return {
344
344
  value: t[e],
345
345
  label: f.title,
@@ -347,13 +347,13 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
347
347
  };
348
348
  }
349
349
  }
350
- return W;
350
+ return U;
351
351
  })(),
352
- onDrilldown: q ? J : void 0
352
+ onDrilldown: K ? q : void 0
353
353
  };
354
- if (Q) {
354
+ if (Z) {
355
355
  let e = {};
356
- if (U && typeof U == "object" && !Array.isArray(U) && Object.keys(U).length > 0 && (e = { ...U }), f.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
356
+ if (H && typeof H == "object" && !Array.isArray(H) && Object.keys(H).length > 0 && (e = { ...H }), f.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
357
357
  let t = f.config?.valueField;
358
358
  if (t && t in e) {
359
359
  let n = e[t], r = typeof n == "number" ? n.toLocaleString() : String(n);
@@ -366,140 +366,140 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
366
366
  };
367
367
  }
368
368
  }
369
- return /* @__PURE__ */ _(se, {
369
+ return /* @__PURE__ */ v(oe, {
370
370
  widget: f,
371
371
  data: e,
372
- isEditMode: D,
373
- isSelected: k,
374
- isLoading: I,
375
- error: L,
376
- onDrilldown: q ? J : void 0,
377
- onAction: $
372
+ isEditMode: E,
373
+ isSelected: O,
374
+ isLoading: F,
375
+ error: I,
376
+ onDrilldown: K ? q : void 0,
377
+ onAction: Q
378
378
  });
379
379
  }
380
380
  switch (f.type?.toLowerCase() || "") {
381
- case "metric_card": return /* @__PURE__ */ _(de, { ...e });
382
- case "kpi_card_comparison": return /* @__PURE__ */ _(ye, { ...e });
381
+ case "metric_card": return /* @__PURE__ */ v(ue, { ...e });
382
+ case "kpi_card_comparison": return /* @__PURE__ */ v(xe, { ...e });
383
383
  case "chart":
384
- case "funnel_chart": return /* @__PURE__ */ _(v, { ...e });
385
- case "table":
386
- case "pivot_table": return /* @__PURE__ */ _(y, { ...e });
387
- case "gauge": return /* @__PURE__ */ _(fe, { ...e });
388
- case "progress": return /* @__PURE__ */ _(pe, { ...e });
389
- case "list": return /* @__PURE__ */ _(me, { ...e });
390
- case "heatmap": return /* @__PURE__ */ _(he, { ...e });
391
- case "calendar": return /* @__PURE__ */ _(ge, { ...e });
392
- case "timeline": return /* @__PURE__ */ _(ve, { ...e });
393
- case "kanban": return /* @__PURE__ */ _(_e, { ...e });
394
- case "form": return /* @__PURE__ */ _(we, { ...e });
395
- case "text": return /* @__PURE__ */ _(be, { ...e });
396
- case "iframe": return /* @__PURE__ */ _(Se, { ...e });
397
- case "map": return /* @__PURE__ */ _(xe, { ...e });
398
- case "custom": return /* @__PURE__ */ _(Ce, { ...e });
399
- default: return p || /* @__PURE__ */ _(c, { widgetType: f.type });
384
+ case "funnel_chart": return /* @__PURE__ */ v(de, { ...e });
385
+ case "table": return /* @__PURE__ */ v(fe, { ...e });
386
+ case "pivot_table": return /* @__PURE__ */ v(pe, { ...e });
387
+ case "gauge": return /* @__PURE__ */ v(me, { ...e });
388
+ case "progress": return /* @__PURE__ */ v(he, { ...e });
389
+ case "list": return /* @__PURE__ */ v(ge, { ...e });
390
+ case "heatmap": return /* @__PURE__ */ v(_e, { ...e });
391
+ case "calendar": return /* @__PURE__ */ v(ve, { ...e });
392
+ case "timeline": return /* @__PURE__ */ v(be, { ...e });
393
+ case "kanban": return /* @__PURE__ */ v(ye, { ...e });
394
+ case "form": return /* @__PURE__ */ v(Ee, { ...e });
395
+ case "text": return /* @__PURE__ */ v(Se, { ...e });
396
+ case "iframe": return /* @__PURE__ */ v(we, { ...e });
397
+ case "map": return /* @__PURE__ */ v(Ce, { ...e });
398
+ case "custom": return /* @__PURE__ */ v(Te, { ...e });
399
+ default: return p || /* @__PURE__ */ v(d, { widgetType: f.type });
400
400
  }
401
401
  }, [
402
402
  f,
403
- W,
403
+ U,
404
404
  p,
405
+ K,
405
406
  q,
406
- J,
407
- Q,
408
- D,
409
- k,
407
+ Z,
408
+ E,
409
+ O,
410
+ F,
410
411
  I,
411
- L,
412
- $,
413
- U
412
+ Q,
413
+ H
414
414
  ]);
415
- return /* @__PURE__ */ ue("div", {
416
- ref: z,
415
+ return /* @__PURE__ */ le("div", {
416
+ ref: R,
417
417
  className: `
418
418
  group relative flex flex-col
419
419
  h-full w-full
420
420
  rounded-lg border
421
421
  bg-bg-surface
422
422
  transition-all duration-200
423
- ${k && D ? "border-action-primary-border ring-2 ring-action-primary-border/30" : "border-border-default hover:border-action-primary-bg"}
424
- ${D ? "cursor-pointer" : ""}
425
- ${x}
423
+ ${O && E ? "border-action-primary-border ring-2 ring-action-primary-border/30" : "border-border-default hover:border-action-primary-bg"}
424
+ ${E ? "cursor-pointer" : ""}
425
+ ${b}
426
426
  `,
427
- onMouseDown: Fe,
428
- onClick: Ie,
429
- onKeyDown: Le,
430
- tabIndex: D ? 0 : -1,
431
- role: D ? "button" : void 0,
432
- "aria-selected": k,
427
+ onMouseDown: Le,
428
+ onClick: Re,
429
+ onKeyDown: ze,
430
+ tabIndex: E ? 0 : -1,
431
+ role: E ? "button" : void 0,
432
+ "aria-selected": O,
433
433
  "aria-label": `Widget: ${f.title}`,
434
434
  "data-widget-id": f.id,
435
435
  "data-widget-type": f.type,
436
436
  children: [
437
- /* @__PURE__ */ _(ie, {
437
+ /* @__PURE__ */ v(l, {
438
438
  widget: f,
439
- definition: ke,
440
- isSelected: k,
441
- isEditMode: D,
442
- isLoading: I,
443
- timeUntilRefresh: f.refreshInterval && !Me ? ee(je) : void 0,
444
- hasDrilldown: q,
445
- onRefresh: S,
446
- onExportCSV: B ? Ne : void 0,
447
- onExportPNG: Pe,
448
- onDrilldown: q ? () => J() : void 0
439
+ definition: je,
440
+ isSelected: O,
441
+ isEditMode: E,
442
+ isLoading: F,
443
+ timeUntilRefresh: f.refreshInterval && !Pe ? s(Ne) : void 0,
444
+ hasDrilldown: K,
445
+ onRefresh: x,
446
+ onExportCSV: z ? Fe : void 0,
447
+ onExportPNG: Ie,
448
+ onDrilldown: K ? () => q() : void 0
449
449
  }),
450
- /* @__PURE__ */ _("div", {
450
+ /* @__PURE__ */ v("div", {
451
451
  className: `
452
452
  flex-1 overflow-hidden p-4 min-h-0
453
- ${X && !D ? "cursor-pointer" : ""}
453
+ ${Y && !E ? "cursor-pointer" : ""}
454
454
  `,
455
- title: X && !D ? "Click data to drill down" : void 0,
456
- children: /* @__PURE__ */ _("div", {
455
+ title: Y && !E ? "Click data to drill down" : void 0,
456
+ children: /* @__PURE__ */ v("div", {
457
457
  className: "h-full overflow-auto",
458
458
  children: (() => {
459
- if (I) return /* @__PURE__ */ _(s, {});
460
- if (L) return /* @__PURE__ */ _(ae, {
461
- error: L,
462
- onRetry: S
459
+ if (F) return /* @__PURE__ */ v(u, {});
460
+ if (I) return /* @__PURE__ */ v(ne, {
461
+ error: I,
462
+ onRetry: x
463
463
  });
464
- if (Be && !p) return /* @__PURE__ */ _(c, {
464
+ if (He && !p) return /* @__PURE__ */ v(d, {
465
465
  widgetType: f.type,
466
466
  hasDataSource: !!f.parserId || !!f.dataSinkId
467
467
  });
468
468
  let e = `${f.parserId ?? ""}|${f.dataSinkId ?? ""}|${f.updatedAt ?? ""}`;
469
- return /* @__PURE__ */ _(l, {
469
+ return /* @__PURE__ */ v(re, {
470
470
  widgetId: f.id,
471
471
  widgetType: f.type,
472
472
  widgetTitle: f.title,
473
473
  resetKey: e,
474
- children: p ?? /* @__PURE__ */ _(ce, {
475
- fallback: /* @__PURE__ */ _(s, {}),
476
- children: He()
474
+ children: p ?? /* @__PURE__ */ v(ce, {
475
+ fallback: /* @__PURE__ */ v(u, {}),
476
+ children: $()
477
477
  })
478
478
  });
479
479
  })()
480
480
  })
481
481
  }),
482
- w && w.length > 0 && !I && !L && /* @__PURE__ */ _("div", {
482
+ C && C.length > 0 && !F && !I && /* @__PURE__ */ v("div", {
483
483
  className: "px-4 py-3 border-t border-border-default bg-bg-muted",
484
484
  style: { flexShrink: 0 },
485
- children: /* @__PURE__ */ _(d, {
486
- actions: w,
487
- context: Ve,
488
- onAction: T,
489
- disabled: D,
485
+ children: /* @__PURE__ */ v(se, {
486
+ actions: C,
487
+ context: Ue,
488
+ onAction: w,
489
+ disabled: E,
490
490
  layout: "horizontal",
491
491
  size: "sm"
492
492
  })
493
493
  }),
494
- X && !D && /* @__PURE__ */ _("div", {
494
+ Y && !E && /* @__PURE__ */ v("div", {
495
495
  className: "\n absolute bottom-2 right-2\n opacity-0 group-hover:opacity-100\n transition-opacity duration-200\n ",
496
496
  title: "Click to drill down",
497
- children: /* @__PURE__ */ _("svg", {
497
+ children: /* @__PURE__ */ v("svg", {
498
498
  className: "w-4 h-4 text-text-secondary",
499
499
  fill: "none",
500
500
  stroke: "currentColor",
501
501
  viewBox: "0 0 24 24",
502
- children: /* @__PURE__ */ _("path", {
502
+ children: /* @__PURE__ */ v("path", {
503
503
  strokeLinecap: "round",
504
504
  strokeLinejoin: "round",
505
505
  strokeWidth: 2,
@@ -509,8 +509,8 @@ var x = p(function({ widget: f, children: p, data: b, className: x = "", isLoadi
509
509
  })
510
510
  ]
511
511
  });
512
- }, b);
512
+ }, y);
513
513
  //#endregion
514
- export { x as default };
514
+ export { b as default };
515
515
 
516
516
  //# sourceMappingURL=WidgetWrapper.js.map