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