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