@burdenoff/microfe-bigconsole 2026.1123.2 → 2026.1123.4

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.
@@ -29,41 +29,42 @@ import { WidgetErrorBoundary as xe } from "./WidgetErrorBoundary.js";
29
29
  import { FilterNotAppliedNotice as Se } from "./FilterNotAppliedNotice.js";
30
30
  import { hasCustomIframeConfig as Ce, hasRenderableCustomConfig as we } from "./custom/config.js";
31
31
  import { getBindingForWidget as Te } from "../../utils/widgetBinding.js";
32
- import { filterMetaFromDashboard as Ee, findInapplicableFilters as De } from "../../utils/globalFilterMatching.js";
33
- import { applyGlobalFilters as Oe } from "../../utils/applyGlobalFilters.js";
34
- import { resolveMetricCardData as ke } from "./metric-card/metricCardData.js";
35
- import { extractOutlierSeries as Ae } from "../insights/outlierSeries.js";
36
- import { OutlierSpottingDialog as je } from "../insights/OutlierSpottingDialog.js";
37
- import { canReconcileWidget as Me } from "../reconcile/reconcileModel.js";
38
- import { canExplainKpiChange as Ne, readsAnalyzableSource as Pe } from "../kpi-change/kpiChangeModel.js";
39
- import { KpiChangeDialog as Fe } from "../kpi-change/KpiChangeDialog.js";
40
- import { resolveWidgetDataPath as Ie, resolveWidgetDisplayData as Le, widgetDataSourcePolicy as Re, widgetExportRows as ze } from "../../utils/widgetDisplayData.js";
41
- import { WidgetRendererFactory as Be } from "../../renderers/factory/WidgetRendererFactory.js";
42
- import { WidgetActions as Ve } from "./widget-actions/WidgetActions.js";
32
+ import { legacyChartToRows as Ee } from "../../utils/legacyChartRows.js";
33
+ import { filterMetaFromDashboard as De, findInapplicableFilters as Oe } from "../../utils/globalFilterMatching.js";
34
+ import { applyGlobalFilters as ke } from "../../utils/applyGlobalFilters.js";
35
+ import { resolveMetricCardData as Ae } from "./metric-card/metricCardData.js";
36
+ import { extractOutlierSeries as je } from "../insights/outlierSeries.js";
37
+ import { OutlierSpottingDialog as Me } from "../insights/OutlierSpottingDialog.js";
38
+ import { canReconcileWidget as Ne } from "../reconcile/reconcileModel.js";
39
+ import { canExplainKpiChange as Pe, readsAnalyzableSource as Fe } from "../kpi-change/kpiChangeModel.js";
40
+ import { KpiChangeDialog as Ie } from "../kpi-change/KpiChangeDialog.js";
41
+ import { resolveWidgetDataPath as Le, resolveWidgetDisplayData as Re, widgetDataSourcePolicy as ze, widgetExportRows as Be } from "../../utils/widgetDisplayData.js";
42
+ import { WidgetRendererFactory as Ve } from "../../renderers/factory/WidgetRendererFactory.js";
43
+ import { WidgetActions as He } from "./widget-actions/WidgetActions.js";
43
44
  import "./widget-actions/index.js";
44
- import { dashboardSuggestAnchorProps as He } from "../../proactive/entities.js";
45
- import { Suspense as c, lazy as l, memo as u, useCallback as d, useEffect as Ue, useMemo as f, useRef as p, useState as m } from "react";
46
- import { useI18n as We } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
47
- import { useQuery as Ge } from "@apollo/client/react";
48
- import { jsx as h, jsxs as Ke } from "react/jsx-runtime";
45
+ import { dashboardSuggestAnchorProps as Ue } from "../../proactive/entities.js";
46
+ import { Suspense as c, lazy as l, memo as u, useCallback as d, useEffect as We, useMemo as f, useRef as p, useState as m } from "react";
47
+ import { useI18n as Ge } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
48
+ import { useQuery as Ke } from "@apollo/client/react";
49
+ import { jsx as h, jsxs as qe } from "react/jsx-runtime";
49
50
  // src/bigconsole/components/widgets/WidgetWrapper.tsx
