@burdenoff/microfe-bigconsole 2026.1117.1 → 2026.1117.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.
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.d.ts +25 -0
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +723 -0
- package/dist/bigconsole/components/reconcile/reconcileModel.d.ts +101 -0
- package/dist/bigconsole/components/reconcile/reconcileModel.js +222 -0
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +2 -0
- package/dist/bigconsole/components/widgets/WidgetHeader.js +3 -2
- package/dist/bigconsole/components/widgets/WidgetMenu.d.ts +2 -0
- package/dist/bigconsole/components/widgets/WidgetMenu.js +60 -41
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +263 -253
- package/dist/generated/wspace-operations.d.ts +403 -0
- package/dist/generated/wspace-operations.js +1248 -46
- package/dist/generated/wspace-types.d.ts +305 -0
- package/package.json +1 -1
|
@@ -14,44 +14,45 @@ import { WidgetHeader as le } from "./WidgetHeader.js";
|
|
|
14
14
|
import { useBigConsoleSettings as ue } from "../../hooks/useBigConsoleSettings.js";
|
|
15
15
|
import { WidgetLoadingState as de } from "./states/LoadingState.js";
|
|
16
16
|
import { WidgetErrorState as fe } from "./states/ErrorState.js";
|
|
17
|
-
import { WidgetEmptyState as
|
|
18
|
-
import { WidgetErrorBoundary as
|
|
19
|
-
import { hasCustomIframeConfig as
|
|
20
|
-
import { getBindingForWidget as
|
|
21
|
-
import { filterMetaFromDashboard as
|
|
22
|
-
import { applyGlobalFilters as
|
|
23
|
-
import { extractOutlierSeries as
|
|
24
|
-
import { OutlierSpottingDialog as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
17
|
+
import { WidgetEmptyState as pe } from "./states/EmptyState.js";
|
|
18
|
+
import { WidgetErrorBoundary as me } from "./WidgetErrorBoundary.js";
|
|
19
|
+
import { hasCustomIframeConfig as he, hasRenderableCustomConfig as ge } from "./custom/config.js";
|
|
20
|
+
import { getBindingForWidget as _e } from "../../utils/widgetBinding.js";
|
|
21
|
+
import { filterMetaFromDashboard as ve, findInapplicableFilters as ye } from "../../utils/globalFilterMatching.js";
|
|
22
|
+
import { applyGlobalFilters as be } from "../../utils/applyGlobalFilters.js";
|
|
23
|
+
import { extractOutlierSeries as xe } from "../insights/outlierSeries.js";
|
|
24
|
+
import { OutlierSpottingDialog as Se } from "../insights/OutlierSpottingDialog.js";
|
|
25
|
+
import { canReconcileWidget as Ce } from "../reconcile/reconcileModel.js";
|
|
26
|
+
import { isUsableWidgetData as we, resolveWidgetDisplayData as Te, widgetDataSourcePolicy as Ee, widgetExportRows as De } from "../../utils/widgetDisplayData.js";
|
|
27
|
+
import { WidgetRendererFactory as Oe } from "../../renderers/factory/WidgetRendererFactory.js";
|
|
28
|
+
import { WidgetActions as ke } from "./widget-actions/WidgetActions.js";
|
|
28
29
|
import "./widget-actions/index.js";
|
|
29
|
-
import { dashboardSuggestAnchorProps as
|
|
30
|
-
import { Suspense as
|
|
31
|
-
import { useI18n as
|
|
32
|
-
import { useQuery as
|
|
33
|
-
import { jsx as
|
|
30
|
+
import { dashboardSuggestAnchorProps as Ae } from "../../proactive/entities.js";
|
|
31
|
+
import { Suspense as a, lazy as o, memo as s, useCallback as c, useEffect as je, useMemo as l, useRef as u, useState as d } from "react";
|
|
32
|
+
import { useI18n as Me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
33
|
+
import { useQuery as Ne } from "@apollo/client/react";
|
|
34
|
+
import { jsx as f, jsxs as Pe } from "react/jsx-runtime";
|
|
34
35
|
// src/bigconsole/components/widgets/WidgetWrapper.tsx
|
|
35
|
-
var
|
|
36
|
-
|
|
37
|
-
var
|
|
36
|
+
var Fe = o(() => import("../reconcile/KpiReconcileDialog.js").then((e) => ({ default: e.KpiReconcileDialog }))), Ie = o(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), Le = o(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), Re = o(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), ze = o(() => import("./pivot-table/index.js").then((e) => ({ default: e.PivotTableWidget }))), Be = o(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), Ve = o(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), He = o(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), Ue = o(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), We = o(() => import("./retention/index.js").then((e) => ({ default: e.RetentionWidget }))), Ge = o(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), Ke = o(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), qe = o(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), Je = o(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), Ye = o(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), Xe = o(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), Ze = o(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), Qe = o(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget })));
|
|
37
|
+
o(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget })));
|
|
38
|
+
var $e = o(() => import("./form/index.js").then((e) => ({ default: e.FormWidget }))), et = o(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.SankeyWidget }))), tt = o(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.BoxPlotWidget }))), nt = o(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.WaterfallWidget }))), rt = o(() => import("./comments/WidgetComments.js").then((e) => ({ default: e.WidgetComments }))), it = /* @__PURE__ */ new Set([
|
|
38
39
|
"text",
|
|
39
40
|
"iframe",
|
|
40
41
|
"form",
|
|
41
42
|
"adaptive_card"
|
|
42
43
|
]);
|
|
43
|
-
function
|
|
44
|
+
function p(e, t) {
|
|
44
45
|
return e.previewOnly === t.previewOnly && e.widget.id === t.widget.id && e.widget.updatedAt === t.widget.updatedAt && e.isLoading === t.isLoading && e.error === t.error && e.actions === t.actions && e.data === t.data && JSON.stringify(e.filterValues) === JSON.stringify(t.filterValues) && e.narrativeOpen === t.narrativeOpen && e.narrativePanel === t.narrativePanel;
|
|
45
46
|
}
|
|
46
|
-
var
|
|
47
|
-
let x = ue(),
|
|
48
|
-
variables: { id:
|
|
49
|
-
skip: !
|
|
47
|
+
var m = s(function({ widget: o, children: s, data: p, className: m = "", isLoading: at, error: ot, onRefresh: h, onDrilldown: st, actions: g, onAction: _, filterValues: v, onToggleNarrative: ct, narrativeOpen: y = !1, narrativePanel: lt, previewOnly: b = !1 }) {
|
|
48
|
+
let x = ue(), ut = r((e) => e.viewMode === "edit"), S = !b && ut, C = t((e) => e.selectWidget), w = e(o.id), dt = n(o.id), T = ee(), { t: ft } = Me(), E = o.dashboardId, { data: pt } = Ne(ne, {
|
|
49
|
+
variables: { id: E ?? "" },
|
|
50
|
+
skip: !E,
|
|
50
51
|
fetchPolicy: "cache-only"
|
|
51
|
-
}),
|
|
52
|
-
skip: b || !
|
|
53
|
-
pollInterval: (
|
|
54
|
-
}),
|
|
52
|
+
}), D = pt?.getDashboard?.globalFilters, O = l(() => ve(D), [D]), k = l(() => Object.fromEntries(Object.entries(O).map(([e, t]) => [e, t.field])), [O]), A = l(() => _e(o), [o]), { hasDataSource: j, allowSamples: M, mockSource: N } = Ee(o, A), { data: P, loading: mt, error: ht } = te(o.id, {
|
|
53
|
+
skip: b || !j,
|
|
54
|
+
pollInterval: (o.refreshInterval ?? 0) * 1e3 || 0
|
|
55
|
+
}), F = l(() => {
|
|
55
56
|
if (typeof window > "u") return {};
|
|
56
57
|
let e = new URLSearchParams(window.location.search), t = {};
|
|
57
58
|
return e.forEach((e, n) => {
|
|
@@ -60,149 +61,149 @@ var h = c(function({ widget: s, children: c, data: m, className: h = "", isLoadi
|
|
|
60
61
|
r.startsWith("__") || (t[r] = e);
|
|
61
62
|
}
|
|
62
63
|
}), t;
|
|
63
|
-
}, []),
|
|
64
|
+
}, []), I = l(() => {
|
|
64
65
|
let e = {};
|
|
65
|
-
return
|
|
66
|
+
return F && Object.keys(F).length > 0 && Object.assign(e, F), T && Object.keys(T).length > 0 && Object.assign(e, T), v && Object.keys(v).length > 0 && Object.assign(e, v), e;
|
|
66
67
|
}, [
|
|
67
|
-
|
|
68
|
+
F,
|
|
68
69
|
T,
|
|
69
|
-
|
|
70
|
-
]),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}, [
|
|
74
|
-
let
|
|
75
|
-
|
|
76
|
-
}, []), { timeUntilRefresh:
|
|
77
|
-
widgetId:
|
|
78
|
-
refreshInterval:
|
|
79
|
-
onRefresh:
|
|
80
|
-
enabled: !b && !S && !!
|
|
81
|
-
}),
|
|
82
|
-
|
|
83
|
-
}, []),
|
|
84
|
-
explicit:
|
|
85
|
-
fetched:
|
|
86
|
-
persisted:
|
|
87
|
-
config:
|
|
88
|
-
allowSamples:
|
|
89
|
-
mockSource:
|
|
90
|
-
widgetType:
|
|
70
|
+
v
|
|
71
|
+
]), L = Object.keys(I).length > 0, R = at ?? (mt && !P) ?? dt.isLoading, z = ot ?? ht?.message ?? dt.errorMessage, gt = ce(o.type), B = u(h);
|
|
72
|
+
je(() => {
|
|
73
|
+
B.current = h;
|
|
74
|
+
}, [h]);
|
|
75
|
+
let _t = c(async () => {
|
|
76
|
+
B.current && await B.current();
|
|
77
|
+
}, []), { timeUntilRefresh: vt, isPaused: yt } = ie({
|
|
78
|
+
widgetId: o.id,
|
|
79
|
+
refreshInterval: o.refreshInterval,
|
|
80
|
+
onRefresh: _t,
|
|
81
|
+
enabled: !b && !S && !!o.refreshInterval
|
|
82
|
+
}), V = u(null), [H, U] = d(!1), [W, bt] = d(!1), { count: xt } = ae(o.id, W), St = c(() => {
|
|
83
|
+
bt(!0), U((e) => !e);
|
|
84
|
+
}, []), G = l(() => Te({
|
|
85
|
+
explicit: p,
|
|
86
|
+
fetched: P,
|
|
87
|
+
persisted: o.data,
|
|
88
|
+
config: o.config,
|
|
89
|
+
allowSamples: M,
|
|
90
|
+
mockSource: N,
|
|
91
|
+
widgetType: o.type
|
|
91
92
|
}), [
|
|
92
|
-
|
|
93
|
+
p,
|
|
94
|
+
P,
|
|
95
|
+
o,
|
|
93
96
|
M,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
]), U = u(() => {
|
|
98
|
-
let e = H.data;
|
|
97
|
+
N
|
|
98
|
+
]), K = l(() => {
|
|
99
|
+
let e = G.data;
|
|
99
100
|
if (e && typeof e == "object" && !Array.isArray(e)) {
|
|
100
|
-
let t =
|
|
101
|
+
let t = o.config, n = t?.dataKey ?? t?.dataPath ?? t?.seriesPath;
|
|
101
102
|
if (n && typeof n == "string") {
|
|
102
103
|
let t = n.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
|
|
103
|
-
t != null &&
|
|
104
|
+
t != null && we(t) && (e = t);
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
return e;
|
|
107
|
-
}, [
|
|
108
|
-
filterValues:
|
|
109
|
-
filterFieldMap:
|
|
110
|
-
widgetType:
|
|
111
|
-
}) :
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
}, [G, o.config]), q = l(() => L ? be(K, {
|
|
109
|
+
filterValues: I,
|
|
110
|
+
filterFieldMap: k,
|
|
111
|
+
widgetType: o.type
|
|
112
|
+
}) : K, [
|
|
113
|
+
K,
|
|
114
|
+
L,
|
|
115
|
+
I,
|
|
116
|
+
k,
|
|
117
|
+
o.type
|
|
118
|
+
]), Ct = q !== null && G.isSample, wt = l(() => it.has(o.type) ? [] : ye(K, O, I, o.type), [
|
|
119
|
+
K,
|
|
115
120
|
O,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
s.type
|
|
122
|
-
]), K = u(() => Te(W, s.type), [W, s.type]), q = u(() => {
|
|
123
|
-
let e = s.config;
|
|
124
|
-
return be(W, {
|
|
121
|
+
I,
|
|
122
|
+
o.type
|
|
123
|
+
]), Tt = l(() => De(q, o.type), [q, o.type]), Et = l(() => {
|
|
124
|
+
let e = o.config;
|
|
125
|
+
return xe(q, {
|
|
125
126
|
xAxisKey: typeof e?.xAxisKey == "string" ? e.xAxisKey : void 0,
|
|
126
127
|
selectedFields: Array.isArray(e?.selectedFields) ? e.selectedFields.filter((e) => typeof e == "string") : void 0
|
|
127
128
|
});
|
|
128
|
-
}, [
|
|
129
|
-
data:
|
|
130
|
-
containerRef:
|
|
131
|
-
}), { executeDrilldown:
|
|
132
|
-
|
|
133
|
-
} }),
|
|
134
|
-
if (!
|
|
129
|
+
}, [q, o.config]), [Dt, Ot] = d(!1), [kt, At] = d(!1), jt = Ce(o.type, b), { exportCSV: Mt, exportPNG: Nt } = oe(o, {
|
|
130
|
+
data: Tt,
|
|
131
|
+
containerRef: V
|
|
132
|
+
}), { executeDrilldown: Pt, canDrilldown: Ft } = se({ onDrilldown: (e, t) => {
|
|
133
|
+
st?.(e);
|
|
134
|
+
} }), J = l(() => Ft(o), [o, Ft]), It = c((e) => {
|
|
135
|
+
if (!o.drilldown?.enabled) return;
|
|
135
136
|
let t = {
|
|
136
137
|
selectedData: e || {},
|
|
137
138
|
globalFilters: T || {},
|
|
138
|
-
widgetData:
|
|
139
|
+
widgetData: q || {},
|
|
139
140
|
metadata: {
|
|
140
|
-
widgetId:
|
|
141
|
-
widgetType:
|
|
142
|
-
widgetTitle:
|
|
141
|
+
widgetId: o.id,
|
|
142
|
+
widgetType: o.type,
|
|
143
|
+
widgetTitle: o.title
|
|
143
144
|
},
|
|
144
|
-
sourceDashboardId:
|
|
145
|
+
sourceDashboardId: o.dashboardId
|
|
145
146
|
};
|
|
146
|
-
|
|
147
|
+
Pt(o.drilldown, t);
|
|
147
148
|
}, [
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
o,
|
|
150
|
+
q,
|
|
150
151
|
T,
|
|
151
|
-
|
|
152
|
-
]),
|
|
153
|
-
|
|
152
|
+
Pt
|
|
153
|
+
]), Y = J && !S ? It : void 0, X = u(null), Lt = c((e) => {
|
|
154
|
+
X.current = {
|
|
154
155
|
x: e.clientX,
|
|
155
156
|
y: e.clientY
|
|
156
157
|
};
|
|
157
|
-
}, []),
|
|
158
|
-
if (e.stopPropagation(),
|
|
159
|
-
let t = Math.abs(e.clientX -
|
|
158
|
+
}, []), Rt = c((e) => {
|
|
159
|
+
if (e.stopPropagation(), X.current) {
|
|
160
|
+
let t = Math.abs(e.clientX - X.current.x), n = Math.abs(e.clientY - X.current.y);
|
|
160
161
|
if (t > 5 || n > 5) {
|
|
161
|
-
|
|
162
|
+
X.current = null;
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
|
-
|
|
166
|
+
X.current = null, S && C(o.id);
|
|
166
167
|
}, [
|
|
167
168
|
S,
|
|
168
169
|
C,
|
|
169
|
-
|
|
170
|
-
]),
|
|
171
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), S && C(
|
|
170
|
+
o.id
|
|
171
|
+
]), zt = c((e) => {
|
|
172
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), S && C(o.id));
|
|
172
173
|
}, [
|
|
173
174
|
S,
|
|
174
175
|
C,
|
|
175
|
-
|
|
176
|
-
]),
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
]),
|
|
181
|
-
widgetId:
|
|
182
|
-
data:
|
|
183
|
-
}), [
|
|
184
|
-
if (!
|
|
185
|
-
let n =
|
|
186
|
-
|
|
187
|
-
}, [
|
|
176
|
+
o.id
|
|
177
|
+
]), Bt = l(() => o.type === "custom" && ge(o.config), [o.type, o.config]), Vt = l(() => o.type === "custom" && he(o.config), [o.type, o.config]), Z = J && !Vt, Ht = l(() => o.type === "text" && i(o.config, q).hasContent, [
|
|
178
|
+
o.type,
|
|
179
|
+
o.config,
|
|
180
|
+
q
|
|
181
|
+
]), Ut = !R && !z && !q && !Bt && !Ht, Q = l(() => o.renderer, [o]), Wt = l(() => Q && Q !== "BIGCONSOLE", [Q]), Gt = l(() => ({
|
|
182
|
+
widgetId: o.id,
|
|
183
|
+
data: q || {}
|
|
184
|
+
}), [o.id, q]), $ = c((e, t) => {
|
|
185
|
+
if (!_) return;
|
|
186
|
+
let n = g?.find((t) => t.name === e.name);
|
|
187
|
+
_(n || e, t);
|
|
188
|
+
}, [_, g]), Kt = c(() => {
|
|
188
189
|
let e = (() => {
|
|
189
|
-
if (!
|
|
190
|
-
if (
|
|
191
|
-
if (Array.isArray(
|
|
192
|
-
if (
|
|
190
|
+
if (!q) return q;
|
|
191
|
+
if (o.type === "pivot_table") {
|
|
192
|
+
if (Array.isArray(q)) return q;
|
|
193
|
+
if (q && typeof q == "object" && "rows" in q) return q.rows;
|
|
193
194
|
}
|
|
194
|
-
if (
|
|
195
|
-
if (Array.isArray(
|
|
196
|
-
if (
|
|
195
|
+
if (o.type === "list") {
|
|
196
|
+
if (Array.isArray(q)) return q;
|
|
197
|
+
if (q && typeof q == "object" && "items" in q) return q.items;
|
|
197
198
|
}
|
|
198
|
-
if (
|
|
199
|
-
if (Array.isArray(
|
|
200
|
-
if (
|
|
199
|
+
if (o.type === "funnel_chart") {
|
|
200
|
+
if (Array.isArray(q)) return q;
|
|
201
|
+
if (q && typeof q == "object" && "stages" in q) return q.stages;
|
|
201
202
|
}
|
|
202
|
-
if (
|
|
203
|
-
if (Array.isArray(
|
|
204
|
-
if (
|
|
205
|
-
let e =
|
|
203
|
+
if (o.type === "chart") {
|
|
204
|
+
if (Array.isArray(q)) return q;
|
|
205
|
+
if (q && typeof q == "object" && "datasets" in q) {
|
|
206
|
+
let e = q;
|
|
206
207
|
if (e.labels && e.datasets) return e.labels.map((t, n) => {
|
|
207
208
|
let r = { name: t };
|
|
208
209
|
return e.datasets?.forEach((e) => {
|
|
@@ -211,183 +212,183 @@ var h = c(function({ widget: s, children: c, data: m, className: h = "", isLoadi
|
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
|
-
if (
|
|
215
|
-
let e = i(
|
|
215
|
+
if (o.type === "text") {
|
|
216
|
+
let e = i(o.config, q);
|
|
216
217
|
return {
|
|
217
218
|
content: e.content,
|
|
218
219
|
format: e.format,
|
|
219
220
|
alignment: e.alignment
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
|
-
if (
|
|
223
|
-
let e =
|
|
224
|
-
if (e &&
|
|
225
|
-
let t =
|
|
223
|
+
if (o.type === "custom") {
|
|
224
|
+
let e = o.config?.valueField;
|
|
225
|
+
if (e && q && typeof q == "object" && !Array.isArray(q)) {
|
|
226
|
+
let t = q;
|
|
226
227
|
if (e in t) return {
|
|
227
228
|
value: t[e],
|
|
228
|
-
label:
|
|
229
|
+
label: o.title,
|
|
229
230
|
data: t
|
|
230
231
|
};
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
|
-
return
|
|
234
|
+
return q;
|
|
234
235
|
})(), t = {
|
|
235
|
-
widget:
|
|
236
|
-
onDrilldown:
|
|
236
|
+
widget: o,
|
|
237
|
+
onDrilldown: Y
|
|
237
238
|
};
|
|
238
|
-
if (
|
|
239
|
+
if (Wt) {
|
|
239
240
|
let e = {};
|
|
240
|
-
if (
|
|
241
|
-
let t =
|
|
241
|
+
if (q && typeof q == "object" && !Array.isArray(q) && Object.keys(q).length > 0 && (e = { ...q }), o.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
|
|
242
|
+
let t = o.config?.valueField;
|
|
242
243
|
if (t && t in e) {
|
|
243
244
|
let n = e[t], r = typeof n == "number" ? n.toLocaleString() : String(n);
|
|
244
245
|
e = {
|
|
245
246
|
...e,
|
|
246
247
|
value: n,
|
|
247
248
|
title: e.title || r,
|
|
248
|
-
description: e.description ||
|
|
249
|
+
description: e.description || o.title || "",
|
|
249
250
|
text: e.text || r
|
|
250
251
|
};
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
|
-
return /* @__PURE__ */
|
|
254
|
-
widget:
|
|
254
|
+
return /* @__PURE__ */ f(Oe, {
|
|
255
|
+
widget: o,
|
|
255
256
|
data: e,
|
|
256
257
|
isEditMode: S,
|
|
257
258
|
isSelected: w,
|
|
258
|
-
isLoading:
|
|
259
|
-
error:
|
|
260
|
-
onDrilldown:
|
|
261
|
-
onAction:
|
|
259
|
+
isLoading: R,
|
|
260
|
+
error: z,
|
|
261
|
+
onDrilldown: Y,
|
|
262
|
+
onAction: $
|
|
262
263
|
});
|
|
263
264
|
}
|
|
264
|
-
switch (
|
|
265
|
-
case "metric_card": return /* @__PURE__ */
|
|
265
|
+
switch (o.type?.toLowerCase() || "") {
|
|
266
|
+
case "metric_card": return /* @__PURE__ */ f(Ie, {
|
|
266
267
|
...t,
|
|
267
268
|
data: e
|
|
268
269
|
});
|
|
269
|
-
case "kpi_card_comparison": return /* @__PURE__ */
|
|
270
|
+
case "kpi_card_comparison": return /* @__PURE__ */ f(Je, {
|
|
270
271
|
...t,
|
|
271
272
|
data: e
|
|
272
273
|
});
|
|
273
274
|
case "chart":
|
|
274
|
-
case "funnel_chart": return /* @__PURE__ */
|
|
275
|
+
case "funnel_chart": return /* @__PURE__ */ f(Le, {
|
|
275
276
|
...t,
|
|
276
277
|
data: e
|
|
277
278
|
});
|
|
278
|
-
case "waterfall": return /* @__PURE__ */
|
|
279
|
+
case "waterfall": return /* @__PURE__ */ f(nt, {
|
|
279
280
|
...t,
|
|
280
281
|
data: e
|
|
281
282
|
});
|
|
282
|
-
case "sankey": return /* @__PURE__ */
|
|
283
|
+
case "sankey": return /* @__PURE__ */ f(et, {
|
|
283
284
|
...t,
|
|
284
285
|
data: e
|
|
285
286
|
});
|
|
286
|
-
case "box_plot": return /* @__PURE__ */
|
|
287
|
+
case "box_plot": return /* @__PURE__ */ f(tt, {
|
|
287
288
|
...t,
|
|
288
289
|
data: e
|
|
289
290
|
});
|
|
290
|
-
case "table": return /* @__PURE__ */
|
|
291
|
+
case "table": return /* @__PURE__ */ f(Re, {
|
|
291
292
|
...t,
|
|
292
293
|
data: e
|
|
293
294
|
});
|
|
294
|
-
case "pivot_table": return /* @__PURE__ */
|
|
295
|
+
case "pivot_table": return /* @__PURE__ */ f(ze, {
|
|
295
296
|
...t,
|
|
296
297
|
data: e
|
|
297
298
|
});
|
|
298
|
-
case "gauge": return /* @__PURE__ */
|
|
299
|
+
case "gauge": return /* @__PURE__ */ f(Be, {
|
|
299
300
|
...t,
|
|
300
301
|
data: e
|
|
301
302
|
});
|
|
302
|
-
case "progress": return /* @__PURE__ */
|
|
303
|
+
case "progress": return /* @__PURE__ */ f(Ve, {
|
|
303
304
|
...t,
|
|
304
305
|
data: e
|
|
305
306
|
});
|
|
306
|
-
case "list": return /* @__PURE__ */
|
|
307
|
+
case "list": return /* @__PURE__ */ f(He, {
|
|
307
308
|
...t,
|
|
308
309
|
data: e
|
|
309
310
|
});
|
|
310
|
-
case "heatmap": return /* @__PURE__ */
|
|
311
|
+
case "heatmap": return /* @__PURE__ */ f(Ue, {
|
|
311
312
|
...t,
|
|
312
313
|
data: e
|
|
313
314
|
});
|
|
314
|
-
case "retention": return /* @__PURE__ */
|
|
315
|
+
case "retention": return /* @__PURE__ */ f(We, {
|
|
315
316
|
...t,
|
|
316
317
|
data: e
|
|
317
318
|
});
|
|
318
|
-
case "calendar": return /* @__PURE__ */
|
|
319
|
+
case "calendar": return /* @__PURE__ */ f(Ge, {
|
|
319
320
|
...t,
|
|
320
321
|
data: e
|
|
321
322
|
});
|
|
322
|
-
case "timeline": return /* @__PURE__ */
|
|
323
|
+
case "timeline": return /* @__PURE__ */ f(qe, {
|
|
323
324
|
...t,
|
|
324
325
|
data: e
|
|
325
326
|
});
|
|
326
|
-
case "kanban": return /* @__PURE__ */
|
|
327
|
+
case "kanban": return /* @__PURE__ */ f(Ke, {
|
|
327
328
|
...t,
|
|
328
329
|
data: e
|
|
329
330
|
});
|
|
330
|
-
case "form": return /* @__PURE__ */
|
|
331
|
+
case "form": return /* @__PURE__ */ f($e, {
|
|
331
332
|
...t,
|
|
332
333
|
data: e
|
|
333
334
|
});
|
|
334
|
-
case "text": return /* @__PURE__ */
|
|
335
|
+
case "text": return /* @__PURE__ */ f(Ye, {
|
|
335
336
|
...t,
|
|
336
337
|
data: e
|
|
337
338
|
});
|
|
338
|
-
case "iframe": return /* @__PURE__ */
|
|
339
|
+
case "iframe": return /* @__PURE__ */ f(Ze, {
|
|
339
340
|
...t,
|
|
340
341
|
data: e
|
|
341
342
|
});
|
|
342
|
-
case "map": return /* @__PURE__ */
|
|
343
|
+
case "map": return /* @__PURE__ */ f(Xe, {
|
|
343
344
|
...t,
|
|
344
345
|
data: e
|
|
345
346
|
});
|
|
346
|
-
case "custom": return /* @__PURE__ */
|
|
347
|
+
case "custom": return /* @__PURE__ */ f(Qe, {
|
|
347
348
|
...t,
|
|
348
349
|
data: e
|
|
349
350
|
});
|
|
350
|
-
default: return
|
|
351
|
+
default: return s || /* @__PURE__ */ f(pe, { widgetType: o.type });
|
|
351
352
|
}
|
|
352
353
|
}, [
|
|
354
|
+
o,
|
|
355
|
+
q,
|
|
353
356
|
s,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
X,
|
|
357
|
-
Rt,
|
|
357
|
+
Y,
|
|
358
|
+
Wt,
|
|
358
359
|
S,
|
|
359
360
|
w,
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
]),
|
|
364
|
-
if (
|
|
365
|
-
if (
|
|
366
|
-
error:
|
|
367
|
-
onRetry:
|
|
361
|
+
R,
|
|
362
|
+
z,
|
|
363
|
+
$
|
|
364
|
+
]), qt = () => {
|
|
365
|
+
if (R) return /* @__PURE__ */ f(de, {});
|
|
366
|
+
if (z) return /* @__PURE__ */ f(fe, {
|
|
367
|
+
error: z,
|
|
368
|
+
onRetry: h
|
|
368
369
|
});
|
|
369
|
-
if (
|
|
370
|
-
widgetType:
|
|
370
|
+
if (Ut && !s) return /* @__PURE__ */ f(pe, {
|
|
371
|
+
widgetType: o.type,
|
|
371
372
|
hideEditHint: b,
|
|
372
|
-
hasDataSource:
|
|
373
|
-
compact: (
|
|
374
|
-
templateSlot: typeof
|
|
373
|
+
hasDataSource: j,
|
|
374
|
+
compact: (o.position?.height ?? o.positionHeight ?? 4) <= 2,
|
|
375
|
+
templateSlot: typeof o.metadata?.templateDataSinkSlot == "string" ? o.metadata.templateDataSinkSlot : null
|
|
375
376
|
});
|
|
376
|
-
let e = `${
|
|
377
|
-
return /* @__PURE__ */
|
|
378
|
-
widgetId:
|
|
379
|
-
widgetType:
|
|
380
|
-
widgetTitle:
|
|
377
|
+
let e = `${A.source.kind}|${A.source.ref ?? ""}|${A.parserId ?? ""}|${o.updatedAt ?? ""}`;
|
|
378
|
+
return /* @__PURE__ */ f(me, {
|
|
379
|
+
widgetId: o.id,
|
|
380
|
+
widgetType: o.type,
|
|
381
|
+
widgetTitle: o.title,
|
|
381
382
|
resetKey: e,
|
|
382
|
-
children:
|
|
383
|
-
fallback: /* @__PURE__ */
|
|
384
|
-
children:
|
|
383
|
+
children: s ?? /* @__PURE__ */ f(a, {
|
|
384
|
+
fallback: /* @__PURE__ */ f(de, {}),
|
|
385
|
+
children: Kt()
|
|
385
386
|
})
|
|
386
387
|
});
|
|
387
388
|
};
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
-
ref:
|
|
390
|
-
...b ? {} :
|
|
389
|
+
return /* @__PURE__ */ Pe("div", {
|
|
390
|
+
ref: V,
|
|
391
|
+
...b ? {} : Ae(o.dashboardId, o.id),
|
|
391
392
|
className: `
|
|
392
393
|
group relative flex flex-col
|
|
393
394
|
h-full w-full min-w-0
|
|
@@ -397,82 +398,83 @@ var h = c(function({ widget: s, children: c, data: m, className: h = "", isLoadi
|
|
|
397
398
|
${x.animationsEnabled ? "motion-safe:transition-[box-shadow,border-color] motion-safe:duration-200" : ""}
|
|
398
399
|
${w && S ? "border-[var(--color-action-primary-border)] ring-2 ring-[var(--color-action-primary-border)]/30 shadow-[var(--shadow-elevation-2)]" : x.showWidgetBorders ? "border-[var(--color-border-subtle)] hover:border-action-primary-bg hover:shadow-[var(--shadow-elevation-2)]" : "border-transparent"}
|
|
399
400
|
${S ? "cursor-pointer" : ""}
|
|
400
|
-
${
|
|
401
|
+
${m}
|
|
401
402
|
`,
|
|
402
|
-
onMouseDown:
|
|
403
|
-
onClick:
|
|
404
|
-
onKeyDown:
|
|
403
|
+
onMouseDown: Lt,
|
|
404
|
+
onClick: Rt,
|
|
405
|
+
onKeyDown: zt,
|
|
405
406
|
tabIndex: S ? 0 : -1,
|
|
406
407
|
role: S ? "button" : void 0,
|
|
407
408
|
"aria-selected": w,
|
|
408
|
-
"aria-label": `Widget: ${
|
|
409
|
-
"data-widget-id":
|
|
410
|
-
"data-widget-type":
|
|
409
|
+
"aria-label": `Widget: ${o.title}`,
|
|
410
|
+
"data-widget-id": o.id,
|
|
411
|
+
"data-widget-type": o.type,
|
|
411
412
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
widget:
|
|
413
|
+
/* @__PURE__ */ f(le, {
|
|
414
|
+
widget: o,
|
|
414
415
|
previewOnly: b,
|
|
415
|
-
definition:
|
|
416
|
+
definition: gt,
|
|
416
417
|
isSelected: w,
|
|
417
418
|
isEditMode: S,
|
|
418
|
-
isLoading:
|
|
419
|
-
isSampleData:
|
|
420
|
-
timeUntilRefresh:
|
|
421
|
-
hasDrilldown:
|
|
422
|
-
onRefresh:
|
|
423
|
-
onExportCSV:
|
|
424
|
-
onExportPNG:
|
|
425
|
-
onDrilldown:
|
|
426
|
-
onToggleComments: b ? void 0 :
|
|
427
|
-
commentsOpen:
|
|
428
|
-
commentCount:
|
|
429
|
-
onExplain: b ? void 0 :
|
|
430
|
-
explainOpen:
|
|
431
|
-
onSpotOutliers:
|
|
419
|
+
isLoading: R,
|
|
420
|
+
isSampleData: Ct,
|
|
421
|
+
timeUntilRefresh: o.refreshInterval && !yt ? re(vt) : void 0,
|
|
422
|
+
hasDrilldown: J,
|
|
423
|
+
onRefresh: h,
|
|
424
|
+
onExportCSV: Tt ? Mt : void 0,
|
|
425
|
+
onExportPNG: Nt,
|
|
426
|
+
onDrilldown: Y ? () => Y() : void 0,
|
|
427
|
+
onToggleComments: b ? void 0 : St,
|
|
428
|
+
commentsOpen: H,
|
|
429
|
+
commentCount: W ? xt : void 0,
|
|
430
|
+
onExplain: b ? void 0 : ct,
|
|
431
|
+
explainOpen: y,
|
|
432
|
+
onSpotOutliers: Et.length > 0 ? () => Ot(!0) : void 0,
|
|
433
|
+
onReconcile: jt ? () => At(!0) : void 0
|
|
432
434
|
}),
|
|
433
|
-
|
|
434
|
-
|
|
435
|
+
y && lt,
|
|
436
|
+
wt.length > 0 && /* @__PURE__ */ f("div", {
|
|
435
437
|
role: "status",
|
|
436
438
|
"data-testid": "widget-filter-not-applicable",
|
|
437
439
|
className: "mx-3 mt-2 rounded bg-status-warning-bg-subtle px-2 py-1 text-xs text-status-warning-text",
|
|
438
|
-
children:
|
|
440
|
+
children: wt.map((e) => ft("bigconsole.widget.filterNotApplicable", "Filter '{{name}}' does not apply to this widget (no field '{{field}}')", {
|
|
439
441
|
name: e.name,
|
|
440
442
|
field: e.field
|
|
441
443
|
})).join(" ")
|
|
442
444
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ f("div", {
|
|
444
446
|
className: `
|
|
445
447
|
flex-1 overflow-hidden min-h-0 min-w-0
|
|
446
448
|
${x.compactMode ? "p-2" : "p-3 sm:p-4"}
|
|
447
|
-
${
|
|
449
|
+
${Z && !S ? "cursor-pointer" : ""}
|
|
448
450
|
`,
|
|
449
|
-
title:
|
|
450
|
-
children: /* @__PURE__ */
|
|
451
|
+
title: Z && !S ? "Click data to drill down" : void 0,
|
|
452
|
+
children: /* @__PURE__ */ f("div", {
|
|
451
453
|
className: "h-full min-w-0 overflow-auto",
|
|
452
|
-
children:
|
|
454
|
+
children: qt()
|
|
453
455
|
})
|
|
454
456
|
}),
|
|
455
|
-
|
|
457
|
+
g && g.length > 0 && !R && !z && /* @__PURE__ */ f("div", {
|
|
456
458
|
className: "min-w-0 border-t border-[var(--color-border-subtle)] bg-bg-sunken px-3 py-2 sm:px-4",
|
|
457
459
|
style: { flexShrink: 0 },
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
-
actions:
|
|
460
|
-
context:
|
|
461
|
-
onAction:
|
|
460
|
+
children: /* @__PURE__ */ f(ke, {
|
|
461
|
+
actions: g,
|
|
462
|
+
context: Gt,
|
|
463
|
+
onAction: _,
|
|
462
464
|
disabled: S,
|
|
463
465
|
layout: "horizontal",
|
|
464
466
|
size: "sm"
|
|
465
467
|
})
|
|
466
468
|
}),
|
|
467
|
-
|
|
469
|
+
Z && !S && /* @__PURE__ */ f("div", {
|
|
468
470
|
className: "\n absolute bottom-2 right-2\n opacity-0 group-hover:opacity-100\n transition-opacity duration-200\n ",
|
|
469
471
|
title: "Click to drill down",
|
|
470
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ f("svg", {
|
|
471
473
|
className: "w-4 h-4 text-text-secondary",
|
|
472
474
|
fill: "none",
|
|
473
475
|
stroke: "currentColor",
|
|
474
476
|
viewBox: "0 0 24 24",
|
|
475
|
-
children: /* @__PURE__ */
|
|
477
|
+
children: /* @__PURE__ */ f("path", {
|
|
476
478
|
strokeLinecap: "round",
|
|
477
479
|
strokeLinejoin: "round",
|
|
478
480
|
strokeWidth: 2,
|
|
@@ -480,20 +482,28 @@ var h = c(function({ widget: s, children: c, data: m, className: h = "", isLoadi
|
|
|
480
482
|
})
|
|
481
483
|
})
|
|
482
484
|
}),
|
|
483
|
-
|
|
485
|
+
H && /* @__PURE__ */ f(a, {
|
|
484
486
|
fallback: null,
|
|
485
|
-
children: /* @__PURE__ */
|
|
486
|
-
widgetId:
|
|
487
|
-
onClose: () =>
|
|
487
|
+
children: /* @__PURE__ */ f(rt, {
|
|
488
|
+
widgetId: o.id,
|
|
489
|
+
onClose: () => U(!1)
|
|
488
490
|
})
|
|
489
491
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
open:
|
|
492
|
-
onClose: () =>
|
|
493
|
-
widgetTitle:
|
|
494
|
-
series:
|
|
492
|
+
/* @__PURE__ */ f(Se, {
|
|
493
|
+
open: Dt,
|
|
494
|
+
onClose: () => Ot(!1),
|
|
495
|
+
widgetTitle: o.title,
|
|
496
|
+
series: Et
|
|
497
|
+
}),
|
|
498
|
+
kt && /* @__PURE__ */ f(a, {
|
|
499
|
+
fallback: null,
|
|
500
|
+
children: /* @__PURE__ */ f(Fe, {
|
|
501
|
+
open: kt,
|
|
502
|
+
onClose: () => At(!1),
|
|
503
|
+
widget: o
|
|
504
|
+
})
|
|
495
505
|
})
|
|
496
506
|
]
|
|
497
507
|
});
|
|
498
|
-
},
|
|
499
|
-
export {
|
|
508
|
+
}, p);
|
|
509
|
+
export { m as WidgetWrapper, m as default };
|