@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.
Files changed (50) hide show
  1. package/dist/bigconsole/assistant/assistantRunPersistence.js +111 -0
  2. package/dist/bigconsole/assistant/assistantRunPersistence.js.map +1 -0
  3. package/dist/bigconsole/assistant/assistantRunStore.js +87 -48
  4. package/dist/bigconsole/assistant/assistantRunStore.js.map +1 -1
  5. package/dist/bigconsole/assistant/previewController.js +19 -50
  6. package/dist/bigconsole/assistant/previewController.js.map +1 -1
  7. package/dist/bigconsole/assistant/useAssistantRunWorkspace.js +14 -0
  8. package/dist/bigconsole/assistant/useAssistantRunWorkspace.js.map +1 -0
  9. package/dist/bigconsole/components/DrilldownDashboardRenderer.js +74 -50
  10. package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
  11. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +9 -4
  12. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  13. package/dist/bigconsole/components/embed/ReadOnlyDashboardRenderer.js +68 -40
  14. package/dist/bigconsole/components/embed/ReadOnlyDashboardRenderer.js.map +1 -1
  15. package/dist/bigconsole/components/embed/drilldown.js +26 -0
  16. package/dist/bigconsole/components/embed/drilldown.js.map +1 -0
  17. package/dist/bigconsole/components/embed/index.js +4 -3
  18. package/dist/bigconsole/components/embed/types.js.map +1 -1
  19. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +32 -30
  20. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
  21. package/dist/bigconsole/components/preview/AiPreviewPanel.js +38 -36
  22. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  23. package/dist/bigconsole/components/preview/previewShared.js +1 -1
  24. package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
  25. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +307 -233
  26. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  27. package/dist/bigconsole/components/widgets/PropertiesPanel.js +230 -220
  28. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  29. package/dist/bigconsole/components/widgets/WidgetWrapper.js +18 -19
  30. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  31. package/dist/bigconsole/context/BigConsoleContext.js +4 -1
  32. package/dist/bigconsole/context/BigConsoleContext.js.map +1 -1
  33. package/dist/bigconsole/hooks/useActivePage.js +25 -0
  34. package/dist/bigconsole/hooks/useActivePage.js.map +1 -0
  35. package/dist/bigconsole/hooks/useDrilldown.js +118 -71
  36. package/dist/bigconsole/hooks/useDrilldown.js.map +1 -1
  37. package/dist/bigconsole/hooks/useDrilldownOperations.js +32 -26
  38. package/dist/bigconsole/hooks/useDrilldownOperations.js.map +1 -1
  39. package/dist/bigconsole/hooks/useFilterUrlSync.js +1 -1
  40. package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
  41. package/dist/bigconsole/pages/DashboardBuilderPage.js +190 -185
  42. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  43. package/dist/bigconsole/pages/DashboardViewPage.js +224 -217
  44. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  45. package/dist/generated/wspace-operations.js +132 -86
  46. package/dist/generated/wspace-operations.js.map +1 -1
  47. package/dist/generated/wspace-types.js.map +1 -1
  48. package/package.json +3 -3
  49. package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js +0 -25
  50. package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js.map +0 -1
