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