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