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