@burdenoff/microfe-bigconsole 2026.1119.1 → 2026.1119.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/bigconsole/asof/AsOfBanner.js +28 -14
  2. package/dist/bigconsole/asof/AsOfControl.js +84 -16
  3. package/dist/bigconsole/asof/AsOfProvider.d.ts +7 -0
  4. package/dist/bigconsole/asof/AsOfProvider.js +74 -52
  5. package/dist/bigconsole/asof/index.d.ts +1 -1
  6. package/dist/bigconsole/asof/index.js +4 -4
  7. package/dist/bigconsole/compare/compareEngine.d.ts +104 -0
  8. package/dist/bigconsole/compare/compareEngine.js +172 -0
  9. package/dist/bigconsole/compare/compareParam.d.ts +9 -0
  10. package/dist/bigconsole/compare/compareParam.js +13 -0
  11. package/dist/bigconsole/compare/compareSide.d.ts +5 -0
  12. package/dist/bigconsole/compare/compareSide.js +39 -0
  13. package/dist/bigconsole/compare/index.d.ts +3 -0
  14. package/dist/bigconsole/components/widgets/WidgetCompareView.d.ts +12 -0
  15. package/dist/bigconsole/components/widgets/WidgetCompareView.js +215 -0
  16. package/dist/bigconsole/components/widgets/WidgetWrapper.js +371 -322
  17. package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +47 -148
  18. package/dist/bigconsole/components/widgets/metric-card/metricData.d.ts +23 -0
  19. package/dist/bigconsole/components/widgets/metric-card/metricData.js +105 -0
  20. package/dist/bigconsole/components/widgets/table/TableCell.d.ts +2 -1
  21. package/dist/bigconsole/components/widgets/table/TableCell.js +1 -1
  22. package/dist/bigconsole/components/widgets/table/TableWidget.js +142 -168
  23. package/dist/bigconsole/components/widgets/table/tableRows.d.ts +17 -0
  24. package/dist/bigconsole/components/widgets/table/tableRows.js +35 -0
  25. package/dist/bigconsole/hooks/index.d.ts +1 -0
  26. package/dist/bigconsole/hooks/index.js +25 -24
  27. package/dist/bigconsole/hooks/useWidgetCompareData.d.ts +8 -0
  28. package/dist/bigconsole/hooks/useWidgetCompareData.js +24 -0
  29. package/dist/bigconsole/utils/widgetDisplayData.d.ts +10 -0
  30. package/dist/bigconsole/utils/widgetDisplayData.js +8 -1
  31. package/package.json +1 -1
