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