@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.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/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
- package/dist/bigconsole/pages/DashboardsPage.js +638 -855
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/package.json +4 -4
|
@@ -4,33 +4,34 @@ import { Section as i } from "../common/Section.js";
|
|
|
4
4
|
import "../../hooks/useDrilldown.js";
|
|
5
5
|
import "../common/index.js";
|
|
6
6
|
import { memo as a, useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { ThemedSelect as u } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
9
|
+
import { useApolloClient as f, useQuery as p } from "@apollo/client/react";
|
|
10
|
+
import { Fragment as ee, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
10
11
|
// src/bigconsole/components/widgets/DrilldownConfigPanel.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var g = "min-h-control-md rounded-input border border-[var(--color-border-subtle)] bg-bg-surface py-2 text-sm text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface", _ = `${g} w-full px-3`, v = "bg-action-primary-bg border-action-primary-bg", y = "bg-bg-sunken border-[var(--color-border-strong)]", b = "bg-bg-surface shadow-[var(--shadow-elevation-1)]", te = 50, x = 250;
|
|
13
|
+
function S(e, t = "") {
|
|
13
14
|
if (!e || typeof e != "object") return [];
|
|
14
15
|
let n = [];
|
|
15
|
-
if (Array.isArray(e)) return e.length > 0 && typeof e[0] == "object" ?
|
|
16
|
+
if (Array.isArray(e)) return e.length > 0 && typeof e[0] == "object" ? S(e[0], t) : [];
|
|
16
17
|
for (let [r, i] of Object.entries(e)) {
|
|
17
18
|
let e = t ? `${t}.${r}` : r;
|
|
18
|
-
n.push(e), i && typeof i == "object" && !Array.isArray(i) && t.split(".").length < 2 && n.push(...
|
|
19
|
+
n.push(e), i && typeof i == "object" && !Array.isArray(i) && t.split(".").length < 2 && n.push(...S(i, e));
|
|
19
20
|
}
|
|
20
21
|
return n;
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
+
var C = [
|
|
23
24
|
"row",
|
|
24
25
|
"column",
|
|
25
26
|
"value"
|
|
26
27
|
];
|
|
27
|
-
function
|
|
28
|
+
function w(e, t) {
|
|
28
29
|
let n = [
|
|
29
30
|
"{{widget.value}}",
|
|
30
31
|
"{{widget.title}}",
|
|
31
32
|
"{{widget.id}}"
|
|
32
33
|
], r = ["{{globals.vars.dateFrom}}", "{{globals.vars.dateTo}}"];
|
|
33
|
-
if (e === "heatmap") return [...
|
|
34
|
+
if (e === "heatmap") return [...C.map((e) => `{{row.${e}}}`), ...r];
|
|
34
35
|
if (!t) return [];
|
|
35
36
|
let i = [
|
|
36
37
|
"row",
|
|
@@ -38,11 +39,11 @@ function x(e, t) {
|
|
|
38
39
|
"point",
|
|
39
40
|
"selectedData"
|
|
40
41
|
], a = [];
|
|
41
|
-
for (let e of
|
|
42
|
+
for (let e of S(t)) for (let t of i) a.push(`{{${t}.${e}}}`);
|
|
42
43
|
return a.push(...n, ...r), [...new Set(a)];
|
|
43
44
|
}
|
|
44
|
-
var
|
|
45
|
-
let { t:
|
|
45
|
+
var T = a(function({ widget: a, onChange: S, widgetData: C }) {
|
|
46
|
+
let { t: T } = d(), E = f(), [D, ne] = l(a.drilldown?.enabled ?? !1), [O, re] = l(a.drilldown?.targetDashboardId ?? ""), [k, A] = l(a.drilldown?.targetPageId ?? null), [j, ie] = l(a.drilldown?.navigationMode ?? "MODAL"), [M, ae] = l(a.drilldown?.passGlobalFilters ?? !0), [N, oe] = l(a.drilldown?.maxDepth ?? 3), [P, F] = l(() => {
|
|
46
47
|
let e = a.drilldown?.parameterMapping;
|
|
47
48
|
return e ? Object.entries(e).map(([e, t]) => ({
|
|
48
49
|
key: e,
|
|
@@ -51,13 +52,13 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
51
52
|
key: "",
|
|
52
53
|
value: ""
|
|
53
54
|
}];
|
|
54
|
-
}), [
|
|
55
|
+
}), [I, se] = l([]), [ce, L] = l(!1), [le, R] = l(!1), [z, ue] = l(""), [de, B] = l(null), V = a.dashboardId ?? "", H = !!O && O === V, U = a.drilldown?.id, { data: W } = p(t, {
|
|
55
56
|
variables: { widgetId: a.id },
|
|
56
57
|
skip: !U,
|
|
57
58
|
fetchPolicy: "cache-and-network"
|
|
58
|
-
}), G = W?.getWidget?.drilldown,
|
|
59
|
-
variables: { id:
|
|
60
|
-
skip: !
|
|
59
|
+
}), G = W?.getWidget?.drilldown, fe = !!U && !!W && !G?.targetDashboard && O === (a.drilldown?.targetDashboardId ?? ""), { data: K, loading: q } = p(e, {
|
|
60
|
+
variables: { id: O },
|
|
61
|
+
skip: !O,
|
|
61
62
|
fetchPolicy: "cache-first"
|
|
62
63
|
}), J = c(() => (K?.getDashboard?.pages?.edges ?? []).map((e) => e?.node).filter((e) => !!e).map((e) => ({
|
|
63
64
|
id: e.id,
|
|
@@ -67,47 +68,47 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
67
68
|
H,
|
|
68
69
|
J,
|
|
69
70
|
a.pageId
|
|
70
|
-
]), X =
|
|
71
|
+
]), X = D && H && !k, Z = c(() => w(a.type, C), [a.type, C]), Q = o(() => {
|
|
71
72
|
let e = {};
|
|
72
|
-
for (let { key: t, value: n } of
|
|
73
|
-
|
|
74
|
-
enabled:
|
|
75
|
-
targetDashboardId:
|
|
76
|
-
targetPageId:
|
|
77
|
-
navigationMode:
|
|
73
|
+
for (let { key: t, value: n } of P) t.trim() && n.trim() && (e[t.trim()] = n.trim());
|
|
74
|
+
S?.({
|
|
75
|
+
enabled: D,
|
|
76
|
+
targetDashboardId: O,
|
|
77
|
+
targetPageId: k,
|
|
78
|
+
navigationMode: j,
|
|
78
79
|
parameterMapping: e,
|
|
79
|
-
passGlobalFilters:
|
|
80
|
-
maxDepth:
|
|
80
|
+
passGlobalFilters: M,
|
|
81
|
+
maxDepth: N
|
|
81
82
|
});
|
|
82
83
|
}, [
|
|
83
|
-
|
|
84
|
-
T,
|
|
85
|
-
E,
|
|
84
|
+
D,
|
|
86
85
|
O,
|
|
87
|
-
|
|
88
|
-
A,
|
|
86
|
+
k,
|
|
89
87
|
j,
|
|
90
|
-
|
|
88
|
+
P,
|
|
89
|
+
M,
|
|
90
|
+
N,
|
|
91
|
+
S
|
|
91
92
|
]);
|
|
92
93
|
s(() => {
|
|
93
94
|
Q();
|
|
94
95
|
}, [
|
|
95
|
-
|
|
96
|
-
T,
|
|
97
|
-
E,
|
|
96
|
+
D,
|
|
98
97
|
O,
|
|
99
|
-
|
|
100
|
-
A,
|
|
98
|
+
k,
|
|
101
99
|
j,
|
|
100
|
+
P,
|
|
101
|
+
M,
|
|
102
|
+
N,
|
|
102
103
|
Q
|
|
103
104
|
]), s(() => {
|
|
104
105
|
let e = !1, t = setTimeout(async () => {
|
|
105
|
-
|
|
106
|
+
L(!0), R(!1);
|
|
106
107
|
try {
|
|
107
|
-
let t =
|
|
108
|
+
let t = z.trim(), r = await E.query({
|
|
108
109
|
query: n,
|
|
109
110
|
variables: {
|
|
110
|
-
first:
|
|
111
|
+
first: te,
|
|
111
112
|
...t ? { search: t } : {}
|
|
112
113
|
},
|
|
113
114
|
fetchPolicy: "cache-first"
|
|
@@ -119,159 +120,159 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
119
120
|
name: e.name
|
|
120
121
|
})));
|
|
121
122
|
} catch {
|
|
122
|
-
e ||
|
|
123
|
+
e || R(!0);
|
|
123
124
|
} finally {
|
|
124
|
-
e ||
|
|
125
|
+
e || L(!1);
|
|
125
126
|
}
|
|
126
|
-
},
|
|
127
|
+
}, x);
|
|
127
128
|
return () => {
|
|
128
129
|
e = !0, clearTimeout(t);
|
|
129
130
|
};
|
|
130
|
-
}, [
|
|
131
|
-
let
|
|
132
|
-
let e =
|
|
133
|
-
if (
|
|
134
|
-
let t = G?.targetDashboard?.id ===
|
|
131
|
+
}, [E, z]);
|
|
132
|
+
let pe = c(() => {
|
|
133
|
+
let e = I.filter((e) => e.id !== V);
|
|
134
|
+
if (O && O !== V && !e.some((e) => e.id === O)) {
|
|
135
|
+
let t = G?.targetDashboard?.id === O ? G.targetDashboard.name : void 0;
|
|
135
136
|
e.unshift({
|
|
136
|
-
id:
|
|
137
|
-
name: t ??
|
|
137
|
+
id: O,
|
|
138
|
+
name: t ?? T("bigconsole.widget.drilldown.unavailableDashboard", "Unavailable dashboard")
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
return e;
|
|
141
142
|
}, [
|
|
142
|
-
|
|
143
|
+
I,
|
|
143
144
|
V,
|
|
144
|
-
|
|
145
|
+
O,
|
|
145
146
|
G,
|
|
146
|
-
|
|
147
|
-
]),
|
|
148
|
-
|
|
149
|
-
}, []),
|
|
150
|
-
|
|
147
|
+
T
|
|
148
|
+
]), me = o((e) => {
|
|
149
|
+
re(e), A(null);
|
|
150
|
+
}, []), he = o(() => {
|
|
151
|
+
F((e) => [...e, {
|
|
151
152
|
key: "",
|
|
152
153
|
value: ""
|
|
153
154
|
}]);
|
|
154
|
-
}, []),
|
|
155
|
-
|
|
155
|
+
}, []), ge = o((e) => {
|
|
156
|
+
F((t) => t.filter((t, n) => n !== e));
|
|
156
157
|
}, []), $ = o((e, t, n) => {
|
|
157
|
-
|
|
158
|
+
F((r) => r.map((r, i) => i === e ? {
|
|
158
159
|
...r,
|
|
159
160
|
[t]: n
|
|
160
161
|
} : r));
|
|
161
162
|
}, []);
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ h("div", {
|
|
163
164
|
className: "min-w-0 space-y-form-gap",
|
|
164
165
|
children: [
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ h("div", {
|
|
166
167
|
className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-card border border-[var(--color-border-subtle)] bg-bg-surface p-3",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ m("label", {
|
|
168
169
|
htmlFor: "drilldown-enable",
|
|
169
170
|
className: "text-sm font-medium text-text-primary",
|
|
170
|
-
children:
|
|
171
|
-
}), /* @__PURE__ */
|
|
171
|
+
children: T("bigconsole.widget.drilldown.enableLabel", "Enable Drilldown")
|
|
172
|
+
}), /* @__PURE__ */ m("button", {
|
|
172
173
|
id: "drilldown-enable",
|
|
173
174
|
type: "button",
|
|
174
175
|
role: "switch",
|
|
175
|
-
"aria-checked":
|
|
176
|
-
onClick: () =>
|
|
177
|
-
className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border motion-safe:transition-colors ${r} ${
|
|
178
|
-
children: /* @__PURE__ */
|
|
176
|
+
"aria-checked": D,
|
|
177
|
+
onClick: () => ne(!D),
|
|
178
|
+
className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border motion-safe:transition-colors ${r} ${D ? v : y}`,
|
|
179
|
+
children: /* @__PURE__ */ m("span", { className: `inline-block h-4 w-4 transform rounded-full motion-safe:transition-transform ${b} ${D ? "translate-x-6" : "translate-x-1"}` })
|
|
179
180
|
})]
|
|
180
181
|
}),
|
|
181
|
-
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
/* @__PURE__ */
|
|
182
|
+
D && /* @__PURE__ */ h(ee, { children: [
|
|
183
|
+
/* @__PURE__ */ h("div", { children: [
|
|
184
|
+
/* @__PURE__ */ m("label", {
|
|
184
185
|
htmlFor: "drilldown-target",
|
|
185
186
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
186
|
-
children:
|
|
187
|
+
children: T("bigconsole.widget.drilldown.targetDashboardLabel", "Target Dashboard")
|
|
187
188
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ m("input", {
|
|
189
190
|
type: "search",
|
|
190
|
-
value:
|
|
191
|
+
value: z,
|
|
191
192
|
onChange: (e) => ue(e.target.value),
|
|
192
|
-
placeholder:
|
|
193
|
-
"aria-label":
|
|
194
|
-
className: `${
|
|
193
|
+
placeholder: T("bigconsole.widget.drilldown.searchDashboards", "Search dashboards..."),
|
|
194
|
+
"aria-label": T("bigconsole.widget.drilldown.searchDashboards", "Search dashboards..."),
|
|
195
|
+
className: `${_} mb-2`,
|
|
195
196
|
"data-testid": "drilldown-dashboard-search"
|
|
196
197
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ h(u, {
|
|
198
199
|
id: "drilldown-target",
|
|
199
|
-
value:
|
|
200
|
-
onChange: (e) =>
|
|
201
|
-
className:
|
|
200
|
+
value: O,
|
|
201
|
+
onChange: (e) => me(e.target.value),
|
|
202
|
+
className: _,
|
|
202
203
|
"data-testid": "drilldown-target-dashboard",
|
|
203
204
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ m("option", {
|
|
205
206
|
value: "",
|
|
206
|
-
children:
|
|
207
|
+
children: T("bigconsole.widget.drilldown.selectDashboard", "Select a dashboard...")
|
|
207
208
|
}),
|
|
208
|
-
V && /* @__PURE__ */
|
|
209
|
+
V && /* @__PURE__ */ m("option", {
|
|
209
210
|
value: V,
|
|
210
|
-
children:
|
|
211
|
+
children: T("bigconsole.widget.drilldown.thisDashboard", "This dashboard (another page)")
|
|
211
212
|
}),
|
|
212
|
-
|
|
213
|
+
pe.map((e) => /* @__PURE__ */ m("option", {
|
|
213
214
|
value: e.id,
|
|
214
215
|
children: e.name
|
|
215
216
|
}, e.id))
|
|
216
217
|
]
|
|
217
218
|
}),
|
|
218
|
-
ce && /* @__PURE__ */
|
|
219
|
+
ce && /* @__PURE__ */ m("p", {
|
|
219
220
|
className: "mt-1 text-xs text-text-muted",
|
|
220
221
|
role: "status",
|
|
221
|
-
children:
|
|
222
|
+
children: T("bigconsole.widget.drilldown.loadingDashboards", "Loading dashboards...")
|
|
222
223
|
}),
|
|
223
|
-
le && /* @__PURE__ */
|
|
224
|
+
le && /* @__PURE__ */ m("p", {
|
|
224
225
|
className: "mt-1 text-xs text-[var(--color-status-error-text)]",
|
|
225
226
|
role: "alert",
|
|
226
|
-
children:
|
|
227
|
+
children: T("bigconsole.widget.drilldown.dashboardsLoadError", "Could not load dashboards. Try again.")
|
|
227
228
|
})
|
|
228
229
|
] }),
|
|
229
|
-
|
|
230
|
-
/* @__PURE__ */
|
|
230
|
+
O && /* @__PURE__ */ h("div", { children: [
|
|
231
|
+
/* @__PURE__ */ m("label", {
|
|
231
232
|
htmlFor: "drilldown-target-page",
|
|
232
233
|
className: "mb-1 block text-sm font-medium text-text-primary",
|
|
233
|
-
children:
|
|
234
|
+
children: T("bigconsole.widget.drilldown.targetPageLabel", "Target Page")
|
|
234
235
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ h(u, {
|
|
236
237
|
id: "drilldown-target-page",
|
|
237
|
-
value:
|
|
238
|
-
onChange: (e) =>
|
|
238
|
+
value: k ?? "",
|
|
239
|
+
onChange: (e) => A(e.target.value || null),
|
|
239
240
|
disabled: q,
|
|
240
241
|
"aria-invalid": X,
|
|
241
|
-
className:
|
|
242
|
+
className: _,
|
|
242
243
|
"data-testid": "drilldown-target-page",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ m("option", {
|
|
244
245
|
value: "",
|
|
245
|
-
children: H ?
|
|
246
|
-
}), Y.map((e, t) => /* @__PURE__ */
|
|
246
|
+
children: H ? T("bigconsole.widget.drilldown.selectPage", "Select a page...") : T("bigconsole.widget.drilldown.firstPage", "First page (default)")
|
|
247
|
+
}), Y.map((e, t) => /* @__PURE__ */ m("option", {
|
|
247
248
|
value: e.id,
|
|
248
|
-
children: e.name ||
|
|
249
|
+
children: e.name || T("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 })
|
|
249
250
|
}, e.id))]
|
|
250
251
|
}),
|
|
251
|
-
X && /* @__PURE__ */
|
|
252
|
+
X && /* @__PURE__ */ m("p", {
|
|
252
253
|
className: "mt-1 text-xs text-[var(--color-status-error-text)]",
|
|
253
254
|
role: "alert",
|
|
254
|
-
children: Y.length === 0 && !q ?
|
|
255
|
+
children: Y.length === 0 && !q ? T("bigconsole.widget.drilldown.noOtherPages", "This dashboard has no other page. Add a page, or pick another dashboard.") : T("bigconsole.widget.drilldown.samePageRequired", "Pick the page of this dashboard to open.")
|
|
255
256
|
})
|
|
256
257
|
] }),
|
|
257
|
-
|
|
258
|
+
fe && /* @__PURE__ */ m(i, {
|
|
258
259
|
tone: "warning",
|
|
259
260
|
padding: "compact",
|
|
260
261
|
headingLevel: 4,
|
|
261
|
-
title:
|
|
262
|
+
title: T("bigconsole.widget.drilldown.unavailableTitle", "Target unavailable"),
|
|
262
263
|
"data-testid": "drilldown-target-unavailable",
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ m("p", {
|
|
264
265
|
className: "text-xs text-text-secondary",
|
|
265
|
-
children:
|
|
266
|
+
children: T("bigconsole.widget.drilldown.unavailableHelp", "The target dashboard was deleted, archived, or is no longer shared with you. Viewers see a notice instead of navigating. Pick another target.")
|
|
266
267
|
})
|
|
267
268
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
269
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ h("div", { children: [
|
|
270
|
+
/* @__PURE__ */ m("p", {
|
|
270
271
|
className: "mb-1 text-sm font-medium text-text-primary",
|
|
271
272
|
id: "drilldown-nav-mode-label",
|
|
272
|
-
children:
|
|
273
|
+
children: T("bigconsole.widget.drilldown.navigationModeLabel", "Navigation Mode")
|
|
273
274
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ m("div", {
|
|
275
276
|
className: "flex flex-wrap gap-2",
|
|
276
277
|
role: "group",
|
|
277
278
|
"aria-labelledby": "drilldown-nav-mode-label",
|
|
@@ -279,74 +280,74 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
279
280
|
"MODAL",
|
|
280
281
|
"NEW_TAB",
|
|
281
282
|
"SAME_WINDOW"
|
|
282
|
-
].map((e) => /* @__PURE__ */
|
|
283
|
+
].map((e) => /* @__PURE__ */ h("button", {
|
|
283
284
|
type: "button",
|
|
284
|
-
"aria-pressed":
|
|
285
|
-
onClick: () =>
|
|
286
|
-
className: `min-h-control-md min-w-[7rem] flex-1 rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${
|
|
285
|
+
"aria-pressed": j === e,
|
|
286
|
+
onClick: () => ie(e),
|
|
287
|
+
className: `min-h-control-md min-w-[7rem] flex-1 rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${j === e ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"}`,
|
|
287
288
|
children: [
|
|
288
|
-
e === "MODAL" &&
|
|
289
|
-
e === "NEW_TAB" &&
|
|
290
|
-
e === "SAME_WINDOW" &&
|
|
289
|
+
e === "MODAL" && T("bigconsole.widget.drilldown.mode.modal", "Modal"),
|
|
290
|
+
e === "NEW_TAB" && T("bigconsole.widget.drilldown.mode.newTab", "New Tab"),
|
|
291
|
+
e === "SAME_WINDOW" && T("bigconsole.widget.drilldown.mode.sameWindow", "Same Window")
|
|
291
292
|
]
|
|
292
293
|
}, e))
|
|
293
294
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ h("p", {
|
|
295
296
|
className: "mt-1 text-xs text-text-muted",
|
|
296
297
|
children: [
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
j === "MODAL" && T("bigconsole.widget.drilldown.modeHelp.modal", "Opens the target in a modal overlay"),
|
|
299
|
+
j === "NEW_TAB" && T("bigconsole.widget.drilldown.modeHelp.newTab", "Opens the target in a new browser tab"),
|
|
300
|
+
j === "SAME_WINDOW" && T("bigconsole.widget.drilldown.modeHelp.sameWindow", "Navigates to the target in the current window; Back returns here")
|
|
300
301
|
]
|
|
301
302
|
})
|
|
302
303
|
] }),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ h("div", { children: [
|
|
305
|
+
/* @__PURE__ */ h("div", {
|
|
305
306
|
className: "mb-2 flex flex-wrap items-center justify-between gap-2",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ m("p", {
|
|
307
308
|
className: "text-sm font-medium text-text-primary",
|
|
308
|
-
children:
|
|
309
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: T("bigconsole.widget.drilldown.parameterMappingsLabel", "Parameter Mappings")
|
|
310
|
+
}), /* @__PURE__ */ m("button", {
|
|
310
311
|
type: "button",
|
|
311
|
-
onClick:
|
|
312
|
+
onClick: he,
|
|
312
313
|
className: "rounded-button px-1 text-xs text-text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
313
|
-
children:
|
|
314
|
+
children: T("bigconsole.widget.drilldown.addParameter", "+ Add Parameter")
|
|
314
315
|
})]
|
|
315
316
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ m("div", {
|
|
317
318
|
className: "space-y-2",
|
|
318
|
-
children:
|
|
319
|
+
children: P.map((e, t) => /* @__PURE__ */ m("div", {
|
|
319
320
|
className: "relative",
|
|
320
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ h("div", {
|
|
321
322
|
className: "flex min-w-0 flex-wrap items-center gap-2",
|
|
322
323
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ m("input", {
|
|
324
325
|
type: "text",
|
|
325
326
|
value: e.key,
|
|
326
327
|
onChange: (e) => $(t, "key", e.target.value),
|
|
327
|
-
placeholder:
|
|
328
|
+
placeholder: T("bigconsole.widget.drilldown.parameterNamePlaceholder", "Parameter name"),
|
|
328
329
|
"aria-label": `Parameter ${t + 1} name`,
|
|
329
|
-
className: `${
|
|
330
|
+
className: `${_} min-w-[7rem] flex-1`
|
|
330
331
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ m("span", {
|
|
332
333
|
"aria-hidden": "true",
|
|
333
334
|
className: "text-text-muted",
|
|
334
335
|
children: "="
|
|
335
336
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ h("div", {
|
|
337
338
|
className: "relative min-w-[7rem] flex-1",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ m("input", {
|
|
339
340
|
type: "text",
|
|
340
341
|
value: e.value,
|
|
341
342
|
onChange: (e) => $(t, "value", e.target.value),
|
|
342
343
|
onFocus: () => B(t),
|
|
343
344
|
onBlur: () => setTimeout(() => B(null), 200),
|
|
344
|
-
placeholder:
|
|
345
|
+
placeholder: T("bigconsole.widget.drilldown.parameterValuePlaceholder", "{{row.field}} or static"),
|
|
345
346
|
"aria-label": `Parameter ${t + 1} value`,
|
|
346
|
-
className:
|
|
347
|
-
}),
|
|
347
|
+
className: _
|
|
348
|
+
}), de === t && Z.length > 0 && /* @__PURE__ */ m("div", {
|
|
348
349
|
className: "absolute left-0 right-0 top-full z-10 mt-1 max-h-40 overflow-y-auto rounded-input border border-[var(--color-border-subtle)] bg-bg-surface shadow-[var(--shadow-elevation-2)]",
|
|
349
|
-
children: Z.slice(0, 10).map((e) => /* @__PURE__ */
|
|
350
|
+
children: Z.slice(0, 10).map((e) => /* @__PURE__ */ m("button", {
|
|
350
351
|
type: "button",
|
|
351
352
|
onClick: () => {
|
|
352
353
|
$(t, "value", e), B(null);
|
|
@@ -356,17 +357,17 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
356
357
|
}, e))
|
|
357
358
|
})]
|
|
358
359
|
}),
|
|
359
|
-
|
|
360
|
+
P.length > 1 && /* @__PURE__ */ m("button", {
|
|
360
361
|
type: "button",
|
|
361
|
-
onClick: () =>
|
|
362
|
+
onClick: () => ge(t),
|
|
362
363
|
"aria-label": `Remove parameter ${t + 1}`,
|
|
363
364
|
className: "rounded-button p-1 text-text-muted hover:text-[var(--color-status-error-text)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
364
|
-
children: /* @__PURE__ */
|
|
365
|
+
children: /* @__PURE__ */ m("svg", {
|
|
365
366
|
className: "h-icon-sm w-icon-sm",
|
|
366
367
|
fill: "none",
|
|
367
368
|
stroke: "currentColor",
|
|
368
369
|
viewBox: "0 0 24 24",
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ m("path", {
|
|
370
371
|
strokeLinecap: "round",
|
|
371
372
|
strokeLinejoin: "round",
|
|
372
373
|
strokeWidth: 2,
|
|
@@ -378,93 +379,93 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
378
379
|
})
|
|
379
380
|
}, t))
|
|
380
381
|
}),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ h("p", {
|
|
382
383
|
className: "mt-2 text-xs text-text-muted",
|
|
383
384
|
children: [
|
|
384
|
-
|
|
385
|
+
T("bigconsole.widget.drilldown.paramHelp.usePrefix", "Use"),
|
|
385
386
|
" ",
|
|
386
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ m("code", {
|
|
387
388
|
className: "px-1 bg-bg-sunken rounded",
|
|
388
389
|
children: "{{row.field}}"
|
|
389
390
|
}),
|
|
390
391
|
" ",
|
|
391
|
-
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
|
|
392
|
+
T("bigconsole.widget.drilldown.paramHelp.useSuffix", "for dynamic values or enter static text."),
|
|
393
|
+
/* @__PURE__ */ m("br", {}),
|
|
394
|
+
T("bigconsole.widget.drilldown.paramHelp.examples", "Examples:"),
|
|
394
395
|
" ",
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ m("code", {
|
|
396
397
|
className: "px-1 bg-bg-sunken rounded",
|
|
397
398
|
children: "{{row.category}}"
|
|
398
399
|
}),
|
|
399
400
|
",",
|
|
400
401
|
" ",
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ m("code", {
|
|
402
403
|
className: "px-1 bg-bg-sunken rounded",
|
|
403
404
|
children: "{{item.id}}"
|
|
404
405
|
}),
|
|
405
406
|
",",
|
|
406
407
|
" ",
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ m("code", {
|
|
408
409
|
className: "px-1 bg-bg-sunken rounded",
|
|
409
410
|
children: "{{globals.vars.dateFrom}}"
|
|
410
411
|
})
|
|
411
412
|
]
|
|
412
413
|
})
|
|
413
414
|
] }),
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ m(i, {
|
|
415
416
|
emphasis: "muted",
|
|
416
417
|
padding: "compact",
|
|
417
418
|
headingLevel: 4,
|
|
418
|
-
title:
|
|
419
|
-
description:
|
|
419
|
+
title: T("bigconsole.widget.drilldown.advancedOptions", "Advanced Options"),
|
|
420
|
+
description: T("bigconsole.widget.drilldown.advancedOptionsHelp", "Rarely changed. Defaults suit most drilldowns."),
|
|
420
421
|
"data-testid": "drilldown-advanced",
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
+
children: /* @__PURE__ */ h("div", {
|
|
422
423
|
className: "flex flex-col gap-2",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ h("div", {
|
|
424
425
|
className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-button bg-bg-surface p-2",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ h("div", {
|
|
426
427
|
className: "min-w-0",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ m("label", {
|
|
428
429
|
htmlFor: "drilldown-pass-filters",
|
|
429
430
|
className: "text-sm text-text-primary",
|
|
430
|
-
children:
|
|
431
|
-
}), /* @__PURE__ */
|
|
431
|
+
children: T("bigconsole.widget.drilldown.passGlobalFiltersLabel", "Pass Global Filters")
|
|
432
|
+
}), /* @__PURE__ */ m("p", {
|
|
432
433
|
className: "text-xs text-text-muted",
|
|
433
|
-
children:
|
|
434
|
+
children: T("bigconsole.widget.drilldown.passGlobalFiltersHelp", "Include current dashboard filters in drilldown")
|
|
434
435
|
})]
|
|
435
|
-
}), /* @__PURE__ */
|
|
436
|
+
}), /* @__PURE__ */ m("button", {
|
|
436
437
|
id: "drilldown-pass-filters",
|
|
437
438
|
type: "button",
|
|
438
439
|
role: "switch",
|
|
439
|
-
"aria-checked":
|
|
440
|
-
onClick: () =>
|
|
441
|
-
className: `relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${
|
|
442
|
-
children: /* @__PURE__ */
|
|
440
|
+
"aria-checked": M,
|
|
441
|
+
onClick: () => ae(!M),
|
|
442
|
+
className: `relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${M ? v : y}`,
|
|
443
|
+
children: /* @__PURE__ */ m("span", { className: `inline-block h-3 w-3 transform rounded-full motion-safe:transition-transform ${b} ${M ? "translate-x-5" : "translate-x-1"}` })
|
|
443
444
|
})]
|
|
444
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ h("div", {
|
|
445
446
|
className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-button bg-bg-surface p-2",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ h("div", {
|
|
447
448
|
className: "min-w-0",
|
|
448
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ m("label", {
|
|
449
450
|
htmlFor: "drilldown-max-depth",
|
|
450
451
|
className: "text-sm text-text-primary",
|
|
451
|
-
children:
|
|
452
|
-
}), /* @__PURE__ */
|
|
452
|
+
children: T("bigconsole.widget.drilldown.maxDepthLabel", "Max Drilldown Depth")
|
|
453
|
+
}), /* @__PURE__ */ m("p", {
|
|
453
454
|
className: "text-xs text-text-muted",
|
|
454
|
-
children:
|
|
455
|
+
children: T("bigconsole.widget.drilldown.maxDepthHelp", "Limit nested drilldown levels")
|
|
455
456
|
})]
|
|
456
|
-
}), /* @__PURE__ */
|
|
457
|
+
}), /* @__PURE__ */ m(u, {
|
|
457
458
|
id: "drilldown-max-depth",
|
|
458
|
-
value:
|
|
459
|
-
onChange: (e) =>
|
|
460
|
-
className: `${
|
|
459
|
+
value: N,
|
|
460
|
+
onChange: (e) => oe(Number(e.target.value)),
|
|
461
|
+
className: `${g} w-auto min-w-[4rem] shrink-0 px-2`,
|
|
461
462
|
children: [
|
|
462
463
|
1,
|
|
463
464
|
2,
|
|
464
465
|
3,
|
|
465
466
|
4,
|
|
466
467
|
5
|
|
467
|
-
].map((e) => /* @__PURE__ */
|
|
468
|
+
].map((e) => /* @__PURE__ */ m("option", {
|
|
468
469
|
value: e,
|
|
469
470
|
children: e
|
|
470
471
|
}, e))
|
|
@@ -473,18 +474,18 @@ var S = a(function({ widget: a, onChange: y, widgetData: b }) {
|
|
|
473
474
|
})
|
|
474
475
|
})
|
|
475
476
|
] }),
|
|
476
|
-
!
|
|
477
|
+
!D && a.drilldown?.id && /* @__PURE__ */ m(i, {
|
|
477
478
|
tone: "warning",
|
|
478
479
|
padding: "compact",
|
|
479
480
|
headingLevel: 4,
|
|
480
|
-
title:
|
|
481
|
+
title: T("bigconsole.widget.drilldown.removalTitle", "Drilldown will be removed"),
|
|
481
482
|
"data-testid": "drilldown-removal-notice",
|
|
482
|
-
children: /* @__PURE__ */
|
|
483
|
+
children: /* @__PURE__ */ m("p", {
|
|
483
484
|
className: "text-xs text-text-secondary",
|
|
484
|
-
children:
|
|
485
|
+
children: T("bigconsole.widget.drilldown.removalWarning", "Drilldown will be removed when you save changes.")
|
|
485
486
|
})
|
|
486
487
|
})
|
|
487
488
|
]
|
|
488
489
|
});
|
|
489
490
|
});
|
|
490
|
-
export {
|
|
491
|
+
export { T as DrilldownConfigPanel, T as default, w as buildMappingSuggestions };
|