@@ -3,61 +3,66 @@ 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 { GetDashboardDocument as ne } from "../../../generated/wspace-operations.js";
7
- import { formatTimeUntilRefresh as re, useWidgetAutoRefresh as ie } from "../../hooks/useAutoRefresh.js";
8
- import ae from "../../hooks/useWidgetComments.js";
9
- import oe from "../../hooks/useWidgetExport.js";
10
- import se from "../../hooks/useDrilldown.js";
11
- import { getWidgetDefinition as ce } from "./WidgetRegistry.js";
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";
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";
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";
18
20
  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";
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";
28
+ import { hasCustomIframeConfig as xe, hasRenderableCustomConfig as Se } from "./custom/config.js";
29
+ import { getBindingForWidget as Ce } from "../../utils/widgetBinding.js";
30
+ import { filterMetaFromDashboard as we, findInapplicableFilters as Te } from "../../utils/globalFilterMatching.js";
31
+ 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
38
  import "./widget-actions/index.js";
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";
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";
39
44
  // src/bigconsole/components/widgets/WidgetWrapper.tsx
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([
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([
43
48
  "text",
44
49
  "iframe",
45
50
  "form",
46
51
  "adaptive_card"
47
52
  ]);
48
- function x(e, t) {
53
+ function dt(e, t) {
49
54
  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
55
  }
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,
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,
55
60
  fetchPolicy: "cache-only"
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(() => {
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(() => {
61
66
  if (typeof window > "u") return {};
62
67
  let e = new URLSearchParams(window.location.search), t = {};
63
68
  return e.forEach((e, n) => {
@@ -66,107 +71,132 @@ var S = p(function({ widget: s, children: f, data: p, className: x = "", isLoadi
66
71
  r.startsWith("__") || (t[r] = e);
67
72
  }
68
73
  }), t;
69
- }, []), H = h(() => {
74
+ }, []), I = f(() => {
70
75
  let e = {};
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;
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;
72
77
  }, [
73
- V,
74
78
  F,
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
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
98
103
  }), [
99
- p,
100
- B,
101
- s,
102
- lt,
103
- ut,
104
- z
105
- ]), q = h(() => {
106
- let e = K.data;
107
- if (e && typeof e == "object" && !Array.isArray(e)) {
108
- let t = s.config, n = t?.dataKey ?? t?.dataPath ?? t?.seriesPath;
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,
104
+ u,
105
+ P,
106
+ a,
107
+ St,
108
+ 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, [
122
118
  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
119
  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
127
+ }) : e, [
128
+ 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,
137
+ config: e,
138
+ from: _e(P, e, K),
139
+ to: _e(G.data, e, K)
140
+ });
141
+ }, [
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")
151
+ }), [
152
+ M,
153
+ N,
154
+ D
155
+ ]), Bt = U !== null && V.isSample, Vt = f(() => ut.has(a.type) ? [] : Te(H, O, I, a.type), [
128
156
  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, {
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, {
133
163
  xAxisKey: typeof e?.xAxisKey == "string" ? e.xAxisKey : void 0,
134
164
  selectedFields: Array.isArray(e?.selectedFields) ? e.selectedFields.filter((e) => typeof e == "string") : void 0
135
165
  });
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;
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;
147
177
  let t = {
148
178
  selectedData: e || {},
149
- globalFilters: F || {},
150
- widgetData: J || {},
179
+ globalFilters: E || {},
180
+ widgetData: U || {},
151
181
  metadata: {
152
- widgetId: s.id,
153
- widgetType: s.type,
154
- widgetTitle: s.title
182
+ widgetId: a.id,
183
+ widgetType: a.type,
184
+ widgetTitle: a.title
155
185
  },
156
- sourceDashboardId: s.dashboardId
186
+ sourceDashboardId: a.dashboardId
157
187
  };
158
- Rt(s.drilldown, t);
188
+ Xt(a.drilldown, t);
159
189
  }, [
160
- s,
161
- J,
162
- F,
163
- Rt
164
- ]), X = Y && !M && !z ? Bt : void 0, Z = g(null), Vt = m((e) => {
190
+ a,
191
+ U,
192
+ E,
193
+ Xt
194
+ ]), X = Y && !C && !M ? Qt : void 0, Z = p(null), $t = d((e) => {
165
195
  Z.current = {
166
196
  x: e.clientX,
167
197
  y: e.clientY
168
198
  };
169
- }, []), Ht = m((e) => {
199
+ }, []), en = d((e) => {
170
200
  if (e.stopPropagation(), Z.current) {
171
201
  let t = Math.abs(e.clientX - Z.current.x), n = Math.abs(e.clientY - Z.current.y);
172
202
  if (t > 5 || n > 5) {
@@ -174,51 +204,51 @@ var S = p(function({ widget: s, children: f, data: p, className: x = "", isLoadi
174
204
  return;
175
205
  }
176
206
  }
177
- Z.current = null, M && N(s.id);
207
+ Z.current = null, C && w(a.id);
178
208
  }, [
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));
209
+ C,
210
+ w,
211
+ a.id
212
+ ]), tn = d((e) => {
213
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), C && w(a.id));
184
214
  }, [
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);
215
+ C,
216
+ 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);
199
229
  }, [
200
- D,
201
- E,
202
- z
203
- ]), Qt = m(() => {
230
+ y,
231
+ v,
232
+ M
233
+ ]), dn = d(() => {
204
234
  let e = (() => {
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;
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;
209
239
  }
210
- if (s.type === "list") {
211
- if (Array.isArray(J)) return J;
212
- if (J && typeof J == "object" && "items" in J) return J.items;
240
+ if (a.type === "list") {
241
+ if (Array.isArray(U)) return U;
242
+ if (U && typeof U == "object" && "items" in U) return U.items;
213
243
  }
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;
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;
217
247
  }
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;
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;
222
252
  if (e.labels && e.datasets) return e.labels.map((t, n) => {
223
253
  let r = { name: t };
224
254
  return e.datasets?.forEach((e) => {
@@ -227,276 +257,295 @@ var S = p(function({ widget: s, children: f, data: p, className: x = "", isLoadi
227
257
  });
228
258
  }
229
259
  }
230
- if (s.type === "text") {
231
- let e = i(s.config, J);
260
+ if (a.type === "text") {
261
+ let e = ue(a.config, U);
232
262
  return {
233
263
  content: e.content,
234
264
  format: e.format,
235
265
  alignment: e.alignment
236
266
  };
237
267
  }
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;
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;
242
272
  if (e in t) return {
243
273
  value: t[e],
244
- label: s.title,
274
+ label: a.title,
245
275
  data: t
246
276
  };
247
277
  }
248
278
  }
249
- return J;
279
+ return U;
250
280
  })(), t = {
251
- widget: s,
281
+ widget: a,
252
282
  onDrilldown: X
253
283
  };
254
- if (Yt) {
284
+ if (cn) {
255
285
  let e = {};
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;
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;
258
288
  if (t && t in e) {
259
289
  let n = e[t], r = typeof n == "number" ? n.toLocaleString() : String(n);
260
290
  e = {
261
291
  ...e,
262
292
  value: n,
263
293
  title: e.title || r,
264
- description: e.description || s.title || "",
294
+ description: e.description || a.title || "",
265
295
  text: e.text || r
266
296
  };
267
297
  }
268
298
  }
269
- return /* @__PURE__ */ y(Te, {
270
- widget: s,
299
+ return /* @__PURE__ */ h(Pe, {
300
+ widget: a,
271
301
  data: e,
272
- isEditMode: M,
273
- isSelected: P,
274
- isLoading: U,
275
- error: W,
302
+ isEditMode: C,
303
+ isSelected: T,
304
+ isLoading: R,
305
+ error: z,
276
306
  onDrilldown: X,
277
- onAction: z ? void 0 : Zt
307
+ onAction: M ? void 0 : un
278
308
  });
279
309
  }
280
- switch (s.type?.toLowerCase() || "") {
281
- case "metric_card": return /* @__PURE__ */ y(je, {
310
+ switch (a.type?.toLowerCase() || "") {
311
+ case "metric_card": return /* @__PURE__ */ h(He, {
282
312
  ...t,
283
313
  data: e
284
314
  });
285
- case "kpi_card_comparison": return /* @__PURE__ */ y(Ue, {
315
+ case "kpi_card_comparison": return /* @__PURE__ */ h(et, {
286
316
  ...t,
287
317
  data: e
288
318
  });
289
319
  case "chart":
290
- case "funnel_chart": return /* @__PURE__ */ y(Me, {
320
+ case "funnel_chart": return /* @__PURE__ */ h(Ue, {
291
321
  ...t,
292
322
  data: e
293
323
  });
294
- case "waterfall": return /* @__PURE__ */ y(Ze, {
324
+ case "waterfall": return /* @__PURE__ */ h(ct, {
295
325
  ...t,
296
326
  data: e
297
327
  });
298
- case "sankey": return /* @__PURE__ */ y(Ye, {
328
+ case "sankey": return /* @__PURE__ */ h(ot, {
299
329
  ...t,
300
330
  data: e
301
331
  });
302
- case "box_plot": return /* @__PURE__ */ y(Xe, {
332
+ case "box_plot": return /* @__PURE__ */ h(st, {
303
333
  ...t,
304
334
  data: e
305
335
  });
306
- case "table": return /* @__PURE__ */ y(Ne, {
336
+ case "table": return /* @__PURE__ */ h(We, {
307
337
  ...t,
308
338
  data: e
309
339
  });
310
- case "pivot_table": return /* @__PURE__ */ y(Pe, {
340
+ case "pivot_table": return /* @__PURE__ */ h(Ge, {
311
341
  ...t,
312
342
  data: e
313
343
  });
314
- case "gauge": return /* @__PURE__ */ y(Fe, {
344
+ case "gauge": return /* @__PURE__ */ h(Ke, {
315
345
  ...t,
316
346
  data: e
317
347
  });
318
- case "progress": return /* @__PURE__ */ y(Ie, {
348
+ case "progress": return /* @__PURE__ */ h(qe, {
319
349
  ...t,
320
350
  data: e
321
351
  });
322
- case "list": return /* @__PURE__ */ y(Le, {
352
+ case "list": return /* @__PURE__ */ h(Je, {
323
353
  ...t,
324
354
  data: e
325
355
  });
326
- case "heatmap": return /* @__PURE__ */ y(Re, {
356
+ case "heatmap": return /* @__PURE__ */ h(Ye, {
327
357
  ...t,
328
358
  data: e
329
359
  });
330
- case "retention": return /* @__PURE__ */ y(ze, {
360
+ case "retention": return /* @__PURE__ */ h(Xe, {
331
361
  ...t,
332
362
  data: e
333
363
  });
334
- case "calendar": return /* @__PURE__ */ y(Be, {
364
+ case "calendar": return /* @__PURE__ */ h(Ze, {
335
365
  ...t,
336
366
  data: e
337
367
  });
338
- case "timeline": return /* @__PURE__ */ y(He, {
368
+ case "timeline": return /* @__PURE__ */ h($e, {
339
369
  ...t,
340
370
  data: e
341
371
  });
342
- case "kanban": return /* @__PURE__ */ y(Ve, {
372
+ case "kanban": return /* @__PURE__ */ h(Qe, {
343
373
  ...t,
344
374
  data: e
345
375
  });
346
- case "form": return /* @__PURE__ */ y(Je, {
376
+ case "form": return /* @__PURE__ */ h(at, {
347
377
  ...t,
348
378
  data: e
349
379
  });
350
- case "text": return /* @__PURE__ */ y(We, {
380
+ case "text": return /* @__PURE__ */ h(tt, {
351
381
  ...t,
352
382
  data: e
353
383
  });
354
- case "iframe": return /* @__PURE__ */ y(Ke, {
384
+ case "iframe": return /* @__PURE__ */ h(rt, {
355
385
  ...t,
356
386
  data: e
357
387
  });
358
- case "map": return /* @__PURE__ */ y(Ge, {
388
+ case "map": return /* @__PURE__ */ h(nt, {
359
389
  ...t,
360
390
  data: e
361
391
  });
362
- case "custom": return /* @__PURE__ */ y(qe, {
392
+ case "custom": return /* @__PURE__ */ h(it, {
363
393
  ...t,
364
394
  data: e
365
395
  });
366
- default: return f || /* @__PURE__ */ y(u, { widgetType: s.type });
396
+ default: return l || /* @__PURE__ */ h(ye, { widgetType: a.type });
367
397
  }
368
398
  }, [
369
- s,
370
- J,
371
- f,
372
- X,
373
- Yt,
374
- M,
375
- P,
399
+ a,
376
400
  U,
377
- W,
378
- Zt
379
- ]), $t = () => {
380
- if (z && Kt) {
381
- let e = o({
401
+ l,
402
+ X,
403
+ cn,
404
+ C,
405
+ T,
406
+ R,
407
+ z,
408
+ un,
409
+ M
410
+ ]), fn = () => {
411
+ if (M && an) {
412
+ let e = i({
382
413
  historyAvailable: !1,
383
414
  reason: "HISTORY_NOT_AVAILABLE"
384
- }, I);
385
- return /* @__PURE__ */ y(l, { error: e ?? "" });
415
+ }, D);
416
+ return /* @__PURE__ */ h(s, { error: e ?? "" });
417
+ }
418
+ if (M && N && !ge(a.type)) return /* @__PURE__ */ h(ve, {
419
+ result: {
420
+ kind: "unsupported",
421
+ widgetType: a.type
422
+ },
423
+ fromLabel: q.from,
424
+ toLabel: q.to
425
+ });
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
434
+ });
386
435
  }
387
- if (U) return /* @__PURE__ */ y(c, {});
388
- if (W) return /* @__PURE__ */ y(l, {
389
- error: W,
390
- onRetry: z ? void 0 : w
436
+ if (R) return /* @__PURE__ */ h(o, {});
437
+ if (z) return /* @__PURE__ */ h(s, {
438
+ error: z,
439
+ onRetry: M ? void 0 : _
391
440
  });
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
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
398
447
  });
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,
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,
404
453
  resetKey: e,
405
- children: f ?? /* @__PURE__ */ y(d, {
406
- fallback: /* @__PURE__ */ y(c, {}),
407
- children: Qt()
454
+ children: l ?? /* @__PURE__ */ h(c, {
455
+ fallback: /* @__PURE__ */ h(o, {}),
456
+ children: dn()
408
457
  })
409
458
  });
410
459
  };
411
- return /* @__PURE__ */ b("div", {
412
- ref: bt,
413
- ...A ? {} : De(s.dashboardId, s.id),
460
+ return /* @__PURE__ */ Be("div", {
461
+ ref: Mt,
462
+ ...x ? {} : Ie(a.dashboardId, a.id),
414
463
  className: `
415
464
  group relative flex flex-col
416
465
  h-full w-full min-w-0
417
466
  rounded-card border
418
467
  bg-bg-surface
419
468
  shadow-[var(--shadow-elevation-1)]
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}
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}
424
473
  `,
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,
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,
434
483
  children: [
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,
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,
444
493
  hasDrilldown: Y,
445
- onRefresh: z ? void 0 : w,
446
- onExportCSV: kt ? It : void 0,
447
- onExportPNG: Lt,
494
+ onRefresh: M ? void 0 : _,
495
+ onExportCSV: Ht ? Jt : void 0,
496
+ onExportPNG: Yt,
448
497
  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
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
456
505
  }),
457
- k && !z && tt,
458
- Ot.length > 0 && /* @__PURE__ */ y("div", {
506
+ ht && !M && gt,
507
+ Vt.length > 0 && /* @__PURE__ */ h("div", {
459
508
  role: "status",
460
509
  "data-testid": "widget-filter-not-applicable",
461
510
  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}}')", {
511
+ children: Vt.map((e) => D("bigconsole.widget.filterNotApplicable", "Filter '{{name}}' does not apply to this widget (no field '{{field}}')", {
463
512
  name: e.name,
464
513
  field: e.field
465
514
  })).join(" ")
466
515
  }),
467
- /* @__PURE__ */ y("div", {
516
+ /* @__PURE__ */ h("div", {
468
517
  className: `
469
518
  flex-1 overflow-hidden min-h-0 min-w-0
470
- ${j.compactMode ? "p-2" : "p-3 sm:p-4"}
471
- ${Q && !M ? "cursor-pointer" : ""}
519
+ ${S.compactMode ? "p-2" : "p-3 sm:p-4"}
520
+ ${Q && !C ? "cursor-pointer" : ""}
472
521
  `,
473
- title: Q && !M ? "Click data to drill down" : void 0,
474
- children: /* @__PURE__ */ y("div", {
522
+ title: Q && !C ? "Click data to drill down" : void 0,
523
+ children: /* @__PURE__ */ h("div", {
475
524
  className: "h-full min-w-0 overflow-auto",
476
- children: $t()
525
+ children: fn()
477
526
  })
478
527
  }),
479
- E && E.length > 0 && !U && !W && !z && /* @__PURE__ */ y("div", {
528
+ v && v.length > 0 && !R && !z && !M && /* @__PURE__ */ h("div", {
480
529
  className: "min-w-0 border-t border-[var(--color-border-subtle)] bg-bg-sunken px-3 py-2 sm:px-4",
481
530
  style: { flexShrink: 0 },
482
- children: /* @__PURE__ */ y(Ee, {
483
- actions: E,
484
- context: Xt,
485
- onAction: D,
486
- disabled: M,
531
+ children: /* @__PURE__ */ h(Fe, {
532
+ actions: v,
533
+ context: ln,
534
+ onAction: y,
535
+ disabled: C,
487
536
  layout: "horizontal",
488
537
  size: "sm"
489
538
  })
490
539
  }),
491
- Q && !M && /* @__PURE__ */ y("div", {
540
+ Q && !C && /* @__PURE__ */ h("div", {
492
541
  className: "\n absolute bottom-2 right-2\n opacity-0 group-hover:opacity-100\n transition-opacity duration-200\n ",
493
542
  title: "Click to drill down",
494
- children: /* @__PURE__ */ y("svg", {
543
+ children: /* @__PURE__ */ h("svg", {
495
544
  className: "w-4 h-4 text-text-secondary",
496
545
  fill: "none",
497
546
  stroke: "currentColor",
498
547
  viewBox: "0 0 24 24",
499
- children: /* @__PURE__ */ y("path", {
548
+ children: /* @__PURE__ */ h("path", {
500
549
  strokeLinecap: "round",
501
550
  strokeLinejoin: "round",
502
551
  strokeWidth: 2,
@@ -504,66 +553,66 @@ var S = p(function({ widget: s, children: f, data: p, className: x = "", isLoadi
504
553
  })
505
554
  })
506
555
  }),
507
- xt && /* @__PURE__ */ y(d, {
556
+ Nt && /* @__PURE__ */ h(c, {
508
557
  fallback: null,
509
- children: /* @__PURE__ */ y(Qe, {
510
- widgetId: s.id,
511
- onClose: () => St(!1)
558
+ children: /* @__PURE__ */ h(lt, {
559
+ widgetId: a.id,
560
+ onClose: () => Pt(!1)
512
561
  })
513
562
  }),
514
- /* @__PURE__ */ y(ye, {
515
- open: jt,
516
- onClose: () => Mt(!1),
517
- widgetTitle: s.title,
518
- series: At
563
+ /* @__PURE__ */ h(Oe, {
564
+ open: Wt,
565
+ onClose: () => J(!1),
566
+ widgetTitle: a.title,
567
+ series: Ut
519
568
  }),
520
- Nt && !z && /* @__PURE__ */ y(d, {
569
+ Gt && !M && /* @__PURE__ */ h(c, {
521
570
  fallback: null,
522
- children: /* @__PURE__ */ y(Ae, {
523
- open: Nt,
524
- onClose: () => Pt(!1),
525
- widget: s
571
+ children: /* @__PURE__ */ h(Ve, {
572
+ open: Gt,
573
+ onClose: () => Kt(!1),
574
+ widget: a
526
575
  })
527
576
  })
528
577
  ]
529
578
  });
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", {
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", {
533
582
  className: "float-right ml-2",
534
- children: /* @__PURE__ */ y(s, {
583
+ children: /* @__PURE__ */ h(a, {
535
584
  widget: e,
536
585
  isEditMode: !0
537
586
  })
538
587
  }) : null;
539
588
  }
540
- function T({ title: e }) {
541
- let { t } = v(), n = o({
589
+ function pt({ title: e }) {
590
+ let { t } = Re(), n = i({
542
591
  historyAvailable: !1,
543
592
  reason: "HISTORY_NOT_AVAILABLE"
544
593
  }, t);
545
- return /* @__PURE__ */ b("section", {
594
+ return /* @__PURE__ */ Be("section", {
546
595
  "aria-label": e ?? void 0,
547
596
  "data-testid": "saved-query-history-unavailable",
548
597
  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", {
598
+ children: [e && /* @__PURE__ */ h("h3", {
550
599
  className: "mb-2 truncate text-sm font-medium text-text-primary",
551
600
  children: e
552
- }), n && /* @__PURE__ */ y(l, { error: n })]
601
+ }), n && /* @__PURE__ */ h(s, { error: n })]
553
602
  });
554
603
  }
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", {
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", {
559
608
  role: "status",
560
609
  children: "Loading widget…"
561
610
  }),
562
- children: /* @__PURE__ */ y(C, {
611
+ children: /* @__PURE__ */ h(g, {
563
612
  id: e.widget.id,
564
613
  title: e.widget.title,
565
- controls: e.previewOnly ? void 0 : /* @__PURE__ */ y(w, { widget: e.widget })
614
+ controls: e.previewOnly ? void 0 : /* @__PURE__ */ h(_, { widget: e.widget })
566
615
  })
567
- }) : /* @__PURE__ */ y(S, { ...e });
616
+ }) : /* @__PURE__ */ h(ft, { ...e });
568
617
  };
569
- export { E as WidgetWrapper, E as default };
618
+ export { v as WidgetWrapper, v as default };