@burdenoff/microfe-bigconsole 2026.803.3 → 2026.803.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.
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetRegistry.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +127 -130
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +32 -18
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/index.js +2 -2
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +25 -19
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/text-widget/index.js +3 -2
- package/dist/bigconsole/components/widgets/text-widget/textData.js +71 -0
- package/dist/bigconsole/components/widgets/text-widget/textData.js.map +1 -0
- package/package.json +1 -1
|
@@ -9,21 +9,22 @@ import ne from "../../hooks/useWidgetComments.js";
|
|
|
9
9
|
import re from "../../hooks/useWidgetExport.js";
|
|
10
10
|
import ie from "../../hooks/useDrilldown.js";
|
|
11
11
|
import "../../hooks/index.js";
|
|
12
|
-
import ae from "./
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import
|
|
12
|
+
import { resolveTextData as ae } from "./text-widget/textData.js";
|
|
13
|
+
import oe from "./WidgetHeader.js";
|
|
14
|
+
import se from "./states/LoadingState.js";
|
|
15
|
+
import ce from "./states/ErrorState.js";
|
|
16
|
+
import c from "./states/EmptyState.js";
|
|
17
|
+
import le from "./WidgetErrorBoundary.js";
|
|
18
|
+
import { hasCustomIframeConfig as ue, hasRenderableCustomConfig as de } from "./custom/config.js";
|
|
19
|
+
import { getBindingForWidget as fe } from "../../utils/widgetBinding.js";
|
|
20
|
+
import pe from "../../renderers/factory/WidgetRendererFactory.js";
|
|
21
|
+
import me from "./widget-actions/WidgetActions.js";
|
|
21
22
|
import "./widget-actions/index.js";
|
|
22
|
-
import { Suspense as
|
|
23
|
-
import { useApolloClient as
|
|
24
|
-
import { jsx as g, jsxs as
|
|
23
|
+
import { Suspense as l, lazy as u, memo as d, useCallback as f, useEffect as he, useMemo as p, useRef as m, useState as h } from "react";
|
|
24
|
+
import { useApolloClient as ge } from "@apollo/client/react";
|
|
25
|
+
import { jsx as g, jsxs as _e } from "react/jsx-runtime";
|
|
25
26
|
//#region src/bigconsole/components/widgets/WidgetWrapper.tsx
|
|
26
|
-
var
|
|
27
|
+
var ve = u(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), ye = u(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), be = u(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), xe = u(() => import("./pivot-table/index.js").then((e) => ({ default: e.PivotTableWidget }))), Se = u(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), Ce = u(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), we = u(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), Te = u(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), Ee = u(() => import("./retention/index.js").then((e) => ({ default: e.RetentionWidget }))), De = u(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), Oe = u(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), ke = u(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), Ae = u(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), je = u(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), Me = u(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), Ne = u(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), Pe = u(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget }))), Fe = u(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget }))), Ie = u(() => import("./comments/WidgetComments.js").then((e) => ({ default: e.WidgetComments })));
|
|
27
28
|
function _(e, t) {
|
|
28
29
|
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;
|
|
29
30
|
if (e.actions && t.actions) {
|
|
@@ -31,8 +32,8 @@ function _(e, t) {
|
|
|
31
32
|
}
|
|
32
33
|
return !(e.data !== t.data || JSON.stringify(e.filterValues) !== JSON.stringify(t.filterValues));
|
|
33
34
|
}
|
|
34
|
-
var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoading:
|
|
35
|
-
let C = r((e) => e.viewMode === "edit"), w = t((e) => e.selectWidget), T = e(u.id), E = n(u.id), D = i(), O =
|
|
35
|
+
var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoading: Le, error: Re, onRefresh: y, onDrilldown: ze, actions: b, onAction: x, filterValues: S }) {
|
|
36
|
+
let C = r((e) => e.viewMode === "edit"), w = t((e) => e.selectWidget), T = e(u.id), E = n(u.id), D = i(), O = ge(), k = u.dashboardId, A = p(() => {
|
|
36
37
|
if (!k) return {};
|
|
37
38
|
try {
|
|
38
39
|
let e = O.readQuery({
|
|
@@ -47,7 +48,7 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
47
48
|
} catch {
|
|
48
49
|
return {};
|
|
49
50
|
}
|
|
50
|
-
}, [O, k]), j = p(() =>
|
|
51
|
+
}, [O, k]), j = p(() => fe(u), [u]), M = j.source.kind !== "DATASINK" || !!j.source.ref || !!j.parserId || !!u.datasetId, { data: N, loading: Be } = o(u.id, {
|
|
51
52
|
skip: !M,
|
|
52
53
|
pollInterval: (u.refreshInterval ?? 0) * 1e3 || 0
|
|
53
54
|
}), P = p(() => {
|
|
@@ -66,23 +67,23 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
66
67
|
P,
|
|
67
68
|
D,
|
|
68
69
|
S
|
|
69
|
-
]), I = Object.keys(F).length > 0, L =
|
|
70
|
-
|
|
70
|
+
]), I = Object.keys(F).length > 0, L = Le ?? (Be && !N) ?? E.isLoading, R = Re ?? E.errorMessage, Ve = s(u.type), z = m(y);
|
|
71
|
+
he(() => {
|
|
71
72
|
z.current = y;
|
|
72
73
|
}, [y]);
|
|
73
|
-
let
|
|
74
|
+
let He = f(async () => {
|
|
74
75
|
z.current && await z.current();
|
|
75
|
-
}, []), { timeUntilRefresh:
|
|
76
|
+
}, []), { timeUntilRefresh: Ue, isPaused: We } = te({
|
|
76
77
|
widgetId: u.id,
|
|
77
78
|
refreshInterval: u.refreshInterval,
|
|
78
|
-
onRefresh:
|
|
79
|
+
onRefresh: He,
|
|
79
80
|
enabled: !C && !!u.refreshInterval
|
|
80
|
-
}), B = m(null), [V, H] = h(!1), [U,
|
|
81
|
+
}), B = m(null), [V, H] = h(!1), [U, Ge] = h(!1), { count: Ke } = ne(u.id, U), qe = f(() => {
|
|
81
82
|
H((e) => {
|
|
82
83
|
let t = !e;
|
|
83
|
-
return t &&
|
|
84
|
+
return t && Ge(!0), t;
|
|
84
85
|
});
|
|
85
|
-
}, []),
|
|
86
|
+
}, []), Je = p(() => {
|
|
86
87
|
if (_ && Array.isArray(_)) return _;
|
|
87
88
|
let e = u.data;
|
|
88
89
|
if (e?.processed && Array.isArray(e.processed)) return e.processed;
|
|
@@ -91,21 +92,21 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
91
92
|
if (Array.isArray(t)) return t;
|
|
92
93
|
}
|
|
93
94
|
return null;
|
|
94
|
-
}, [_, u]), { exportCSV:
|
|
95
|
-
data:
|
|
95
|
+
}, [_, u]), { exportCSV: Ye, exportPNG: Xe } = re(u, {
|
|
96
|
+
data: Je,
|
|
96
97
|
containerRef: B
|
|
97
|
-
}),
|
|
98
|
+
}), W = f((e) => {
|
|
98
99
|
if (e == null) return !1;
|
|
99
100
|
if (Array.isArray(e)) return e.length > 0;
|
|
100
101
|
if (typeof e == "object") {
|
|
101
102
|
let t = e, n = Object.keys(t);
|
|
102
103
|
return n.length === 0 ? !1 : n.some((e) => {
|
|
103
104
|
let n = t[e];
|
|
104
|
-
return n == null || n === "" ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "object" ?
|
|
105
|
+
return n == null || n === "" ? !1 : Array.isArray(n) ? n.length > 0 : typeof n == "object" ? W(n) : !0;
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
return !0;
|
|
108
|
-
}, []),
|
|
109
|
+
}, []), Ze = f((e) => {
|
|
109
110
|
if (!I || !e) return e;
|
|
110
111
|
let t = {}, n = {};
|
|
111
112
|
Object.entries(F || {}).forEach(([e, r]) => {
|
|
@@ -241,59 +242,59 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
241
242
|
F,
|
|
242
243
|
u.id,
|
|
243
244
|
A
|
|
244
|
-
]),
|
|
245
|
+
]), G = p(() => {
|
|
245
246
|
let e = null;
|
|
246
|
-
if (_ &&
|
|
247
|
+
if (_ && W(_)) e = _;
|
|
247
248
|
else if (N) {
|
|
248
249
|
let t = N;
|
|
249
|
-
if (t?.processed &&
|
|
250
|
+
if (t?.processed && W(t.processed)) e = t.processed;
|
|
250
251
|
else if (t?.raw) try {
|
|
251
252
|
let n = typeof t.raw == "string" ? JSON.parse(t.raw) : t.raw;
|
|
252
|
-
|
|
253
|
+
W(n) && (e = n);
|
|
253
254
|
} catch {}
|
|
254
255
|
} else {
|
|
255
256
|
let t = u.data;
|
|
256
|
-
if (t?.processed &&
|
|
257
|
+
if (t?.processed && W(t.processed)) e = t.processed;
|
|
257
258
|
else if (t?.raw) try {
|
|
258
259
|
let n = typeof t.raw == "string" ? JSON.parse(t.raw) : t.raw;
|
|
259
|
-
|
|
260
|
+
W(n) && (e = n);
|
|
260
261
|
} catch {}
|
|
261
262
|
}
|
|
262
263
|
if (!e) {
|
|
263
264
|
let t = u.config?.mockData;
|
|
264
265
|
if (t) try {
|
|
265
266
|
let n = typeof t == "string" ? JSON.parse(t) : t;
|
|
266
|
-
|
|
267
|
+
W(n) && (e = n);
|
|
267
268
|
} catch {}
|
|
268
269
|
}
|
|
269
270
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
270
271
|
let t = u.config, n = t?.dataKey ?? t?.dataPath ?? t?.seriesPath;
|
|
271
272
|
if (n && typeof n == "string") {
|
|
272
273
|
let t = n.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
|
|
273
|
-
t != null &&
|
|
274
|
+
t != null && W(t) && (e = t);
|
|
274
275
|
}
|
|
275
276
|
}
|
|
276
|
-
return I && e ?
|
|
277
|
+
return I && e ? Ze(e) : e;
|
|
277
278
|
}, [
|
|
278
279
|
_,
|
|
279
280
|
u,
|
|
280
281
|
N,
|
|
281
282
|
I,
|
|
282
|
-
|
|
283
|
+
Ze,
|
|
283
284
|
F,
|
|
284
|
-
|
|
285
|
-
]),
|
|
286
|
-
|
|
285
|
+
W
|
|
286
|
+
]), K = p(() => G ?? null, [G]), Qe = p(() => !K || M ? !1 : u.config?.mockData != null, [
|
|
287
|
+
K,
|
|
287
288
|
M,
|
|
288
289
|
u.config
|
|
289
|
-
]), { executeDrilldown:
|
|
290
|
-
|
|
291
|
-
} }), J = p(() =>
|
|
290
|
+
]), { executeDrilldown: q, canDrilldown: $e } = ie({ onDrilldown: (e, t) => {
|
|
291
|
+
ze?.(e);
|
|
292
|
+
} }), J = p(() => $e(u), [u, $e]), Y = f((e) => {
|
|
292
293
|
if (!u.drilldown?.enabled) return;
|
|
293
294
|
let t = {
|
|
294
295
|
selectedData: e || {},
|
|
295
296
|
globalFilters: D || {},
|
|
296
|
-
widgetData:
|
|
297
|
+
widgetData: K || {},
|
|
297
298
|
metadata: {
|
|
298
299
|
widgetId: u.id,
|
|
299
300
|
widgetType: u.type,
|
|
@@ -301,18 +302,18 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
301
302
|
},
|
|
302
303
|
sourceDashboardId: u.dashboardId
|
|
303
304
|
};
|
|
304
|
-
|
|
305
|
+
q(u.drilldown, t);
|
|
305
306
|
}, [
|
|
306
307
|
u,
|
|
307
|
-
|
|
308
|
+
K,
|
|
308
309
|
D,
|
|
309
|
-
|
|
310
|
-
]), X = m(null),
|
|
310
|
+
q
|
|
311
|
+
]), X = m(null), et = f((e) => {
|
|
311
312
|
X.current = {
|
|
312
313
|
x: e.clientX,
|
|
313
314
|
y: e.clientY
|
|
314
315
|
};
|
|
315
|
-
}, []),
|
|
316
|
+
}, []), tt = f((e) => {
|
|
316
317
|
if (e.stopPropagation(), X.current) {
|
|
317
318
|
let t = Math.abs(e.clientX - X.current.x), n = Math.abs(e.clientY - X.current.y);
|
|
318
319
|
if (t > 5 || n > 5) {
|
|
@@ -325,40 +326,44 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
325
326
|
C,
|
|
326
327
|
w,
|
|
327
328
|
u.id
|
|
328
|
-
]),
|
|
329
|
+
]), nt = f((e) => {
|
|
329
330
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), C && w(u.id));
|
|
330
331
|
}, [
|
|
331
332
|
C,
|
|
332
333
|
w,
|
|
333
334
|
u.id
|
|
334
|
-
]),
|
|
335
|
+
]), rt = p(() => u.type === "custom" && de(u.config), [u.type, u.config]), it = p(() => u.type === "custom" && ue(u.config), [u.type, u.config]), Z = J && !it, at = p(() => u.type === "text" ? ae(u.config, K).hasContent : !1, [
|
|
336
|
+
u.type,
|
|
337
|
+
u.config,
|
|
338
|
+
K
|
|
339
|
+
]), ot = !L && !R && !K && !rt && !at, Q = p(() => u.renderer, [u]), st = p(() => Q && Q !== "BIGCONSOLE", [Q]), ct = p(() => ({
|
|
335
340
|
widgetId: u.id,
|
|
336
|
-
data:
|
|
337
|
-
}), [u.id,
|
|
341
|
+
data: K || {}
|
|
342
|
+
}), [u.id, K]), $ = f((e, t) => {
|
|
338
343
|
if (!x) return;
|
|
339
344
|
let n = b?.find((t) => t.name === e.name);
|
|
340
345
|
x(n || e, t);
|
|
341
|
-
}, [x, b]),
|
|
346
|
+
}, [x, b]), lt = f(() => {
|
|
342
347
|
let e = {
|
|
343
348
|
widget: u,
|
|
344
349
|
data: (() => {
|
|
345
|
-
if (!
|
|
350
|
+
if (!K) return K;
|
|
346
351
|
if (u.type === "table" || u.type === "pivot_table") {
|
|
347
|
-
if (Array.isArray(
|
|
348
|
-
if (
|
|
352
|
+
if (Array.isArray(K)) return K;
|
|
353
|
+
if (K && typeof K == "object" && "rows" in K) return K.rows;
|
|
349
354
|
}
|
|
350
355
|
if (u.type === "list") {
|
|
351
|
-
if (Array.isArray(
|
|
352
|
-
if (
|
|
356
|
+
if (Array.isArray(K)) return K;
|
|
357
|
+
if (K && typeof K == "object" && "items" in K) return K.items;
|
|
353
358
|
}
|
|
354
359
|
if (u.type === "funnel_chart") {
|
|
355
|
-
if (Array.isArray(
|
|
356
|
-
if (
|
|
360
|
+
if (Array.isArray(K)) return K;
|
|
361
|
+
if (K && typeof K == "object" && "stages" in K) return K.stages;
|
|
357
362
|
}
|
|
358
363
|
if (u.type === "chart") {
|
|
359
|
-
if (Array.isArray(
|
|
360
|
-
if (
|
|
361
|
-
let e =
|
|
364
|
+
if (Array.isArray(K)) return K;
|
|
365
|
+
if (K && typeof K == "object" && "datasets" in K) {
|
|
366
|
+
let e = K;
|
|
362
367
|
if (e.labels && e.datasets) return e.labels.map((t, n) => {
|
|
363
368
|
let r = { name: t };
|
|
364
369
|
return e.datasets?.forEach((e) => {
|
|
@@ -367,26 +372,18 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
367
372
|
});
|
|
368
373
|
}
|
|
369
374
|
}
|
|
370
|
-
if (u.type === "text"
|
|
371
|
-
let e =
|
|
372
|
-
for (let [n, r] of Object.entries(e)) if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
373
|
-
t.push(`### ${n}`);
|
|
374
|
-
for (let [e, n] of Object.entries(r)) t.push(`- **${e}:** ${n}`);
|
|
375
|
-
} else Array.isArray(r) ? (t.push(`### ${n}`), r.slice(0, 10).forEach((e) => {
|
|
376
|
-
if (e && typeof e == "object") {
|
|
377
|
-
let n = Object.entries(e);
|
|
378
|
-
t.push(`- ${n.map(([e, t]) => `**${e}:** ${t}`).join(" | ")}`);
|
|
379
|
-
} else t.push(`- ${e}`);
|
|
380
|
-
})) : t.push(`- **${n}:** ${r}`);
|
|
375
|
+
if (u.type === "text") {
|
|
376
|
+
let e = ae(u.config, K);
|
|
381
377
|
return {
|
|
382
|
-
content:
|
|
383
|
-
format:
|
|
378
|
+
content: e.content,
|
|
379
|
+
format: e.format,
|
|
380
|
+
alignment: e.alignment
|
|
384
381
|
};
|
|
385
382
|
}
|
|
386
383
|
if (u.type === "custom") {
|
|
387
384
|
let e = u.config?.valueField;
|
|
388
|
-
if (e &&
|
|
389
|
-
let t =
|
|
385
|
+
if (e && K && typeof K == "object" && !Array.isArray(K)) {
|
|
386
|
+
let t = K;
|
|
390
387
|
if (e in t) return {
|
|
391
388
|
value: t[e],
|
|
392
389
|
label: u.title,
|
|
@@ -394,13 +391,13 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
394
391
|
};
|
|
395
392
|
}
|
|
396
393
|
}
|
|
397
|
-
return
|
|
394
|
+
return K;
|
|
398
395
|
})(),
|
|
399
396
|
onDrilldown: J ? Y : void 0
|
|
400
397
|
};
|
|
401
|
-
if (
|
|
398
|
+
if (st) {
|
|
402
399
|
let e = {};
|
|
403
|
-
if (
|
|
400
|
+
if (G && typeof G == "object" && !Array.isArray(G) && Object.keys(G).length > 0 && (e = { ...G }), u.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
|
|
404
401
|
let t = u.config?.valueField;
|
|
405
402
|
if (t && t in e) {
|
|
406
403
|
let n = e[t], r = typeof n == "number" ? n.toLocaleString() : String(n);
|
|
@@ -413,7 +410,7 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
413
410
|
};
|
|
414
411
|
}
|
|
415
412
|
}
|
|
416
|
-
return /* @__PURE__ */ g(
|
|
413
|
+
return /* @__PURE__ */ g(pe, {
|
|
417
414
|
widget: u,
|
|
418
415
|
data: e,
|
|
419
416
|
isEditMode: C,
|
|
@@ -425,42 +422,42 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
425
422
|
});
|
|
426
423
|
}
|
|
427
424
|
switch (u.type?.toLowerCase() || "") {
|
|
428
|
-
case "metric_card": return /* @__PURE__ */ g(
|
|
429
|
-
case "kpi_card_comparison": return /* @__PURE__ */ g(
|
|
425
|
+
case "metric_card": return /* @__PURE__ */ g(ve, { ...e });
|
|
426
|
+
case "kpi_card_comparison": return /* @__PURE__ */ g(Ae, { ...e });
|
|
430
427
|
case "chart":
|
|
431
|
-
case "funnel_chart": return /* @__PURE__ */ g(
|
|
432
|
-
case "table": return /* @__PURE__ */ g(
|
|
433
|
-
case "pivot_table": return /* @__PURE__ */ g(
|
|
434
|
-
case "gauge": return /* @__PURE__ */ g(
|
|
435
|
-
case "progress": return /* @__PURE__ */ g(
|
|
436
|
-
case "list": return /* @__PURE__ */ g(
|
|
437
|
-
case "heatmap": return /* @__PURE__ */ g(
|
|
438
|
-
case "retention": return /* @__PURE__ */ g(
|
|
439
|
-
case "calendar": return /* @__PURE__ */ g(
|
|
440
|
-
case "timeline": return /* @__PURE__ */ g(
|
|
441
|
-
case "kanban": return /* @__PURE__ */ g(
|
|
442
|
-
case "form": return /* @__PURE__ */ g(
|
|
443
|
-
case "text": return /* @__PURE__ */ g(
|
|
444
|
-
case "iframe": return /* @__PURE__ */ g(
|
|
445
|
-
case "map": return /* @__PURE__ */ g(
|
|
446
|
-
case "custom": return /* @__PURE__ */ g(
|
|
447
|
-
default: return d || /* @__PURE__ */ g(
|
|
428
|
+
case "funnel_chart": return /* @__PURE__ */ g(ye, { ...e });
|
|
429
|
+
case "table": return /* @__PURE__ */ g(be, { ...e });
|
|
430
|
+
case "pivot_table": return /* @__PURE__ */ g(xe, { ...e });
|
|
431
|
+
case "gauge": return /* @__PURE__ */ g(Se, { ...e });
|
|
432
|
+
case "progress": return /* @__PURE__ */ g(Ce, { ...e });
|
|
433
|
+
case "list": return /* @__PURE__ */ g(we, { ...e });
|
|
434
|
+
case "heatmap": return /* @__PURE__ */ g(Te, { ...e });
|
|
435
|
+
case "retention": return /* @__PURE__ */ g(Ee, { ...e });
|
|
436
|
+
case "calendar": return /* @__PURE__ */ g(De, { ...e });
|
|
437
|
+
case "timeline": return /* @__PURE__ */ g(ke, { ...e });
|
|
438
|
+
case "kanban": return /* @__PURE__ */ g(Oe, { ...e });
|
|
439
|
+
case "form": return /* @__PURE__ */ g(Fe, { ...e });
|
|
440
|
+
case "text": return /* @__PURE__ */ g(je, { ...e });
|
|
441
|
+
case "iframe": return /* @__PURE__ */ g(Ne, { ...e });
|
|
442
|
+
case "map": return /* @__PURE__ */ g(Me, { ...e });
|
|
443
|
+
case "custom": return /* @__PURE__ */ g(Pe, { ...e });
|
|
444
|
+
default: return d || /* @__PURE__ */ g(c, { widgetType: u.type });
|
|
448
445
|
}
|
|
449
446
|
}, [
|
|
450
447
|
u,
|
|
451
|
-
|
|
448
|
+
K,
|
|
452
449
|
d,
|
|
453
450
|
J,
|
|
454
451
|
Y,
|
|
455
|
-
|
|
452
|
+
st,
|
|
456
453
|
C,
|
|
457
454
|
T,
|
|
458
455
|
L,
|
|
459
456
|
R,
|
|
460
457
|
$,
|
|
461
|
-
|
|
458
|
+
G
|
|
462
459
|
]);
|
|
463
|
-
return /* @__PURE__ */
|
|
460
|
+
return /* @__PURE__ */ _e("div", {
|
|
464
461
|
ref: B,
|
|
465
462
|
className: `
|
|
466
463
|
group relative flex flex-col
|
|
@@ -472,9 +469,9 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
472
469
|
${C ? "cursor-pointer" : ""}
|
|
473
470
|
${v}
|
|
474
471
|
`,
|
|
475
|
-
onMouseDown:
|
|
476
|
-
onClick:
|
|
477
|
-
onKeyDown:
|
|
472
|
+
onMouseDown: et,
|
|
473
|
+
onClick: tt,
|
|
474
|
+
onKeyDown: nt,
|
|
478
475
|
tabIndex: C ? 0 : -1,
|
|
479
476
|
role: C ? "button" : void 0,
|
|
480
477
|
"aria-selected": T,
|
|
@@ -482,22 +479,22 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
482
479
|
"data-widget-id": u.id,
|
|
483
480
|
"data-widget-type": u.type,
|
|
484
481
|
children: [
|
|
485
|
-
/* @__PURE__ */ g(
|
|
482
|
+
/* @__PURE__ */ g(oe, {
|
|
486
483
|
widget: u,
|
|
487
|
-
definition:
|
|
484
|
+
definition: Ve,
|
|
488
485
|
isSelected: T,
|
|
489
486
|
isEditMode: C,
|
|
490
487
|
isLoading: L,
|
|
491
|
-
isSampleData:
|
|
492
|
-
timeUntilRefresh: u.refreshInterval && !
|
|
488
|
+
isSampleData: Qe,
|
|
489
|
+
timeUntilRefresh: u.refreshInterval && !We ? ee(Ue) : void 0,
|
|
493
490
|
hasDrilldown: J,
|
|
494
491
|
onRefresh: y,
|
|
495
|
-
onExportCSV:
|
|
496
|
-
onExportPNG:
|
|
492
|
+
onExportCSV: Je ? Ye : void 0,
|
|
493
|
+
onExportPNG: Xe,
|
|
497
494
|
onDrilldown: J ? () => Y() : void 0,
|
|
498
|
-
onToggleComments:
|
|
495
|
+
onToggleComments: qe,
|
|
499
496
|
commentsOpen: V,
|
|
500
|
-
commentCount: U ?
|
|
497
|
+
commentCount: U ? Ke : void 0
|
|
501
498
|
}),
|
|
502
499
|
/* @__PURE__ */ g("div", {
|
|
503
500
|
className: `
|
|
@@ -508,25 +505,25 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
508
505
|
children: /* @__PURE__ */ g("div", {
|
|
509
506
|
className: "h-full overflow-auto",
|
|
510
507
|
children: (() => {
|
|
511
|
-
if (L) return /* @__PURE__ */ g(
|
|
512
|
-
if (R) return /* @__PURE__ */ g(
|
|
508
|
+
if (L) return /* @__PURE__ */ g(se, {});
|
|
509
|
+
if (R) return /* @__PURE__ */ g(ce, {
|
|
513
510
|
error: R,
|
|
514
511
|
onRetry: y
|
|
515
512
|
});
|
|
516
|
-
if (
|
|
513
|
+
if (ot && !d) return /* @__PURE__ */ g(c, {
|
|
517
514
|
widgetType: u.type,
|
|
518
515
|
hasDataSource: M,
|
|
519
516
|
templateSlot: typeof u.metadata?.templateDataSinkSlot == "string" ? u.metadata.templateDataSinkSlot : null
|
|
520
517
|
});
|
|
521
518
|
let e = `${j.source.kind}|${j.source.ref ?? ""}|${j.parserId ?? ""}|${u.updatedAt ?? ""}`;
|
|
522
|
-
return /* @__PURE__ */ g(
|
|
519
|
+
return /* @__PURE__ */ g(le, {
|
|
523
520
|
widgetId: u.id,
|
|
524
521
|
widgetType: u.type,
|
|
525
522
|
widgetTitle: u.title,
|
|
526
523
|
resetKey: e,
|
|
527
|
-
children: d ?? /* @__PURE__ */ g(
|
|
528
|
-
fallback: /* @__PURE__ */ g(
|
|
529
|
-
children:
|
|
524
|
+
children: d ?? /* @__PURE__ */ g(l, {
|
|
525
|
+
fallback: /* @__PURE__ */ g(se, {}),
|
|
526
|
+
children: lt()
|
|
530
527
|
})
|
|
531
528
|
});
|
|
532
529
|
})()
|
|
@@ -535,9 +532,9 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
535
532
|
b && b.length > 0 && !L && !R && /* @__PURE__ */ g("div", {
|
|
536
533
|
className: "px-4 py-3 border-t border-border-default bg-bg-sunken",
|
|
537
534
|
style: { flexShrink: 0 },
|
|
538
|
-
children: /* @__PURE__ */ g(
|
|
535
|
+
children: /* @__PURE__ */ g(me, {
|
|
539
536
|
actions: b,
|
|
540
|
-
context:
|
|
537
|
+
context: ct,
|
|
541
538
|
onAction: x,
|
|
542
539
|
disabled: C,
|
|
543
540
|
layout: "horizontal",
|
|
@@ -560,9 +557,9 @@ var v = d(function({ widget: u, children: d, data: _, className: v = "", isLoadi
|
|
|
560
557
|
})
|
|
561
558
|
})
|
|
562
559
|
}),
|
|
563
|
-
V && /* @__PURE__ */ g(
|
|
560
|
+
V && /* @__PURE__ */ g(l, {
|
|
564
561
|
fallback: null,
|
|
565
|
-
children: /* @__PURE__ */ g(
|
|
562
|
+
children: /* @__PURE__ */ g(Ie, {
|
|
566
563
|
widgetId: u.id,
|
|
567
564
|
onClose: () => H(!1)
|
|
568
565
|
})
|