@@ -1,27 +1,27 @@
1
- import { ListDashboardsDocument as e } from "../../../generated/wspace-operations.js";
2
- import { SECTION_FOCUS_RING as t } from "../common/sectionStyles.js";
3
- import { Section as n } from "../common/Section.js";
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 r, useCallback as i, useEffect as a, useMemo as o, useState as s } from "react";
7
- import { useApolloClient as c } from "@apollo/client/react";
8
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
9
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
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 p = "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", m = `${p} w-full px-3`, h = "bg-action-primary-bg border-action-primary-bg", g = "bg-bg-sunken border-[var(--color-border-strong)]", _ = "bg-bg-surface shadow-[var(--shadow-elevation-1)]";
12
- function v(e, t = "") {
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" ? v(e[0], t) : [];
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(...v(i, e));
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 y = r(function({ widget: r, onChange: y, widgetData: b }) {
23
- let { t: x } = f(), S = c(), [C, w] = s(r.drilldown?.enabled ?? !1), [T, E] = s(r.drilldown?.targetDashboardId ?? ""), [D, O] = s(r.drilldown?.navigationMode ?? "MODAL"), [k, A] = s(r.drilldown?.passGlobalFilters ?? !0), [j, M] = s(r.drilldown?.maxDepth ?? 3), [N, P] = s(r.drilldown?.openIn ?? "same"), [F, I] = s(() => {
24
- let e = r.drilldown?.parameterMapping;
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
- }), [L, R] = s([]), [z, B] = s(!1), [V, H] = s(null), U = o(() => {
33
- if (!b) return [];
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 = v(b), n = [];
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
- }, [b]), W = i(() => {
58
+ }, [C]), Q = o(() => {
43
59
  let e = {};
44
- for (let { key: t, value: n } of F) t.trim() && n.trim() && (e[t.trim()] = n.trim());
45
- y?.({
46
- enabled: C,
47
- targetDashboardId: T,
48
- navigationMode: D,
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: k,
51
- maxDepth: j,
52
- openIn: N
67
+ passGlobalFilters: j,
68
+ maxDepth: N
53
69
  });
54
70
  }, [
55
- C,
56
- T,
71
+ E,
57
72
  D,
58
- F,
59
- k,
73
+ O,
74
+ A,
75
+ P,
60
76
  j,
61
77
  N,
62
- y
78
+ S
63
79
  ]);
64
- a(() => {
65
- W();
80
+ s(() => {
81
+ Q();
66
82
  }, [
67
- C,
68
- T,
83
+ E,
69
84
  D,
70
- F,
71
- k,
85
+ O,
86
+ A,
87
+ P,
72
88
  j,
73
89
  N,
74
- W
75
- ]), a(() => {
76
- async function t() {
77
- B(!0);
90
+ Q
91
+ ]), s(() => {
92
+ let e = !1, t = setTimeout(async () => {
93
+ L(!0), R(!1);
78
94
  try {
79
- R(((await S.query({
80
- query: e,
81
- variables: { first: 100 },
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
- })).data?.listDashboards?.edges || []).map((e) => {
84
- let t = e.node;
85
- return {
86
- id: t.id,
87
- name: t.name
88
- };
89
- }));
90
- } catch {} finally {
91
- B(!1);
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
- t();
95
- }, [S]);
96
- let G = i(() => {
97
- I((e) => [...e, {
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
- }, []), K = i((e) => {
102
- I((t) => t.filter((t, n) => n !== e));
103
- }, []), q = i((e, t, n) => {
104
- I((r) => r.map((r, i) => i === e ? {
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__ */ d("div", {
149
+ return /* @__PURE__ */ p("div", {
110
150
  className: "min-w-0 space-y-form-gap",
111
151
  children: [
112
- /* @__PURE__ */ d("div", {
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__ */ u("label", {
154
+ children: [/* @__PURE__ */ f("label", {
115
155
  htmlFor: "drilldown-enable",
116
156
  className: "text-sm font-medium text-text-primary",
117
- children: x("bigconsole.widget.drilldown.enableLabel", "Enable Drilldown")
118
- }), /* @__PURE__ */ u("button", {
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": C,
123
- onClick: () => w(!C),
124
- className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border motion-safe:transition-colors ${t} ${C ? h : g}`,
125
- children: /* @__PURE__ */ u("span", { className: `inline-block h-4 w-4 transform rounded-full motion-safe:transition-transform ${_} ${C ? "translate-x-6" : "translate-x-1"}` })
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
- C && /* @__PURE__ */ d(l, { children: [
129
- /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
130
- htmlFor: "drilldown-target",
131
- className: "mb-1 block text-sm font-medium text-text-primary",
132
- children: x("bigconsole.widget.drilldown.targetDashboardLabel", "Target Dashboard")
133
- }), /* @__PURE__ */ d("select", {
134
- id: "drilldown-target",
135
- value: T,
136
- onChange: (e) => E(e.target.value),
137
- disabled: z,
138
- className: m,
139
- children: [/* @__PURE__ */ u("option", {
140
- value: "",
141
- children: x("bigconsole.widget.drilldown.selectDashboard", "Select a dashboard...")
142
- }), L.filter((e) => e.id !== r.dashboardId).map((e) => /* @__PURE__ */ u("option", {
143
- value: e.id,
144
- children: e.name
145
- }, e.id))]
146
- })] }),
147
- /* @__PURE__ */ d("div", { children: [
148
- /* @__PURE__ */ u("p", {
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: x("bigconsole.widget.drilldown.navigationModeLabel", "Navigation Mode")
259
+ children: w("bigconsole.widget.drilldown.navigationModeLabel", "Navigation Mode")
152
260
  }),
153
- /* @__PURE__ */ u("div", {
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__ */ d("button", {
269
+ ].map((e) => /* @__PURE__ */ p("button", {
162
270
  type: "button",
163
- "aria-pressed": D === e,
164
- onClick: () => O(e),
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 ${D === e ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"}`,
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" && x("bigconsole.widget.drilldown.mode.modal", "Modal"),
168
- e === "NEW_TAB" && x("bigconsole.widget.drilldown.mode.newTab", "New Tab"),
169
- e === "SAME_WINDOW" && x("bigconsole.widget.drilldown.mode.sameWindow", "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__ */ d("p", {
281
+ /* @__PURE__ */ p("p", {
174
282
  className: "mt-1 text-xs text-text-muted",
175
283
  children: [
176
- D === "MODAL" && x("bigconsole.widget.drilldown.modeHelp.modal", "Opens target dashboard in a modal overlay"),
177
- D === "NEW_TAB" && x("bigconsole.widget.drilldown.modeHelp.newTab", "Opens target dashboard in a new browser tab"),
178
- D === "SAME_WINDOW" && x("bigconsole.widget.drilldown.modeHelp.sameWindow", "Navigates to target dashboard in current window")
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__ */ d("div", { children: [
183
- /* @__PURE__ */ d("div", {
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__ */ u("p", {
293
+ children: [/* @__PURE__ */ f("p", {
186
294
  className: "text-sm font-medium text-text-primary",
187
- children: x("bigconsole.widget.drilldown.parameterMappingsLabel", "Parameter Mappings")
188
- }), /* @__PURE__ */ u("button", {
295
+ children: w("bigconsole.widget.drilldown.parameterMappingsLabel", "Parameter Mappings")
296
+ }), /* @__PURE__ */ f("button", {
189
297
  type: "button",
190
- onClick: G,
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: x("bigconsole.widget.drilldown.addParameter", "+ Add Parameter")
300
+ children: w("bigconsole.widget.drilldown.addParameter", "+ Add Parameter")
193
301
  })]
194
302
  }),
195
- /* @__PURE__ */ u("div", {
303
+ /* @__PURE__ */ f("div", {
196
304
  className: "space-y-2",
197
- children: F.map((e, t) => /* @__PURE__ */ u("div", {
305
+ children: P.map((e, t) => /* @__PURE__ */ f("div", {
198
306
  className: "relative",
199
- children: /* @__PURE__ */ d("div", {
307
+ children: /* @__PURE__ */ p("div", {
200
308
  className: "flex min-w-0 flex-wrap items-center gap-2",
201
309
  children: [
202
- /* @__PURE__ */ u("input", {
310
+ /* @__PURE__ */ f("input", {
203
311
  type: "text",
204
312
  value: e.key,
205
- onChange: (e) => q(t, "key", e.target.value),
206
- placeholder: x("bigconsole.widget.drilldown.parameterNamePlaceholder", "Parameter name"),
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: `${m} min-w-[7rem] flex-1`
316
+ className: `${g} min-w-[7rem] flex-1`
209
317
  }),
210
- /* @__PURE__ */ u("span", {
318
+ /* @__PURE__ */ f("span", {
211
319
  "aria-hidden": "true",
212
320
  className: "text-text-muted",
213
321
  children: "="
214
322
  }),
215
- /* @__PURE__ */ d("div", {
323
+ /* @__PURE__ */ p("div", {
216
324
  className: "relative min-w-[7rem] flex-1",
217
- children: [/* @__PURE__ */ u("input", {
325
+ children: [/* @__PURE__ */ f("input", {
218
326
  type: "text",
219
327
  value: e.value,
220
- onChange: (e) => q(t, "value", e.target.value),
221
- onFocus: () => H(t),
222
- onBlur: () => setTimeout(() => H(null), 200),
223
- placeholder: x("bigconsole.widget.drilldown.parameterValuePlaceholder", "{{row.field}} or static"),
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: m
226
- }), V === t && U.length > 0 && /* @__PURE__ */ u("div", {
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: U.slice(0, 10).map((e) => /* @__PURE__ */ u("button", {
336
+ children: Z.slice(0, 10).map((e) => /* @__PURE__ */ f("button", {
229
337
  type: "button",
230
338
  onClick: () => {
231
- q(t, "value", e), H(null);
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
- F.length > 1 && /* @__PURE__ */ u("button", {
346
+ P.length > 1 && /* @__PURE__ */ f("button", {
239
347
  type: "button",
240
- onClick: () => K(t),
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__ */ u("svg", {
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__ */ u("path", {
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__ */ d("p", {
368
+ /* @__PURE__ */ p("p", {
261
369
  className: "mt-2 text-xs text-text-muted",
262
370
  children: [
263
- x("bigconsole.widget.drilldown.paramHelp.usePrefix", "Use"),
371
+ w("bigconsole.widget.drilldown.paramHelp.usePrefix", "Use"),
264
372
  " ",
265
- /* @__PURE__ */ u("code", {
373
+ /* @__PURE__ */ f("code", {
266
374
  className: "px-1 bg-bg-sunken rounded",
267
375
  children: "{{row.field}}"
268
376
  }),
269
377
  " ",
270
- x("bigconsole.widget.drilldown.paramHelp.useSuffix", "for dynamic values or enter static text."),
271
- /* @__PURE__ */ u("br", {}),
272
- x("bigconsole.widget.drilldown.paramHelp.examples", "Examples:"),
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__ */ u("code", {
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__ */ u("code", {
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__ */ u("code", {
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__ */ u(n, {
401
+ /* @__PURE__ */ f(i, {
294
402
  emphasis: "muted",
295
403
  padding: "compact",
296
404
  headingLevel: 4,
297
- title: x("bigconsole.widget.drilldown.advancedOptions", "Advanced Options"),
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__ */ d("div", {
408
+ children: /* @__PURE__ */ p("div", {
301
409
  className: "flex flex-col gap-2",
302
- children: [
303
- /* @__PURE__ */ d("div", {
304
- className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-button bg-bg-surface p-2",
305
- children: [/* @__PURE__ */ d("div", {
306
- className: "min-w-0",
307
- children: [/* @__PURE__ */ u("label", {
308
- htmlFor: "drilldown-pass-filters",
309
- className: "text-sm text-text-primary",
310
- children: x("bigconsole.widget.drilldown.passGlobalFiltersLabel", "Pass Global Filters")
311
- }), /* @__PURE__ */ u("p", {
312
- className: "text-xs text-text-muted",
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
- /* @__PURE__ */ d("div", {
326
- className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-button bg-bg-surface p-2",
327
- children: [/* @__PURE__ */ d("div", {
328
- className: "min-w-0",
329
- children: [/* @__PURE__ */ u("label", {
330
- htmlFor: "drilldown-max-depth",
331
- className: "text-sm text-text-primary",
332
- children: x("bigconsole.widget.drilldown.maxDepthLabel", "Max Drilldown Depth")
333
- }), /* @__PURE__ */ u("p", {
334
- className: "text-xs text-text-muted",
335
- children: x("bigconsole.widget.drilldown.maxDepthHelp", "Limit nested drilldown levels")
336
- })]
337
- }), /* @__PURE__ */ u("select", {
338
- id: "drilldown-max-depth",
339
- value: j,
340
- onChange: (e) => M(Number(e.target.value)),
341
- className: `${p} w-auto min-w-[4rem] shrink-0 px-2`,
342
- children: [
343
- 1,
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
- D === "SAME_WINDOW" && /* @__PURE__ */ d("div", {
355
- className: "flex min-w-0 flex-wrap items-center justify-between gap-2 rounded-button bg-bg-surface p-2",
356
- children: [/* @__PURE__ */ d("div", {
357
- className: "min-w-0",
358
- children: [/* @__PURE__ */ u("p", {
359
- className: "text-sm text-text-primary",
360
- id: "drilldown-open-in-label",
361
- children: x("bigconsole.widget.drilldown.openInLabel", "Open In")
362
- }), /* @__PURE__ */ u("p", {
363
- className: "text-xs text-text-muted",
364
- children: x("bigconsole.widget.drilldown.openInHelp", "Tab behavior for navigation")
365
- })]
366
- }), /* @__PURE__ */ d("div", {
367
- className: "flex shrink-0 flex-wrap gap-1",
368
- role: "group",
369
- "aria-labelledby": "drilldown-open-in-label",
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
- !C && r.drilldown?.id && /* @__PURE__ */ u(n, {
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__ */ u("p", {
469
+ children: /* @__PURE__ */ f("p", {
396
470
  className: "text-xs text-text-secondary",
397
- children: x("bigconsole.widget.drilldown.removalWarning", "Drilldown will be removed when you save changes.")
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 { y as default };
478
+ export { S as default };
405
479
 
406
480
  //# sourceMappingURL=DrilldownConfigPanel.js.map