@burdenoff/microfe-bigconsole 2026.1122.2 → 2026.1122.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/asof/AsOfProvider.d.ts +7 -0
- package/dist/bigconsole/asof/AsOfProvider.js +5 -2
- package/dist/bigconsole/asof/asOfParam.d.ts +5 -0
- package/dist/bigconsole/asof/asOfParam.js +7 -4
- package/dist/bigconsole/asof/index.d.ts +2 -2
- package/dist/bigconsole/asof/index.js +6 -6
- package/dist/bigconsole/asof/liveOnlySurfaces.d.ts +43 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +133 -127
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +51 -51
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.d.ts +3 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +154 -145
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +302 -294
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +164 -163
- package/dist/bigconsole/pages/DashboardViewPage.js +15 -10
- package/package.json +1 -1
|
@@ -12,57 +12,58 @@ import ce from "../../hooks/useDrilldown.js";
|
|
|
12
12
|
import { getWidgetDefinition as le } from "./WidgetRegistry.js";
|
|
13
13
|
import { resolveTextData as ue } from "./text-widget/textData.js";
|
|
14
14
|
import { WidgetHeader as de } from "./WidgetHeader.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
15
|
+
import { asOfFileStamp as fe } from "../../asof/asOfParam.js";
|
|
16
|
+
import { useAsOf as pe } from "../../asof/AsOfProvider.js";
|
|
17
|
+
import { formatWhen as me } from "../../asof/AsOfControl.js";
|
|
17
18
|
import { asOfUnavailableMessage as i } from "../../asof/asOfMessage.js";
|
|
18
19
|
import { WidgetMenu as a } from "./WidgetMenu.js";
|
|
19
|
-
import { useBigConsoleSettings as
|
|
20
|
+
import { useBigConsoleSettings as he } from "../../hooks/useBigConsoleSettings.js";
|
|
20
21
|
import "../../asof/index.js";
|
|
21
|
-
import { compareWidget as
|
|
22
|
-
import { readCompareSide as
|
|
23
|
-
import { WidgetCompareView as
|
|
22
|
+
import { compareWidget as ge, isCompareSupported as _e } from "../../compare/compareEngine.js";
|
|
23
|
+
import { readCompareSide as ve } from "../../compare/compareSide.js";
|
|
24
|
+
import { WidgetCompareView as ye } from "./WidgetCompareView.js";
|
|
24
25
|
import { WidgetLoadingState as o } from "./states/LoadingState.js";
|
|
25
26
|
import { WidgetErrorState as s } from "./states/ErrorState.js";
|
|
26
|
-
import { WidgetEmptyState as
|
|
27
|
-
import { WidgetErrorBoundary as
|
|
28
|
-
import { FilterNotAppliedNotice as
|
|
29
|
-
import { hasCustomIframeConfig as
|
|
30
|
-
import { getBindingForWidget as
|
|
31
|
-
import { filterMetaFromDashboard as
|
|
32
|
-
import { applyGlobalFilters as
|
|
33
|
-
import { resolveMetricCardData as
|
|
34
|
-
import { extractOutlierSeries as
|
|
35
|
-
import { OutlierSpottingDialog as
|
|
36
|
-
import { canReconcileWidget as
|
|
37
|
-
import { canExplainKpiChange as
|
|
38
|
-
import { KpiChangeDialog as
|
|
39
|
-
import { resolveWidgetDataPath as
|
|
40
|
-
import { WidgetRendererFactory as
|
|
41
|
-
import { WidgetActions as
|
|
27
|
+
import { WidgetEmptyState as be } from "./states/EmptyState.js";
|
|
28
|
+
import { WidgetErrorBoundary as xe } from "./WidgetErrorBoundary.js";
|
|
29
|
+
import { FilterNotAppliedNotice as Se } from "./FilterNotAppliedNotice.js";
|
|
30
|
+
import { hasCustomIframeConfig as Ce, hasRenderableCustomConfig as we } from "./custom/config.js";
|
|
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";
|
|
42
43
|
import "./widget-actions/index.js";
|
|
43
|
-
import { dashboardSuggestAnchorProps as
|
|
44
|
-
import { Suspense as c, lazy as l, memo as u, useCallback as d, useEffect as
|
|
45
|
-
import { useI18n as
|
|
46
|
-
import { useQuery as
|
|
47
|
-
import { jsx as h, jsxs as
|
|
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";
|
|
48
49
|
// src/bigconsole/components/widgets/WidgetWrapper.tsx
|
|
49
|
-
var
|
|
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 })));
|
|
50
51
|
l(() => import("./adaptive-card/index.js").then((e) => ({ default: e.AdaptiveCardWidget })));
|
|
51
|
-
var
|
|
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([
|
|
52
53
|
"text",
|
|
53
54
|
"iframe",
|
|
54
55
|
"form",
|
|
55
56
|
"adaptive_card"
|
|
56
57
|
]);
|
|
57
|
-
function
|
|
58
|
+
function _t(e, t) {
|
|
58
59
|
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;
|
|
59
60
|
}
|
|
60
|
-
var
|
|
61
|
-
let S =
|
|
62
|
-
variables: { id:
|
|
63
|
-
skip: !
|
|
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,
|
|
64
65
|
fetchPolicy: "cache-only"
|
|
65
|
-
}),
|
|
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, {
|
|
66
67
|
skip: x || !j,
|
|
67
68
|
pollInterval: N ? 0 : (a.refreshInterval ?? 0) * 1e3 || 0,
|
|
68
69
|
asOf: N
|
|
@@ -82,25 +83,25 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
82
83
|
I,
|
|
83
84
|
E,
|
|
84
85
|
b
|
|
85
|
-
]), R = Object.keys(L).length > 0, z =
|
|
86
|
-
|
|
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
88
|
V.current = _;
|
|
88
89
|
}, [_]);
|
|
89
|
-
let
|
|
90
|
+
let Ft = d(async () => {
|
|
90
91
|
V.current && await V.current();
|
|
91
|
-
}, []), { timeUntilRefresh:
|
|
92
|
+
}, []), { timeUntilRefresh: It, isPaused: Lt } = ae({
|
|
92
93
|
widgetId: a.id,
|
|
93
94
|
refreshInterval: a.refreshInterval,
|
|
94
|
-
onRefresh:
|
|
95
|
+
onRefresh: Ft,
|
|
95
96
|
enabled: !x && !C && !!a.refreshInterval && !N
|
|
96
|
-
}),
|
|
97
|
-
|
|
98
|
-
}, []), H = f(() =>
|
|
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({
|
|
99
100
|
explicit: u,
|
|
100
101
|
fetched: F,
|
|
101
102
|
persisted: a.data,
|
|
102
103
|
config: a.config,
|
|
103
|
-
allowSamples:
|
|
104
|
+
allowSamples: kt,
|
|
104
105
|
mockSource: M,
|
|
105
106
|
widgetType: a.type,
|
|
106
107
|
asOf: N !== null
|
|
@@ -108,13 +109,13 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
108
109
|
u,
|
|
109
110
|
F,
|
|
110
111
|
a,
|
|
111
|
-
|
|
112
|
+
kt,
|
|
112
113
|
M,
|
|
113
114
|
N
|
|
114
115
|
]), U = f(() => {
|
|
115
116
|
let e = H.data;
|
|
116
|
-
return
|
|
117
|
-
}, [H, a.config]), W = f(() => R ?
|
|
117
|
+
return Ie(e, a.config);
|
|
118
|
+
}, [H, a.config]), W = f(() => R ? Oe(U, {
|
|
118
119
|
filterValues: L,
|
|
119
120
|
filterFieldMap: k,
|
|
120
121
|
widgetType: a.type
|
|
@@ -124,7 +125,7 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
124
125
|
L,
|
|
125
126
|
k,
|
|
126
127
|
a.type
|
|
127
|
-
]), G = N !== null && P !== null &&
|
|
128
|
+
]), G = N !== null && P !== null && _e(a.type), K = ne(a.id, P, x || !j || !G), q = d((e) => R ? Oe(e, {
|
|
128
129
|
filterValues: L,
|
|
129
130
|
filterFieldMap: k,
|
|
130
131
|
widgetType: a.type
|
|
@@ -133,14 +134,14 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
133
134
|
L,
|
|
134
135
|
k,
|
|
135
136
|
a.type
|
|
136
|
-
]),
|
|
137
|
+
]), Gt = f(() => {
|
|
137
138
|
if (!G) return null;
|
|
138
139
|
let e = a.config;
|
|
139
|
-
return
|
|
140
|
+
return ge({
|
|
140
141
|
widgetType: a.type,
|
|
141
142
|
config: e,
|
|
142
|
-
from:
|
|
143
|
-
to:
|
|
143
|
+
from: ve(F, e, q),
|
|
144
|
+
to: ve(K.data, e, q)
|
|
144
145
|
});
|
|
145
146
|
}, [
|
|
146
147
|
G,
|
|
@@ -150,30 +151,30 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
150
151
|
K.data,
|
|
151
152
|
q
|
|
152
153
|
]), J = f(() => ({
|
|
153
|
-
from: N ?
|
|
154
|
-
to: P instanceof Date ?
|
|
154
|
+
from: N ? me(N) : "",
|
|
155
|
+
to: P instanceof Date ? me(P) : D("bigconsole.compare.label.now", "Now")
|
|
155
156
|
}), [
|
|
156
157
|
N,
|
|
157
158
|
P,
|
|
158
159
|
D
|
|
159
|
-
]),
|
|
160
|
-
if (
|
|
161
|
-
let e = a.type === "metric_card" &&
|
|
162
|
-
return
|
|
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 });
|
|
163
164
|
}, [
|
|
164
165
|
U,
|
|
165
166
|
O,
|
|
166
167
|
L,
|
|
167
168
|
a.type,
|
|
168
169
|
a.config
|
|
169
|
-
]),
|
|
170
|
+
]), Jt = f(() => ze(W, a.type), [W, a.type]), Yt = f(() => {
|
|
170
171
|
let e = a.config;
|
|
171
|
-
return
|
|
172
|
+
return Ae(W, {
|
|
172
173
|
xAxisKey: typeof e?.xAxisKey == "string" ? e.xAxisKey : void 0,
|
|
173
174
|
selectedFields: Array.isArray(e?.selectedFields) ? e.selectedFields.filter((e) => typeof e == "string") : void 0
|
|
174
175
|
});
|
|
175
|
-
}, [W, a.config]), [
|
|
176
|
-
readsDataSink: j && !M &&
|
|
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
178
|
kind: A.source.kind,
|
|
178
179
|
ref: A.source.ref,
|
|
179
180
|
parserId: A.parserId ?? a.parserId,
|
|
@@ -182,16 +183,16 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
182
183
|
}),
|
|
183
184
|
internalType: a.config?._internalWidgetType,
|
|
184
185
|
filtered: R
|
|
185
|
-
}), { exportCSV:
|
|
186
|
-
data:
|
|
187
|
-
containerRef:
|
|
188
|
-
}), { executeDrilldown:
|
|
189
|
-
|
|
190
|
-
} }), Y = f(() =>
|
|
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, [
|
|
191
192
|
a,
|
|
192
|
-
|
|
193
|
+
cn,
|
|
193
194
|
N
|
|
194
|
-
]),
|
|
195
|
+
]), ln = d((e) => {
|
|
195
196
|
if (!a.drilldown?.enabled) return;
|
|
196
197
|
let t = {
|
|
197
198
|
selectedData: e || {},
|
|
@@ -204,18 +205,18 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
204
205
|
},
|
|
205
206
|
sourceDashboardId: a.dashboardId
|
|
206
207
|
};
|
|
207
|
-
|
|
208
|
+
sn(a.drilldown, t);
|
|
208
209
|
}, [
|
|
209
210
|
a,
|
|
210
211
|
W,
|
|
211
212
|
E,
|
|
212
|
-
|
|
213
|
-
]), X = Y && !C && !N ?
|
|
213
|
+
sn
|
|
214
|
+
]), X = Y && !C && !N ? ln : void 0, Z = p(null), un = d((e) => {
|
|
214
215
|
Z.current = {
|
|
215
216
|
x: e.clientX,
|
|
216
217
|
y: e.clientY
|
|
217
218
|
};
|
|
218
|
-
}, []),
|
|
219
|
+
}, []), dn = d((e) => {
|
|
219
220
|
if (e.stopPropagation(), Z.current) {
|
|
220
221
|
let t = Math.abs(e.clientX - Z.current.x), n = Math.abs(e.clientY - Z.current.y);
|
|
221
222
|
if (t > 5 || n > 5) {
|
|
@@ -228,20 +229,20 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
228
229
|
C,
|
|
229
230
|
w,
|
|
230
231
|
a.id
|
|
231
|
-
]),
|
|
232
|
+
]), fn = d((e) => {
|
|
232
233
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), C && w(a.id));
|
|
233
234
|
}, [
|
|
234
235
|
C,
|
|
235
236
|
w,
|
|
236
237
|
a.id
|
|
237
|
-
]),
|
|
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, [
|
|
238
239
|
a.type,
|
|
239
240
|
a.config,
|
|
240
241
|
W
|
|
241
|
-
]),
|
|
242
|
+
]), _n = !z && !B && !W && !pn && !gn, $ = f(() => a.renderer, [a]), vn = f(() => $ && $ !== "BIGCONSOLE", [$]), yn = f(() => ({
|
|
242
243
|
widgetId: a.id,
|
|
243
244
|
data: W || {}
|
|
244
|
-
}), [a.id, W]),
|
|
245
|
+
}), [a.id, W]), bn = d((e, t) => {
|
|
245
246
|
if (!y || N) return;
|
|
246
247
|
let n = v?.find((t) => t.name === e.name);
|
|
247
248
|
y(n || e, t);
|
|
@@ -249,7 +250,7 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
249
250
|
y,
|
|
250
251
|
v,
|
|
251
252
|
N
|
|
252
|
-
]),
|
|
253
|
+
]), xn = d(() => {
|
|
253
254
|
let e = (() => {
|
|
254
255
|
if (!W) return W;
|
|
255
256
|
if (a.type === "pivot_table") {
|
|
@@ -300,7 +301,7 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
300
301
|
widget: a,
|
|
301
302
|
onDrilldown: X
|
|
302
303
|
};
|
|
303
|
-
if (
|
|
304
|
+
if (vn) {
|
|
304
305
|
let e = {};
|
|
305
306
|
if (W && typeof W == "object" && !Array.isArray(W) && Object.keys(W).length > 0 && (e = { ...W }), a.config?._internalWidgetType === "custom" && Object.keys(e).length > 0) {
|
|
306
307
|
let t = a.config?.valueField;
|
|
@@ -315,7 +316,7 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
315
316
|
};
|
|
316
317
|
}
|
|
317
318
|
}
|
|
318
|
-
return /* @__PURE__ */ h(
|
|
319
|
+
return /* @__PURE__ */ h(Be, {
|
|
319
320
|
widget: a,
|
|
320
321
|
data: e,
|
|
321
322
|
isEditMode: C,
|
|
@@ -323,118 +324,118 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
323
324
|
isLoading: z,
|
|
324
325
|
error: B,
|
|
325
326
|
onDrilldown: X,
|
|
326
|
-
onAction: N ? void 0 :
|
|
327
|
+
onAction: N ? void 0 : bn
|
|
327
328
|
});
|
|
328
329
|
}
|
|
329
330
|
switch (a.type?.toLowerCase() || "") {
|
|
330
|
-
case "metric_card": return /* @__PURE__ */ h(
|
|
331
|
+
case "metric_card": return /* @__PURE__ */ h(Je, {
|
|
331
332
|
...t,
|
|
332
333
|
data: e
|
|
333
334
|
});
|
|
334
|
-
case "kpi_card_comparison": return /* @__PURE__ */ h(
|
|
335
|
+
case "kpi_card_comparison": return /* @__PURE__ */ h(ot, {
|
|
335
336
|
...t,
|
|
336
337
|
data: e
|
|
337
338
|
});
|
|
338
339
|
case "chart":
|
|
339
|
-
case "funnel_chart": return /* @__PURE__ */ h(
|
|
340
|
+
case "funnel_chart": return /* @__PURE__ */ h(Ye, {
|
|
340
341
|
...t,
|
|
341
342
|
data: e
|
|
342
343
|
});
|
|
343
|
-
case "waterfall": return /* @__PURE__ */ h(
|
|
344
|
+
case "waterfall": return /* @__PURE__ */ h(mt, {
|
|
344
345
|
...t,
|
|
345
346
|
data: e
|
|
346
347
|
});
|
|
347
|
-
case "sankey": return /* @__PURE__ */ h(
|
|
348
|
+
case "sankey": return /* @__PURE__ */ h(ft, {
|
|
348
349
|
...t,
|
|
349
350
|
data: e
|
|
350
351
|
});
|
|
351
|
-
case "box_plot": return /* @__PURE__ */ h(
|
|
352
|
+
case "box_plot": return /* @__PURE__ */ h(pt, {
|
|
352
353
|
...t,
|
|
353
354
|
data: e
|
|
354
355
|
});
|
|
355
|
-
case "table": return /* @__PURE__ */ h(
|
|
356
|
+
case "table": return /* @__PURE__ */ h(Xe, {
|
|
356
357
|
...t,
|
|
357
358
|
data: e
|
|
358
359
|
});
|
|
359
|
-
case "pivot_table": return /* @__PURE__ */ h(
|
|
360
|
+
case "pivot_table": return /* @__PURE__ */ h(Ze, {
|
|
360
361
|
...t,
|
|
361
362
|
data: e
|
|
362
363
|
});
|
|
363
|
-
case "gauge": return /* @__PURE__ */ h(
|
|
364
|
+
case "gauge": return /* @__PURE__ */ h(Qe, {
|
|
364
365
|
...t,
|
|
365
366
|
data: e
|
|
366
367
|
});
|
|
367
|
-
case "progress": return /* @__PURE__ */ h(
|
|
368
|
+
case "progress": return /* @__PURE__ */ h($e, {
|
|
368
369
|
...t,
|
|
369
370
|
data: e
|
|
370
371
|
});
|
|
371
|
-
case "list": return /* @__PURE__ */ h(
|
|
372
|
+
case "list": return /* @__PURE__ */ h(et, {
|
|
372
373
|
...t,
|
|
373
374
|
data: e
|
|
374
375
|
});
|
|
375
|
-
case "heatmap": return /* @__PURE__ */ h(
|
|
376
|
+
case "heatmap": return /* @__PURE__ */ h(tt, {
|
|
376
377
|
...t,
|
|
377
378
|
data: e
|
|
378
379
|
});
|
|
379
|
-
case "retention": return /* @__PURE__ */ h(
|
|
380
|
+
case "retention": return /* @__PURE__ */ h(nt, {
|
|
380
381
|
...t,
|
|
381
382
|
data: e
|
|
382
383
|
});
|
|
383
|
-
case "calendar": return /* @__PURE__ */ h(
|
|
384
|
+
case "calendar": return /* @__PURE__ */ h(rt, {
|
|
384
385
|
...t,
|
|
385
386
|
data: e
|
|
386
387
|
});
|
|
387
|
-
case "timeline": return /* @__PURE__ */ h(
|
|
388
|
+
case "timeline": return /* @__PURE__ */ h(at, {
|
|
388
389
|
...t,
|
|
389
390
|
data: e
|
|
390
391
|
});
|
|
391
|
-
case "kanban": return /* @__PURE__ */ h(
|
|
392
|
+
case "kanban": return /* @__PURE__ */ h(it, {
|
|
392
393
|
...t,
|
|
393
394
|
data: e
|
|
394
395
|
});
|
|
395
|
-
case "form": return /* @__PURE__ */ h(
|
|
396
|
+
case "form": return /* @__PURE__ */ h(dt, {
|
|
396
397
|
...t,
|
|
397
398
|
data: e
|
|
398
399
|
});
|
|
399
|
-
case "text": return /* @__PURE__ */ h(
|
|
400
|
+
case "text": return /* @__PURE__ */ h(st, {
|
|
400
401
|
...t,
|
|
401
402
|
data: e
|
|
402
403
|
});
|
|
403
|
-
case "iframe": return /* @__PURE__ */ h(
|
|
404
|
+
case "iframe": return /* @__PURE__ */ h(lt, {
|
|
404
405
|
...t,
|
|
405
406
|
data: e
|
|
406
407
|
});
|
|
407
|
-
case "map": return /* @__PURE__ */ h(
|
|
408
|
+
case "map": return /* @__PURE__ */ h(ct, {
|
|
408
409
|
...t,
|
|
409
410
|
data: e
|
|
410
411
|
});
|
|
411
|
-
case "custom": return /* @__PURE__ */ h(
|
|
412
|
+
case "custom": return /* @__PURE__ */ h(ut, {
|
|
412
413
|
...t,
|
|
413
414
|
data: e
|
|
414
415
|
});
|
|
415
|
-
default: return l || /* @__PURE__ */ h(
|
|
416
|
+
default: return l || /* @__PURE__ */ h(be, { widgetType: a.type });
|
|
416
417
|
}
|
|
417
418
|
}, [
|
|
418
419
|
a,
|
|
419
420
|
W,
|
|
420
421
|
l,
|
|
421
422
|
X,
|
|
422
|
-
|
|
423
|
+
vn,
|
|
423
424
|
C,
|
|
424
425
|
T,
|
|
425
426
|
z,
|
|
426
427
|
B,
|
|
427
|
-
|
|
428
|
+
bn,
|
|
428
429
|
N
|
|
429
|
-
]),
|
|
430
|
-
if (N &&
|
|
430
|
+
]), Sn = () => {
|
|
431
|
+
if (N && hn) {
|
|
431
432
|
let e = i({
|
|
432
433
|
historyAvailable: !1,
|
|
433
434
|
reason: "HISTORY_NOT_AVAILABLE"
|
|
434
435
|
}, D);
|
|
435
436
|
return /* @__PURE__ */ h(s, { error: e ?? "" });
|
|
436
437
|
}
|
|
437
|
-
if (N && P && !
|
|
438
|
+
if (N && P && !_e(a.type)) return /* @__PURE__ */ h(ye, {
|
|
438
439
|
result: {
|
|
439
440
|
kind: "unsupported",
|
|
440
441
|
widgetType: a.type
|
|
@@ -442,11 +443,11 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
442
443
|
fromLabel: J.from,
|
|
443
444
|
toLabel: J.to
|
|
444
445
|
});
|
|
445
|
-
if (
|
|
446
|
+
if (Gt) {
|
|
446
447
|
if (z || K.loading) return /* @__PURE__ */ h(o, {});
|
|
447
|
-
let e =
|
|
448
|
-
return e ? /* @__PURE__ */ h(s, { error: e }) : /* @__PURE__ */ h(
|
|
449
|
-
result:
|
|
448
|
+
let e = jt?.message ?? K.error?.message ?? g;
|
|
449
|
+
return e ? /* @__PURE__ */ h(s, { error: e }) : /* @__PURE__ */ h(ye, {
|
|
450
|
+
result: Gt,
|
|
450
451
|
fromLabel: J.from,
|
|
451
452
|
toLabel: J.to,
|
|
452
453
|
config: a.config
|
|
@@ -457,7 +458,7 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
457
458
|
error: B,
|
|
458
459
|
onRetry: N ? void 0 : _
|
|
459
460
|
});
|
|
460
|
-
if (
|
|
461
|
+
if (_n && !l) return /* @__PURE__ */ h(be, {
|
|
461
462
|
widgetType: a.type,
|
|
462
463
|
hideEditHint: x,
|
|
463
464
|
hasDataSource: j,
|
|
@@ -465,20 +466,20 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
465
466
|
templateSlot: typeof a.metadata?.templateDataSinkSlot == "string" ? a.metadata.templateDataSinkSlot : null
|
|
466
467
|
});
|
|
467
468
|
let e = `${A.source.kind}|${A.source.ref ?? ""}|${A.parserId ?? ""}|${a.updatedAt ?? ""}`;
|
|
468
|
-
return /* @__PURE__ */ h(
|
|
469
|
+
return /* @__PURE__ */ h(xe, {
|
|
469
470
|
widgetId: a.id,
|
|
470
471
|
widgetType: a.type,
|
|
471
472
|
widgetTitle: a.title,
|
|
472
473
|
resetKey: e,
|
|
473
474
|
children: l ?? /* @__PURE__ */ h(c, {
|
|
474
475
|
fallback: /* @__PURE__ */ h(o, {}),
|
|
475
|
-
children:
|
|
476
|
+
children: xn()
|
|
476
477
|
})
|
|
477
478
|
});
|
|
478
479
|
};
|
|
479
|
-
return /* @__PURE__ */
|
|
480
|
-
ref:
|
|
481
|
-
...x ? {} :
|
|
480
|
+
return /* @__PURE__ */ Ke("div", {
|
|
481
|
+
ref: Rt,
|
|
482
|
+
...x ? {} : He(a.dashboardId, a.id),
|
|
482
483
|
className: `
|
|
483
484
|
group relative flex flex-col
|
|
484
485
|
h-full w-full min-w-0
|
|
@@ -488,11 +489,11 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
488
489
|
${S.animationsEnabled ? "motion-safe:transition-[box-shadow,border-color] motion-safe:duration-200" : ""}
|
|
489
490
|
${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"}
|
|
490
491
|
${C ? "cursor-pointer" : ""}
|
|
491
|
-
${
|
|
492
|
+
${_t}
|
|
492
493
|
`,
|
|
493
|
-
onMouseDown:
|
|
494
|
-
onClick:
|
|
495
|
-
onKeyDown:
|
|
494
|
+
onMouseDown: un,
|
|
495
|
+
onClick: dn,
|
|
496
|
+
onKeyDown: fn,
|
|
496
497
|
tabIndex: C ? 0 : -1,
|
|
497
498
|
role: C ? "button" : void 0,
|
|
498
499
|
"aria-selected": T,
|
|
@@ -503,35 +504,35 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
503
504
|
/* @__PURE__ */ h(de, {
|
|
504
505
|
widget: a,
|
|
505
506
|
previewOnly: x,
|
|
506
|
-
definition:
|
|
507
|
+
definition: Pt,
|
|
507
508
|
isSelected: T,
|
|
508
509
|
isEditMode: C,
|
|
509
510
|
isLoading: z,
|
|
510
|
-
isSampleData:
|
|
511
|
-
timeUntilRefresh: a.refreshInterval && !
|
|
511
|
+
isSampleData: Kt,
|
|
512
|
+
timeUntilRefresh: a.refreshInterval && !Lt ? ie(It) : void 0,
|
|
512
513
|
hasDrilldown: Y,
|
|
513
514
|
onRefresh: N ? void 0 : _,
|
|
514
|
-
onExportCSV:
|
|
515
|
-
onExportPNG:
|
|
515
|
+
onExportCSV: Jt ? N ? () => an(`${a.title.replace(/\s+/g, "_").toLowerCase()}_${fe(N)}.csv`) : an : void 0,
|
|
516
|
+
onExportPNG: N ? void 0 : on,
|
|
516
517
|
onDrilldown: X ? () => X() : void 0,
|
|
517
|
-
onToggleComments: x ? void 0 :
|
|
518
|
-
commentsOpen:
|
|
519
|
-
commentCount:
|
|
520
|
-
onExplain: x || N ? void 0 :
|
|
521
|
-
explainOpen:
|
|
522
|
-
onSpotOutliers:
|
|
523
|
-
onReconcile:
|
|
524
|
-
onWhyDidItMove:
|
|
525
|
-
whyDidItMoveOpen:
|
|
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
|
|
526
527
|
}),
|
|
527
|
-
|
|
528
|
-
|
|
528
|
+
xt && !N && St,
|
|
529
|
+
tn && !N && /* @__PURE__ */ h(Fe, {
|
|
529
530
|
widgetId: a.id,
|
|
530
531
|
open: !0,
|
|
531
|
-
onClose: () =>
|
|
532
|
+
onClose: () => nn(!1)
|
|
532
533
|
}),
|
|
533
|
-
/* @__PURE__ */ h(
|
|
534
|
-
filters:
|
|
534
|
+
/* @__PURE__ */ h(Se, {
|
|
535
|
+
filters: qt,
|
|
535
536
|
t: D
|
|
536
537
|
}),
|
|
537
538
|
/* @__PURE__ */ h("div", {
|
|
@@ -543,15 +544,15 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
543
544
|
title: Q && !C ? "Click data to drill down" : void 0,
|
|
544
545
|
children: /* @__PURE__ */ h("div", {
|
|
545
546
|
className: "h-full min-w-0 overflow-auto",
|
|
546
|
-
children:
|
|
547
|
+
children: Sn()
|
|
547
548
|
})
|
|
548
549
|
}),
|
|
549
550
|
v && v.length > 0 && !z && !B && !N && /* @__PURE__ */ h("div", {
|
|
550
551
|
className: "min-w-0 border-t border-[var(--color-border-subtle)] bg-bg-sunken px-3 py-2 sm:px-4",
|
|
551
552
|
style: { flexShrink: 0 },
|
|
552
|
-
children: /* @__PURE__ */ h(
|
|
553
|
+
children: /* @__PURE__ */ h(Ve, {
|
|
553
554
|
actions: v,
|
|
554
|
-
context:
|
|
555
|
+
context: yn,
|
|
555
556
|
onAction: y,
|
|
556
557
|
disabled: C,
|
|
557
558
|
layout: "horizontal",
|
|
@@ -574,30 +575,30 @@ var _t = u(function({ widget: a, children: l, data: u, className: gt = "", isLoa
|
|
|
574
575
|
})
|
|
575
576
|
})
|
|
576
577
|
}),
|
|
577
|
-
|
|
578
|
+
zt && !N && /* @__PURE__ */ h(c, {
|
|
578
579
|
fallback: null,
|
|
579
|
-
children: /* @__PURE__ */ h(
|
|
580
|
+
children: /* @__PURE__ */ h(ht, {
|
|
580
581
|
widgetId: a.id,
|
|
581
|
-
onClose: () =>
|
|
582
|
+
onClose: () => Bt(!1)
|
|
582
583
|
})
|
|
583
584
|
}),
|
|
584
|
-
/* @__PURE__ */ h(
|
|
585
|
-
open:
|
|
586
|
-
onClose: () =>
|
|
585
|
+
/* @__PURE__ */ h(je, {
|
|
586
|
+
open: Xt,
|
|
587
|
+
onClose: () => Zt(!1),
|
|
587
588
|
widgetTitle: a.title,
|
|
588
|
-
series:
|
|
589
|
+
series: Yt
|
|
589
590
|
}),
|
|
590
|
-
|
|
591
|
+
Qt && !N && /* @__PURE__ */ h(c, {
|
|
591
592
|
fallback: null,
|
|
592
|
-
children: /* @__PURE__ */ h(
|
|
593
|
-
open:
|
|
594
|
-
onClose: () =>
|
|
593
|
+
children: /* @__PURE__ */ h(qe, {
|
|
594
|
+
open: Qt,
|
|
595
|
+
onClose: () => $t(!1),
|
|
595
596
|
widget: a
|
|
596
597
|
})
|
|
597
598
|
})
|
|
598
599
|
]
|
|
599
600
|
});
|
|
600
|
-
},
|
|
601
|
+
}, _t), g = l(() => import("../explore/SavedQueryWidget.js").then((e) => ({ default: e.SavedQueryWidget })));
|
|
601
602
|
function _({ widget: e }) {
|
|
602
603
|
return r((e) => e.viewMode === "edit") ? /* @__PURE__ */ h("div", {
|
|
603
604
|
className: "float-right ml-2",
|
|
@@ -607,12 +608,12 @@ function _({ widget: e }) {
|
|
|
607
608
|
})
|
|
608
609
|
}) : null;
|
|
609
610
|
}
|
|
610
|
-
function
|
|
611
|
-
let { t } =
|
|
611
|
+
function yt({ title: e }) {
|
|
612
|
+
let { t } = We(), n = i({
|
|
612
613
|
historyAvailable: !1,
|
|
613
614
|
reason: "HISTORY_NOT_AVAILABLE"
|
|
614
615
|
}, t);
|
|
615
|
-
return /* @__PURE__ */
|
|
616
|
+
return /* @__PURE__ */ Ke("section", {
|
|
616
617
|
"aria-label": e ?? void 0,
|
|
617
618
|
"data-testid": "saved-query-history-unavailable",
|
|
618
619
|
className: "h-full min-w-0 rounded-lg border border-[var(--color-border-subtle)] bg-bg-surface p-3",
|
|
@@ -623,8 +624,8 @@ function vt({ title: e }) {
|
|
|
623
624
|
});
|
|
624
625
|
}
|
|
625
626
|
var v = (e) => {
|
|
626
|
-
let { asOf: t } =
|
|
627
|
-
return e.widget.savedQueryId ? t ? /* @__PURE__ */ h(
|
|
627
|
+
let { asOf: t } = pe();
|
|
628
|
+
return e.widget.savedQueryId ? t ? /* @__PURE__ */ h(yt, { title: e.widget.title }) : /* @__PURE__ */ h(c, {
|
|
628
629
|
fallback: /* @__PURE__ */ h("span", {
|
|
629
630
|
role: "status",
|
|
630
631
|
children: "Loading widget…"
|
|
@@ -634,6 +635,6 @@ var v = (e) => {
|
|
|
634
635
|
title: e.widget.title,
|
|
635
636
|
controls: e.previewOnly ? void 0 : /* @__PURE__ */ h(_, { widget: e.widget })
|
|
636
637
|
})
|
|
637
|
-
}) : /* @__PURE__ */ h(
|
|
638
|
+
}) : /* @__PURE__ */ h(vt, { ...e });
|
|
638
639
|
};
|
|
639
640
|
export { v as WidgetWrapper, v as default };
|