50
- var qe = l(() => import("../reconcile/KpiReconcileDialog.js").then((e) => ({ default: e.KpiReconcileDialog }))), Je = l(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), Ye = l(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), Xe = l(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), Ze = l(() => import("./pivot-table/index.js").then((e) => ({ default: e.PivotTableWidget }))), Qe = l(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), $e = l(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), et = l(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), tt = l(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), nt = l(() => import("./retention/index.js").then((e) => ({ default: e.RetentionWidget }))), rt = l(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), it = l(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), at = l(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), ot = l(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), st = l(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), ct = l(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), lt = l(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), ut = l(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget })));
51
+ var Je = l(() => import("../reconcile/KpiReconcileDialog.js").then((e) => ({ default: e.KpiReconcileDialog }))), Ye = l(() => import("./metric-card/index.js").then((e) => ({ default: e.MetricCardWidget }))), Xe = l(() => import("./chart/index.js").then((e) => ({ default: e.ChartWidget }))), Ze = l(() => import("./table/index.js").then((e) => ({ default: e.TableWidget }))), Qe = l(() => import("./pivot-table/index.js").then((e) => ({ default: e.PivotTableWidget }))), $e = l(() => import("./gauge/index.js").then((e) => ({ default: e.GaugeWidget }))), et = l(() => import("./progress/index.js").then((e) => ({ default: e.ProgressWidget }))), tt = l(() => import("./list/index.js").then((e) => ({ default: e.ListWidget }))), nt = l(() => import("./heatmap/index.js").then((e) => ({ default: e.HeatmapWidget }))), rt = l(() => import("./retention/index.js").then((e) => ({ default: e.RetentionWidget }))), it = l(() => import("./calendar/index.js").then((e) => ({ default: e.CalendarWidget }))), at = l(() => import("./kanban/index.js").then((e) => ({ default: e.KanbanWidget }))), ot = l(() => import("./timeline/index.js").then((e) => ({ default: e.TimelineWidget }))), st = l(() => import("./kpi-comparison/index.js").then((e) => ({ default: e.KPIComparisonWidget }))), ct = l(() => import("./text-widget/index.js").then((e) => ({ default: e.TextWidget }))), lt = l(() => import("./map-widget/index.js").then((e) => ({ default: e.MapWidget }))), ut = l(() => import("./iframe-widget/index.js").then((e) => ({ default: e.IframeWidget }))), dt = l(() => import("./custom/index.js").then((e) => ({ default: e.CustomWidget })));
51
52
  l(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget })));
52
- var dt = l(() => import("./form/index.js").then((e) => ({ default: e.FormWidget }))), ft = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.SankeyWidget }))), pt = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.BoxPlotWidget }))), mt = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.WaterfallWidget }))), ht = l(() => import("./comments/WidgetComments.js").then((e) => ({ default: e.WidgetComments }))), gt = /* @__PURE__ */ new Set([
53
+ var ft = l(() => import("./form/index.js").then((e) => ({ default: e.FormWidget }))), pt = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.SankeyWidget }))), mt = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.BoxPlotWidget }))), ht = l(() => import("./advanced/AdvancedWidgets.js").then((e) => ({ default: e.WaterfallWidget }))), gt = l(() => import("./comments/WidgetComments.js").then((e) => ({ default: e.WidgetComments }))), _t = /* @__PURE__ */ new Set([
53
54
  "text",
54
55
  "iframe",
55
56
  "form",
56
57
  "adaptive_card"
57
58
  ]);
