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