58
- function _t(e, t) {
59
+ function vt(e, t) {
59
60
  return e.previewOnly === t.previewOnly && e.observeOnly === t.observeOnly && 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;
60
61
  }
61
- var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoading: vt, error: g, onRefresh: _, onDrilldown: yt, actions: v, onAction: y, filterValues: b, onToggleNarrative: bt, narrativeOpen: xt = !1, narrativePanel: St, previewOnly: x = !1, observeOnly: Ct = !1 }) {
62
- let S = he(), wt = r((e) => e.viewMode === "edit"), C = !x && wt, w = t((e) => e.selectWidget), T = e(a.id), Tt = n(a.id), E = ee(), { t: D } = We(), Et = a.dashboardId, { data: Dt } = Ge(re, {
63
- variables: { id: Et ?? "" },
64
- skip: !Et,
62
+ var yt = u(function({ widget: a, children: l, data: u, className: vt = "", isLoading: yt, error: g, onRefresh: _, onDrilldown: bt, actions: v, onAction: y, filterValues: b, onToggleNarrative: xt, narrativeOpen: St = !1, narrativePanel: Ct, previewOnly: x = !1, observeOnly: wt = !1 }) {
63
+ let S = he(), Tt = r((e) => e.viewMode === "edit"), C = !x && Tt, w = t((e) => e.selectWidget), T = e(a.id), Et = n(a.id), E = ee(), { t: D } = Ge(), Dt = a.dashboardId, { data: Ot } = Ke(re, {
64
+ variables: { id: Dt ?? "" },
65
+ skip: !Dt,
65
66
  fetchPolicy: "cache-only"
66
- }), Ot = Dt?.getDashboard?.globalFilters, O = f(() => Ee(Ot), [Ot]), k = f(() => Object.fromEntries(Object.entries(O).map(([e, t]) => [e, t.field])), [O]), A = f(() => Te(a), [a]), { hasDataSource: j, allowSamples: kt, mockSource: M } = Re(a, A), { asOf: N, compareTo: P } = pe(), { data: F, loading: At, error: jt, asOfInfo: Mt } = te(a.id, {
67
+ }), kt = Ot?.getDashboard?.globalFilters, O = f(() => De(kt), [kt]), k = f(() => Object.fromEntries(Object.entries(O).map(([e, t]) => [e, t.field])), [O]), A = f(() => Te(a), [a]), { hasDataSource: j, allowSamples: At, mockSource: M } = ze(a, A), { asOf: N, compareTo: P } = pe(), { data: F, loading: jt, error: Mt, asOfInfo: Nt } = te(a.id, {
67
68
  skip: x || !j,
68
69
  pollInterval: N ? 0 : (a.refreshInterval ?? 0) * 1e3 || 0,
69
70
  asOf: N
@@ -83,25 +84,25 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
83
84
  I,
84
85
  E,
85
86
  b
86
- ]), R = Object.keys(L).length > 0, z = vt ?? (At && !F) ?? Tt.isLoading, Nt = N ? i(Mt, D) : null, B = g ?? Nt ?? jt?.message ?? (N ? null : Tt.errorMessage), Pt = le(a.type), V = p(_);
87
- Ue(() => {
87
+ ]), R = Object.keys(L).length > 0, z = yt ?? (jt && !F) ?? Et.isLoading, Pt = N ? i(Nt, D) : null, B = g ?? Pt ?? Mt?.message ?? (N ? null : Et.errorMessage), Ft = le(a.type), V = p(_);
88
+ We(() => {
88
89
  V.current = _;
89
90
  }, [_]);
90
- let Ft = d(async () => {
91
+ let It = d(async () => {
91
92
  V.current && await V.current();
92
- }, []), { timeUntilRefresh: It, isPaused: Lt } = ae({
93
+ }, []), { timeUntilRefresh: Lt, isPaused: Rt } = ae({
93
94
  widgetId: a.id,
94
95
  refreshInterval: a.refreshInterval,
95
- onRefresh: Ft,
96
+ onRefresh: It,
96
97
  enabled: !x && !C && !!a.refreshInterval && !N
97
- }), Rt = p(null), [zt, Bt] = m(!1), [Vt, Ht] = m(!1), { count: Ut } = oe(a.id, Vt && !N), Wt = d(() => {
98
- Ht(!0), Bt((e) => !e);
99
- }, []), H = f(() => Le({
98
+ }), zt = p(null), [Bt, Vt] = m(!1), [Ht, Ut] = m(!1), { count: Wt } = oe(a.id, Ht && !N), Gt = d(() => {
99
+ Ut(!0), Vt((e) => !e);
100
+ }, []), H = f(() => Re({
100
101
  explicit: u,
101
102
  fetched: F,
102
103
  persisted: a.data,
103
104
  config: a.config,
104
- allowSamples: kt,
105
+ allowSamples: At,
105
106
  mockSource: M,
106
107
  widgetType: a.type,
107
108
  asOf: N !== null
@@ -109,13 +110,13 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
109
110
  u,
110
111
  F,
111
112
  a,
112
- kt,
113
+ At,
113
114
  M,
114
115
  N
115
116
  ]), U = f(() => {
116
117
  let e = H.data;
117
- return Ie(e, a.config);
118
- }, [H, a.config]), W = f(() => R ? Oe(U, {
118
+ return Le(e, a.config);
119
+ }, [H, a.config]), W = f(() => R ? ke(U, {
119
120
  filterValues: L,
120
121
  filterFieldMap: k,
121
122
  widgetType: a.type
@@ -125,7 +126,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
125
126
  L,
126
127
  k,
127
128
  a.type
128
- ]), G = N !== null && P !== null && _e(a.type), K = ne(a.id, P, x || !j || !G), q = d((e) => R ? Oe(e, {
129
+ ]), G = N !== null && P !== null && _e(a.type), K = ne(a.id, P, x || !j || !G), q = d((e) => R ? ke(e, {
129
130
  filterValues: L,
130
131
  filterFieldMap: k,
131
132
  widgetType: a.type
@@ -134,7 +135,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
134
135
  L,
135
136
  k,
136
137
  a.type
137
- ]), Gt = f(() => {
138
+ ]), Kt = f(() => {
138
139
  if (!G) return null;
139
140
  let e = a.config;
140
141
  return ge({
@@ -157,24 +158,24 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
157
158
  N,
158
159
  P,
159
160
  D
160
- ]), Kt = W !== null && H.isSample, qt = f(() => {
161
- if (gt.has(a.type)) return [];
162
- let e = a.type === "metric_card" && ke(U, a.config).source === "scalar";
163
- return De(U, O, L, a.type, { precomputedValue: e });
161
+ ]), qt = W !== null && H.isSample, Jt = f(() => {
162
+ if (_t.has(a.type)) return [];
163
+ let e = a.type === "metric_card" && Ae(U, a.config).source === "scalar";
164
+ return Oe(U, O, L, a.type, { precomputedValue: e });
164
165
  }, [
165
166
  U,
166
167
  O,
167
168
  L,
168
169
  a.type,
169
170
  a.config
170
- ]), Jt = f(() => ze(W, a.type), [W, a.type]), Yt = f(() => {
171
+ ]), Yt = f(() => Be(W, a.type), [W, a.type]), Xt = f(() => {
171
172
  let e = a.config;
172
- return Ae(W, {
173
+ return je(W, {
173
174
  xAxisKey: typeof e?.xAxisKey == "string" ? e.xAxisKey : void 0,
174
175
  selectedFields: Array.isArray(e?.selectedFields) ? e.selectedFields.filter((e) => typeof e == "string") : void 0
175
176
  });
176
- }, [W, a.config]), [Xt, Zt] = m(!1), [Qt, $t] = m(!1), en = Me(a.type, x), [tn, nn] = m(!1), rn = Ne(a.type, x || Ct, {
177
- readsDataSink: j && !M && Pe({
177
+ }, [W, a.config]), [Zt, Qt] = m(!1), [$t, en] = m(!1), tn = Ne(a.type, x), [nn, rn] = m(!1), an = Pe(a.type, x || wt, {
178
+ readsDataSink: j && !M && Fe({
178
179
  kind: A.source.kind,
179
180
  ref: A.source.ref,
180
181
  parserId: A.parserId ?? a.parserId,
@@ -183,16 +184,16 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
183
184
  }),
184
185
  internalType: a.config?._internalWidgetType,
185
186
  filtered: R
186
- }), { exportCSV: an, exportPNG: on } = se(a, {
187
- data: Jt,
188
- containerRef: Rt
189
- }), { executeDrilldown: sn, canDrilldown: cn } = ce({ onDrilldown: (e, t) => {
190
- yt?.(e);
191
- } }), Y = f(() => cn(a) && !N, [
187
+ }), { exportCSV: on, exportPNG: sn } = se(a, {
188
+ data: Yt,
189
+ containerRef: zt
190
+ }), { executeDrilldown: cn, canDrilldown: ln } = ce({ onDrilldown: (e, t) => {
191
+ bt?.(e);
192
+ } }), Y = f(() => ln(a) && !N, [
192
193
  a,
193
- cn,
194
+ ln,
194
195
  N
195
- ]), ln = d((e) => {
196
+ ]), un = d((e) => {
196
197
  if (!a.drilldown?.enabled) return;
197
198
  let t = {
198
199
  selectedData: e || {},
@@ -205,18 +206,18 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
205
206
  },
206
207
  sourceDashboardId: a.dashboardId
207
208
  };
208
- sn(a.drilldown, t);
209
+ cn(a.drilldown, t);
209
210
  }, [
210
211
  a,
211
212
  W,
212
213
  E,
213
- sn
214
- ]), X = Y && !C && !N ? ln : void 0, Z = p(null), un = d((e) => {
214
+ cn
215
+ ]), X = Y && !C && !N ? un : void 0, Z = p(null), dn = d((e) => {
215
216
  Z.current = {
216
217
  x: e.clientX,
217
218
  y: e.clientY
218
219
  };
219
- }, []), dn = d((e) => {
220
+ }, []), fn = d((e) => {
220
221
  if (e.stopPropagation(), Z.current) {
221
222
  let t = Math.abs(e.clientX - Z.current.x), n = Math.abs(e.clientY - Z.current.y);
222
223
  if (t > 5 || n > 5) {
@@ -229,20 +230,20 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
229
230
  C,
230
231
  w,
231
232
  a.id
232
- ]), fn = d((e) => {
233
+ ]), pn = d((e) => {
233
234
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), C && w(a.id));
234
235
  }, [
235
236
  C,
236
237
  w,
237
238
  a.id
238
- ]), pn = f(() => a.type === "custom" && we(a.config), [a.type, a.config]), mn = f(() => a.type === "custom" && Ce(a.config), [a.type, a.config]), Q = Y && !mn, hn = a.type === "iframe" || a.type === "custom", gn = f(() => a.type === "text" && ue(a.config, W).hasContent, [
239
+ ]), mn = f(() => a.type === "custom" && we(a.config), [a.type, a.config]), hn = f(() => a.type === "custom" && Ce(a.config), [a.type, a.config]), Q = Y && !hn, gn = a.type === "iframe" || a.type === "custom", _n = f(() => a.type === "text" && ue(a.config, W).hasContent, [
239
240
  a.type,
240
241
  a.config,
241
242
  W
242
- ]), _n = !z && !B && !W && !pn && !gn, $ = f(() => a.renderer, [a]), vn = f(() => $ && $ !== "BIGCONSOLE", [$]), yn = f(() => ({
243
+ ]), vn = !z && !B && !W && !mn && !_n, $ = f(() => a.renderer, [a]), yn = f(() => $ && $ !== "BIGCONSOLE", [$]), bn = f(() => ({
243
244
  widgetId: a.id,
244
245
  data: W || {}
245
- }), [a.id, W]), bn = d((e, t) => {
246
+ }), [a.id, W]), xn = d((e, t) => {
246
247
  if (!y || N) return;
247
248
  let n = v?.find((t) => t.name === e.name);
248
249
  y(n || e, t);
@@ -250,7 +251,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
250
251
  y,
251
252
  v,
252
253
  N
253
- ]), xn = d(() => {
254
+ ]), Sn = d(() => {
254
255
  let e = (() => {
255
256
  if (!W) return W;
256
257
  if (a.type === "pivot_table") {
@@ -268,13 +269,8 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
268
269
  if (a.type === "chart") {
269
270
  if (Array.isArray(W)) return W;
270
271
  if (W && typeof W == "object" && "datasets" in W) {
271
- let e = W;
272
- if (e.labels && e.datasets) return e.labels.map((t, n) => {
273
- let r = { name: t };
274
- return e.datasets?.forEach((e) => {
275
- r[e.name.toLowerCase()] = e.data[n];
276
- }), r;
277
- });
272
+ let e = Ee(W);
273
+ if (e) return e;
278
274
  }
279
275
  }
280
276
  if (a.type === "text") {
@@ -301,7 +297,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
301
297
  widget: a,
302
298
  onDrilldown: X
303
299
  };
304
- if (vn) {
300
+ if (yn) {
305
301
  let e = {};
306
302
  if (W && typeof W == "object" && !Array.isArray(W) && Object.keys(W).length > 0 && (e = { ...W }), a.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
307
303
  let t = a.config?.valueField;
@@ -316,7 +312,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
316
312
  };
317
313
  }
318
314
  }
319
- return /* @__PURE__ */ h(Be, {
315
+ return /* @__PURE__ */ h(Ve, {
320
316
  widget: a,
321
317
  data: e,
322
318
  isEditMode: C,
@@ -324,92 +320,92 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
324
320
  isLoading: z,
325
321
  error: B,
326
322
  onDrilldown: X,
327
- onAction: N ? void 0 : bn
323
+ onAction: N ? void 0 : xn
328
324
  });
329
325
  }
330
326
  switch (a.type?.toLowerCase() || "") {
331
- case "metric_card": return /* @__PURE__ */ h(Je, {
327
+ case "metric_card": return /* @__PURE__ */ h(Ye, {
332
328
  ...t,
333
329
  data: e
334
330
  });
335
- case "kpi_card_comparison": return /* @__PURE__ */ h(ot, {
331
+ case "kpi_card_comparison": return /* @__PURE__ */ h(st, {
336
332
  ...t,
337
333
  data: e
338
334
  });
339
335
  case "chart":
340
- case "funnel_chart": return /* @__PURE__ */ h(Ye, {
336
+ case "funnel_chart": return /* @__PURE__ */ h(Xe, {
341
337
  ...t,
342
338
  data: e
343
339
  });
344
- case "waterfall": return /* @__PURE__ */ h(mt, {
340
+ case "waterfall": return /* @__PURE__ */ h(ht, {
345
341
  ...t,
346
342
  data: e
347
343
  });
348
- case "sankey": return /* @__PURE__ */ h(ft, {
344
+ case "sankey": return /* @__PURE__ */ h(pt, {
349
345
  ...t,
350
346
  data: e
351
347
  });
352
- case "box_plot": return /* @__PURE__ */ h(pt, {
348
+ case "box_plot": return /* @__PURE__ */ h(mt, {
353
349
  ...t,
354
350
  data: e
355
351
  });
356
- case "table": return /* @__PURE__ */ h(Xe, {
352
+ case "table": return /* @__PURE__ */ h(Ze, {
357
353
  ...t,
358
354
  data: e
359
355
  });
360
- case "pivot_table": return /* @__PURE__ */ h(Ze, {
356
+ case "pivot_table": return /* @__PURE__ */ h(Qe, {
361
357
  ...t,
362
358
  data: e
363
359
  });
364
- case "gauge": return /* @__PURE__ */ h(Qe, {
360
+ case "gauge": return /* @__PURE__ */ h($e, {
365
361
  ...t,
366
362
  data: e
367
363
  });
368
- case "progress": return /* @__PURE__ */ h($e, {
364
+ case "progress": return /* @__PURE__ */ h(et, {
369
365
  ...t,
370
366
  data: e
371
367
  });
372
- case "list": return /* @__PURE__ */ h(et, {
368
+ case "list": return /* @__PURE__ */ h(tt, {
373
369
  ...t,
374
370
  data: e
375
371
  });
376
- case "heatmap": return /* @__PURE__ */ h(tt, {
372
+ case "heatmap": return /* @__PURE__ */ h(nt, {
377
373
  ...t,
378
374
  data: e
379
375
  });
380
- case "retention": return /* @__PURE__ */ h(nt, {
376
+ case "retention": return /* @__PURE__ */ h(rt, {
381
377
  ...t,
382
378
  data: e
383
379
  });
384
- case "calendar": return /* @__PURE__ */ h(rt, {
380
+ case "calendar": return /* @__PURE__ */ h(it, {
385
381
  ...t,
386
382
  data: e
387
383
  });
388
- case "timeline": return /* @__PURE__ */ h(at, {
384
+ case "timeline": return /* @__PURE__ */ h(ot, {
389
385
  ...t,
390
386
  data: e
391
387
  });
392
- case "kanban": return /* @__PURE__ */ h(it, {
388
+ case "kanban": return /* @__PURE__ */ h(at, {
393
389
  ...t,
394
390
  data: e
395
391
  });
396
- case "form": return /* @__PURE__ */ h(dt, {
392
+ case "form": return /* @__PURE__ */ h(ft, {
397
393
  ...t,
398
394
  data: e
399
395
  });
400
- case "text": return /* @__PURE__ */ h(st, {
396
+ case "text": return /* @__PURE__ */ h(ct, {
401
397
  ...t,
402
398
  data: e
403
399
  });
404
- case "iframe": return /* @__PURE__ */ h(lt, {
400
+ case "iframe": return /* @__PURE__ */ h(ut, {
405
401
  ...t,
406
402
  data: e
407
403
  });
408
- case "map": return /* @__PURE__ */ h(ct, {
404
+ case "map": return /* @__PURE__ */ h(lt, {
409
405
  ...t,
410
406
  data: e
411
407
  });
412
- case "custom": return /* @__PURE__ */ h(ut, {
408
+ case "custom": return /* @__PURE__ */ h(dt, {
413
409
  ...t,
414
410
  data: e
415
411
  });
@@ -420,15 +416,15 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
420
416
  W,
421
417
  l,
422
418
  X,
423
- vn,
419
+ yn,
424
420
  C,
425
421
  T,
426
422
  z,
427
423
  B,
428
- bn,
424
+ xn,
429
425
  N
430
- ]), Sn = () => {
431
- if (N && hn) {
426
+ ]), Cn = () => {
427
+ if (N && gn) {
432
428
  let e = i({
433
429
  historyAvailable: !1,
434
430
  reason: "HISTORY_NOT_AVAILABLE"
@@ -443,11 +439,11 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
443
439
  fromLabel: J.from,
444
440
  toLabel: J.to
445
441
  });
446
- if (Gt) {
442
+ if (Kt) {
447
443
  if (z || K.loading) return /* @__PURE__ */ h(o, {});
448
- let e = jt?.message ?? K.error?.message ?? g;
444
+ let e = Mt?.message ?? K.error?.message ?? g;
449
445
  return e ? /* @__PURE__ */ h(s, { error: e }) : /* @__PURE__ */ h(ye, {
450
- result: Gt,
446
+ result: Kt,
451
447
  fromLabel: J.from,
452
448
  toLabel: J.to,
453
449
  config: a.config
@@ -458,7 +454,7 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
458
454
  error: B,
459
455
  onRetry: N ? void 0 : _
460
456
  });
461
- if (_n && !l) return /* @__PURE__ */ h(be, {
457
+ if (vn && !l) return /* @__PURE__ */ h(be, {
462
458
  widgetType: a.type,
463
459
  hideEditHint: x,
464
460
  hasDataSource: j,
@@ -473,13 +469,13 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
473
469
  resetKey: e,
474
470
  children: l ?? /* @__PURE__ */ h(c, {
475
471
  fallback: /* @__PURE__ */ h(o, {}),
476
- children: xn()
472
+ children: Sn()
477
473
  })
478
474
  });
479
475
  };
480
- return /* @__PURE__ */ Ke("div", {
481
- ref: Rt,
482
- ...x ? {} : He(a.dashboardId, a.id),
476
+ return /* @__PURE__ */ qe("div", {
477
+ ref: zt,
478
+ ...x ? {} : Ue(a.dashboardId, a.id),
483
479
  className: `
484
480
  group relative flex flex-col
485
481
  h-full w-full min-w-0
@@ -489,11 +485,11 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
489
485
  ${S.animationsEnabled ? "motion-safe:transition-[box-shadow,border-color] motion-safe:duration-200" : ""}
490
486
  ${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"}
491
487
  ${C ? "cursor-pointer" : ""}
492
- ${_t}
488
+ ${vt}
493
489
  `,
494
- onMouseDown: un,
495
- onClick: dn,
496
- onKeyDown: fn,
490
+ onMouseDown: dn,
491
+ onClick: fn,
492
+ onKeyDown: pn,
497
493
  tabIndex: C ? 0 : -1,
498
494
  role: C ? "button" : void 0,
499
495
  "aria-selected": T,
@@ -504,35 +500,35 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
504
500
  /* @__PURE__ */ h(de, {
505
501
  widget: a,
506
502
  previewOnly: x,
507
- definition: Pt,
503
+ definition: Ft,
508
504
  isSelected: T,
509
505
  isEditMode: C,
510
506
  isLoading: z,
511
- isSampleData: Kt,
512
- timeUntilRefresh: a.refreshInterval && !Lt ? ie(It) : void 0,
507
+ isSampleData: qt,
508
+ timeUntilRefresh: a.refreshInterval && !Rt ? ie(Lt) : void 0,
513
509
  hasDrilldown: Y,
514
510
  onRefresh: N ? void 0 : _,
515
- onExportCSV: Jt ? N ? () => an(`${a.title.replace(/\s+/g, "_").toLowerCase()}_${fe(N)}.csv`) : an : void 0,
516
- onExportPNG: N ? void 0 : on,
511
+ onExportCSV: Yt ? N ? () => on(`${a.title.replace(/\s+/g, "_").toLowerCase()}_${fe(N)}.csv`) : on : void 0,
512
+ onExportPNG: N ? void 0 : sn,
517
513
  onDrilldown: X ? () => X() : void 0,
518
- onToggleComments: x || N ? void 0 : Wt,
519
- commentsOpen: zt,
520
- commentCount: Vt ? Ut : void 0,
521
- onExplain: x || N ? void 0 : bt,
522
- explainOpen: xt,
523
- onSpotOutliers: Yt.length > 0 ? () => Zt(!0) : void 0,
524
- onReconcile: en && !N ? () => $t(!0) : void 0,
525
- onWhyDidItMove: rn && !N ? () => nn((e) => !e) : void 0,
526
- whyDidItMoveOpen: tn
514
+ onToggleComments: x || N ? void 0 : Gt,
515
+ commentsOpen: Bt,
516
+ commentCount: Ht ? Wt : void 0,
517
+ onExplain: x || N ? void 0 : xt,
518
+ explainOpen: St,
519
+ onSpotOutliers: Xt.length > 0 ? () => Qt(!0) : void 0,
520
+ onReconcile: tn && !N ? () => en(!0) : void 0,
521
+ onWhyDidItMove: an && !N ? () => rn((e) => !e) : void 0,
522
+ whyDidItMoveOpen: nn
527
523
  }),
528
- xt && !N && St,
529
- tn && !N && /* @__PURE__ */ h(Fe, {
524
+ St && !N && Ct,
525
+ nn && !N && /* @__PURE__ */ h(Ie, {
530
526
  widgetId: a.id,
531
527
  open: !0,
532
- onClose: () => nn(!1)
528
+ onClose: () => rn(!1)
533
529
  }),
534
530
  /* @__PURE__ */ h(Se, {
535
- filters: qt,
531
+ filters: Jt,
536
532
  t: D
537
533
  }),
538
534
  /* @__PURE__ */ h("div", {
@@ -544,15 +540,15 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
544
540
  title: Q && !C ? "Click data to drill down" : void 0,
545
541
  children: /* @__PURE__ */ h("div", {
546
542
  className: "h-full min-w-0 overflow-auto",
547
- children: Sn()
543
+ children: Cn()
548
544
  })
549
545
  }),
550
546
  v && v.length > 0 && !z && !B && !N && /* @__PURE__ */ h("div", {
551
547
  className: "min-w-0 border-t border-[var(--color-border-subtle)] bg-bg-sunken px-3 py-2 sm:px-4",
552
548
  style: { flexShrink: 0 },
553
- children: /* @__PURE__ */ h(Ve, {
549
+ children: /* @__PURE__ */ h(He, {
554
550
  actions: v,
555
- context: yn,
551
+ context: bn,
556
552
  onAction: y,
557
553
  disabled: C,
558
554
  layout: "horizontal",
@@ -575,31 +571,31 @@ var vt = u(function({ widget: a, children: l, data: u, className: _t = "", isLoa
575
571
  })
576
572
  })
577
573
  }),
578
- zt && !N && /* @__PURE__ */ h(c, {
574
+ Bt && !N && /* @__PURE__ */ h(c, {
579
575
  fallback: null,
580
- children: /* @__PURE__ */ h(ht, {
576
+ children: /* @__PURE__ */ h(gt, {
581
577
  widgetId: a.id,
582
578
  widgetTitle: a.title,
583
- onClose: () => Bt(!1)
579
+ onClose: () => Vt(!1)
584
580
  })
585
581
  }),
586
- /* @__PURE__ */ h(je, {
587
- open: Xt,
588
- onClose: () => Zt(!1),
582
+ /* @__PURE__ */ h(Me, {
583
+ open: Zt,
584
+ onClose: () => Qt(!1),
589
585
  widgetTitle: a.title,
590
- series: Yt
586
+ series: Xt
591
587
  }),
592
- Qt && !N && /* @__PURE__ */ h(c, {
588
+ $t && !N && /* @__PURE__ */ h(c, {
593
589
  fallback: null,
594
- children: /* @__PURE__ */ h(qe, {
595
- open: Qt,
596
- onClose: () => $t(!1),
590
+ children: /* @__PURE__ */ h(Je, {
591
+ open: $t,
592
+ onClose: () => en(!1),
597
593
  widget: a
598
594
  })
599
595
  })
600
596
  ]
601
597
  });
602
- }, _t), g = l(() => import("../explore/SavedQueryWidget.js").then((e) => ({ default: e.SavedQueryWidget })));
598
+ }, vt), g = l(() => import("../explore/SavedQueryWidget.js").then((e) => ({ default: e.SavedQueryWidget })));
603
599
  function _({ widget: e }) {
604
600
  return r((e) => e.viewMode === "edit") ? /* @__PURE__ */ h("div", {
605
601
  className: "float-right ml-2",
@@ -609,12 +605,12 @@ function _({ widget: e }) {
609
605
  })
610
606
  }) : null;
611
607
  }
612
- function yt({ title: e }) {
613
- let { t } = We(), n = i({
608
+ function bt({ title: e }) {
609
+ let { t } = Ge(), n = i({
614
610
  historyAvailable: !1,
615
611
  reason: "HISTORY_NOT_AVAILABLE"
616
612
  }, t);
617
- return /* @__PURE__ */ Ke("section", {
613
+ return /* @__PURE__ */ qe("section", {
618
614
  "aria-label": e ?? void 0,
619
615
  "data-testid": "saved-query-history-unavailable",
620
616
  className: "h-full min-w-0 rounded-lg border border-[var(--color-border-subtle)] bg-bg-surface p-3",
@@ -626,7 +622,7 @@ function yt({ title: e }) {
626
622
  }
627
623
  var v = (e) => {
628
624
  let { asOf: t } = pe();
629
- return e.widget.savedQueryId ? t ? /* @__PURE__ */ h(yt, { title: e.widget.title }) : /* @__PURE__ */ h(c, {
625
+ return e.widget.savedQueryId ? t ? /* @__PURE__ */ h(bt, { title: e.widget.title }) : /* @__PURE__ */ h(c, {
630
626
  fallback: /* @__PURE__ */ h("span", {
631
627
  role: "status",
632
628
  children: "Loading widget…"
@@ -636,6 +632,6 @@ var v = (e) => {
636
632
  title: e.widget.title,
637
633
  controls: e.previewOnly ? void 0 : /* @__PURE__ */ h(_, { widget: e.widget })
638
634
  })
639
- }) : /* @__PURE__ */ h(vt, { ...e });
635
+ }) : /* @__PURE__ */ h(yt, { ...e });
640
636
  };
641
637
  export { v as WidgetWrapper, v as default };