@burdenoff/microfe-bigconsole 2026.1122.6 → 2026.1123.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 (30) hide show
  1. package/dist/bigconsole/components/fleet/FleetBadge.d.ts +12 -0
  2. package/dist/bigconsole/components/fleet/FleetBadge.js +61 -0
  3. package/dist/bigconsole/components/fleet/FleetBreadcrumb.d.ts +14 -0
  4. package/dist/bigconsole/components/fleet/FleetBreadcrumb.js +46 -0
  5. package/dist/bigconsole/components/fleet/FleetCardActions.d.ts +17 -0
  6. package/dist/bigconsole/components/fleet/FleetCardActions.js +78 -0
  7. package/dist/bigconsole/components/fleet/LinkToMasterDialog.d.ts +24 -0
  8. package/dist/bigconsole/components/fleet/LinkToMasterDialog.js +108 -0
  9. package/dist/bigconsole/hooks/useDashboardOperations.d.ts +8 -0
  10. package/dist/bigconsole/hooks/useDashboardOperations.js +2 -0
  11. package/dist/bigconsole/hooks/useFleetBoardActions.d.ts +18 -0
  12. package/dist/bigconsole/hooks/useFleetBoardActions.js +54 -0
  13. package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +13 -0
  14. package/dist/bigconsole/hooks/useFleetBreadcrumb.js +52 -0
  15. package/dist/bigconsole/hooks/useFleetCopyTotals.d.ts +11 -0
  16. package/dist/bigconsole/hooks/useFleetCopyTotals.js +52 -0
  17. package/dist/bigconsole/hooks/useFleetLinks.d.ts +19 -0
  18. package/dist/bigconsole/hooks/useFleetLinks.js +74 -0
  19. package/dist/bigconsole/hooks/useFleetMasterSearch.d.ts +13 -0
  20. package/dist/bigconsole/hooks/useFleetMasterSearch.js +62 -0
  21. package/dist/bigconsole/pages/DashboardViewPage.js +313 -303
  22. package/dist/bigconsole/pages/DashboardsPage.js +733 -435
  23. package/dist/bigconsole/pages/InsightsPage.js +490 -425
  24. package/dist/bigconsole/utils/fleetTree.d.ts +50 -0
  25. package/dist/bigconsole/utils/fleetTree.js +64 -0
  26. package/dist/generated/global-types.d.ts +39 -7
  27. package/dist/generated/wspace-operations.d.ts +86 -0
  28. package/dist/generated/wspace-operations.js +602 -147
  29. package/dist/generated/wspace-types.d.ts +3847 -23
  30. package/package.json +1 -1
@@ -1,35 +1,43 @@
1
- import { useBigConsoleNavigate as e } from "../context/BigConsoleContext.js";
2
- import { useTr as t } from "../../shared/hooks/useTr.js";
3
- import { BIGCONSOLE_PERMISSIONS as n } from "../../constants/permissions.js";
4
- import { Section as r, SectionStack as i } from "../components/common/Section.js";
5
- import { SortBySelect as a } from "../components/common/SortBySelect.js";
1
+ import { useBigConsole as e, useBigConsoleNavigate as t } from "../context/BigConsoleContext.js";
2
+ import { useTr as n } from "../../shared/hooks/useTr.js";
3
+ import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
4
+ import { Section as i, SectionStack as a } from "../components/common/Section.js";
5
+ import { SortBySelect as o } from "../components/common/SortBySelect.js";
6
6
  import "../context/index.js";
7
- import o from "../hooks/useDashboardOperations.js";
8
- import { isNative as s, nativeConfirm as ee, nativeImpact as c, nativeNotify as l } from "../../utils/nativeBridge.js";
7
+ import ee from "../hooks/useDashboardOperations.js";
8
+ import { isNative as s, nativeConfirm as c, nativeImpact as te, nativeNotify as l } from "../../utils/nativeBridge.js";
9
9
  import "../hooks/index.js";
10
- import { CreateDashboardDialog as te } from "../components/dashboard/CreateDashboardDialog.js";
11
- import { DashboardStatusPill as ne, useDashboardStatusLabel as re } from "../components/dashboard/DashboardStatusPill.js";
12
- import { ImportDashboardDialog as ie } from "../components/dashboard/ImportDashboardDialog.js";
13
- import { ImportFromToolDialog as ae } from "../components/dashboard/ImportFromToolDialog.js";
10
+ import { useFleetLinks as ne } from "../hooks/useFleetLinks.js";
11
+ import { useFleetBoardActions as re } from "../hooks/useFleetBoardActions.js";
12
+ import { useFleetCopyTotals as ie } from "../hooks/useFleetCopyTotals.js";
13
+ import { useFleetMasterSearch as ae } from "../hooks/useFleetMasterSearch.js";
14
+ import { FleetBadge as oe } from "../components/fleet/FleetBadge.js";
15
+ import { FleetCardActions as se } from "../components/fleet/FleetCardActions.js";
16
+ import { LinkToMasterDialog as ce } from "../components/fleet/LinkToMasterDialog.js";
17
+ import { buildFleetRows as le, copyCounts as ue, descendantIds as de, pendingMasterId as fe } from "../utils/fleetTree.js";
18
+ import { CreateDashboardDialog as pe } from "../components/dashboard/CreateDashboardDialog.js";
19
+ import { DashboardStatusPill as me, useDashboardStatusLabel as he } from "../components/dashboard/DashboardStatusPill.js";
20
+ import { ImportDashboardDialog as ge } from "../components/dashboard/ImportDashboardDialog.js";
21
+ import { ImportFromToolDialog as _e } from "../components/dashboard/ImportFromToolDialog.js";
14
22
  import "../components/common/index.js";
15
- import { dashboardsListControls as oe } from "../assistant/pageControls.js";
16
- import { LIST_SORT_COPY as se, listSortOptions as ce } from "../utils/listSort.js";
17
- import { selectDashboards as le } from "../utils/dashboardList.js";
18
- import { isBigConsoleQuotaError as ue, reportBigConsoleQuotaError as de } from "../utils/quota.js";
19
- import { resolveCreateParam as fe, withoutCreateParam as pe } from "../utils/createDialogParam.js";
20
- import { dashboardSuggestAnchorProps as me } from "../proactive/entities.js";
21
- import { memo as u, useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
22
- import { useSearchParams as he } from "react-router";
23
- import { AccessDenied as ge, PermissionButton as h } from "@burdenoff/fe-libs/shared/components";
24
- import { usePermissions as _e } from "@burdenoff/fe-libs/shared/providers/shell";
25
- import { ArrowRightLeft as g, Calendar as ve, ChevronLeft as ye, ChevronRight as be, Copy as xe, FileText as Se, Layers as Ce, LayoutDashboard as _, LayoutGrid as we, List as Te, Pencil as Ee, Plus as De, Search as Oe, Trash2 as ke, Upload as Ae } from "lucide-react";
26
- import { AuroraBackground as v, Badge as y, Button as b, CTAOverflowMenu as x, Card as S, CardContent as C, GlassCard as je, GradientText as w, IllustratedEmptyState as Me, Input as Ne, PagePurpose as Pe, Spinner as Fe } from "@burdenoff/fe-libs/ui";
27
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
28
- import { useAssistantPageControls as Ie } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
23
+ import { dashboardsListControls as ve } from "../assistant/pageControls.js";
24
+ import { LIST_SORT_COPY as ye, listSortOptions as be } from "../utils/listSort.js";
25
+ import { selectDashboards as xe } from "../utils/dashboardList.js";
26
+ import { isBigConsoleQuotaError as Se, reportBigConsoleQuotaError as Ce } from "../utils/quota.js";
27
+ import { resolveCreateParam as we, withoutCreateParam as Te } from "../utils/createDialogParam.js";
28
+ import { dashboardSuggestAnchorProps as Ee } from "../proactive/entities.js";
29
+ import { memo as u, useCallback as d, useEffect as De, useMemo as f, useRef as Oe, useState as p } from "react";
30
+ import { useSearchParams as ke } from "react-router";
31
+ import { AccessDenied as Ae, PermissionButton as m } from "@burdenoff/fe-libs/shared/components";
32
+ import { usePermissions as je } from "@burdenoff/fe-libs/shared/providers/shell";
33
+ import { ArrowRightLeft as h, Calendar as Me, ChevronDown as Ne, ChevronLeft as Pe, ChevronRight as Fe, Copy as Ie, FileText as Le, Layers as Re, LayoutDashboard as ze, LayoutGrid as Be, List as Ve, ListTree as He, Pencil as Ue, Plus as We, Search as Ge, Trash2 as Ke, Upload as qe } from "lucide-react";
34
+ import { AuroraBackground as g, Badge as Je, Button as _, CTAOverflowMenu as Ye, Card as Xe, CardContent as Ze, GlassCard as Qe, GradientText as v, IllustratedEmptyState as $e, Input as et, PagePurpose as tt, Spinner as nt } from "@burdenoff/fe-libs/ui";
35
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
36
+ import { useAssistantPageControls as rt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
29
37
  // src/bigconsole/pages/DashboardsPage.tsx
30
- var Le = "bf-bigconsole-dashboards-view", D = 12, O = 7;
31
- function Re(e, t) {
32
- if (t <= O) return Array.from({ length: t }, (e, t) => t + 1);
38
+ var it = "bf-bigconsole-dashboards-view", at = "bf-bigconsole-dashboards-nested", x = 12, ot = 7;
39
+ function st(e, t) {
40
+ if (t <= ot) return Array.from({ length: t }, (e, t) => t + 1);
33
41
  let n = /* @__PURE__ */ new Set([
34
42
  1,
35
43
  t,
@@ -41,12 +49,12 @@ function Re(e, t) {
41
49
  t > 0 && e - r[t - 1] > 1 && i.push(null), i.push(e);
42
50
  }), i;
43
51
  }
44
- var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, importFromToolLabel: i, onCreate: a, onImport: o, onImportFromTool: s, canCreate: ee, canImport: c }) {
45
- return /* @__PURE__ */ E("div", {
52
+ var ct = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, importFromToolLabel: i, onCreate: a, onImport: o, onImportFromTool: ee, canCreate: s, canImport: c }) {
53
+ return /* @__PURE__ */ b("div", {
46
54
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
47
- children: [/* @__PURE__ */ T(v, { intensity: "subtle" }), /* @__PURE__ */ T("div", {
55
+ children: [/* @__PURE__ */ y(g, { intensity: "subtle" }), /* @__PURE__ */ y("div", {
48
56
  style: { padding: "var(--space-pagePadding)" },
49
- children: /* @__PURE__ */ E("div", {
57
+ children: /* @__PURE__ */ b("div", {
50
58
  style: {
51
59
  display: "flex",
52
60
  alignItems: "center",
@@ -54,14 +62,14 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
54
62
  flexWrap: "wrap",
55
63
  gap: "var(--space-formGap)"
56
64
  },
57
- children: [/* @__PURE__ */ E("div", {
65
+ children: [/* @__PURE__ */ b("div", {
58
66
  style: {
59
67
  display: "flex",
60
68
  alignItems: "center",
61
69
  gap: "var(--space-formGap)",
62
70
  minWidth: 0
63
71
  },
64
- children: [/* @__PURE__ */ T("div", {
72
+ children: [/* @__PURE__ */ y("div", {
65
73
  style: {
66
74
  display: "flex",
67
75
  height: "var(--size-controlHeight-lg)",
@@ -72,22 +80,22 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
72
80
  borderRadius: "var(--radius-card)",
73
81
  backgroundColor: "var(--color-action-primary-bg)"
74
82
  },
75
- children: /* @__PURE__ */ T(_, { style: {
83
+ children: /* @__PURE__ */ y(ze, { style: {
76
84
  height: "var(--size-icon-lg)",
77
85
  width: "var(--size-icon-lg)",
78
86
  color: "var(--color-action-primary-text)"
79
87
  } })
80
- }), /* @__PURE__ */ E("div", {
88
+ }), /* @__PURE__ */ b("div", {
81
89
  style: { minWidth: 0 },
82
- children: [/* @__PURE__ */ T("h1", {
90
+ children: [/* @__PURE__ */ y("h1", {
83
91
  style: {
84
92
  fontSize: "var(--font-size-heading-h4)",
85
93
  fontWeight: "var(--font-weight-bold)",
86
94
  margin: 0,
87
95
  color: "var(--color-text-primary)"
88
96
  },
89
- children: /* @__PURE__ */ T(w, { children: e })
90
- }), /* @__PURE__ */ T("p", {
97
+ children: /* @__PURE__ */ y(v, { children: e })
98
+ }), /* @__PURE__ */ y("p", {
91
99
  style: {
92
100
  fontSize: "var(--font-size-body-sm)",
93
101
  color: "var(--color-text-secondary)",
@@ -96,14 +104,14 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
96
104
  children: t
97
105
  })]
98
106
  })]
99
- }), /* @__PURE__ */ T("div", {
107
+ }), /* @__PURE__ */ y("div", {
100
108
  "data-tour": "bigconsole-dashboard-create",
101
- children: /* @__PURE__ */ T(x, {
109
+ children: /* @__PURE__ */ y(Ye, {
102
110
  primary: {
103
111
  label: n,
104
112
  onSelect: a,
105
- disabled: !ee,
106
- icon: /* @__PURE__ */ T(De, { style: {
113
+ disabled: !s,
114
+ icon: /* @__PURE__ */ y(We, { style: {
107
115
  marginRight: "var(--space-iconGap)",
108
116
  height: "var(--size-icon-sm)",
109
117
  width: "var(--size-icon-sm)"
@@ -113,15 +121,15 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
113
121
  label: r,
114
122
  onSelect: o,
115
123
  disabled: !c,
116
- icon: /* @__PURE__ */ T(Ae, { style: {
124
+ icon: /* @__PURE__ */ y(qe, { style: {
117
125
  height: "var(--size-icon-sm)",
118
126
  width: "var(--size-icon-sm)"
119
127
  } })
120
128
  }, {
121
129
  label: i,
122
- onSelect: s,
130
+ onSelect: ee,
123
131
  disabled: !c,
124
- icon: /* @__PURE__ */ T(g, { style: {
132
+ icon: /* @__PURE__ */ y(h, { style: {
125
133
  height: "var(--size-icon-sm)",
126
134
  width: "var(--size-icon-sm)"
127
135
  } })
@@ -131,247 +139,375 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
131
139
  })
132
140
  })]
133
141
  });
134
- }), k = u(function() {
135
- let u = e(), g = t(), [v, x] = m(""), [w, O] = m(""), [k, Be] = m(""), [A, j] = m("default"), [M, N] = m(1), [Ve, P] = m(!1), [F, He] = m(!1), [Ue, We] = m(!1), [Ge, Ke] = m(!1), [I, qe] = m(() => {
142
+ }), S = u(function() {
143
+ let u = t(), h = n(), [g, Ye] = p(""), [v, ot] = p(""), [S, lt] = p(""), [C, ut] = p("default"), [w, T] = p(1), [dt, E] = p(!1), [ft, pt] = p(!1), [mt, ht] = p(!1), [gt, _t] = p(!1), [D, vt] = p(() => {
136
144
  try {
137
- return window.localStorage.getItem(Le) === "list" ? "list" : "grid";
145
+ return window.localStorage.getItem(it) === "list" ? "list" : "grid";
138
146
  } catch {
139
147
  return "grid";
140
148
  }
141
- }), Je = d((e) => {
142
- qe(e);
149
+ }), yt = d((e) => {
150
+ vt(e);
143
151
  try {
144
- window.localStorage.setItem(Le, e);
152
+ window.localStorage.setItem(it, e);
145
153
  } catch {}
146
- }, []), { loading: L, error: R, dashboards: z, createDashboard: Ye, deleteDashboard: Xe, cloneDashboard: Ze, refetch: B } = o(), { hasPermission: V, isLoading: H } = _e(), U = V(n.DASHBOARD_READ), W = V(n.DASHBOARD_CREATE), Qe = V(n.DASHBOARD_IMPORT), [G, $e] = he();
147
- f(() => {
148
- let e = fe(G, {
149
- permissionsLoading: H,
150
- canRead: U,
151
- canCreate: W
154
+ }, []), { loading: O, error: k, dashboards: A, createDashboard: bt, deleteDashboard: xt, cloneDashboard: St, refetch: j } = ee(), { links: M, requests: N, loading: Ct, error: wt, refetch: P } = ne(), Tt = !Ct && !wt, [Et, F] = p(!1), { busy: Dt, linkToMaster: Ot, detach: kt, respond: At } = re(), I = Dt || Et, [L, jt] = p(() => {
155
+ try {
156
+ return window.localStorage.getItem(at) !== "flat";
157
+ } catch {
158
+ return !0;
159
+ }
160
+ }), [Mt, Nt] = p(() => /* @__PURE__ */ new Set()), [R, z] = p(null), [Pt, B] = p(null), { workspaceId: Ft, currentUser: It } = e(), V = `${Ft ?? ""}:${It?.id ?? ""}`, H = Oe(V), [Lt, U] = p(null), Rt = d((e) => {
161
+ jt(e);
162
+ try {
163
+ window.localStorage.setItem(at, e ? "nested" : "flat");
164
+ } catch {}
165
+ }, []), zt = d((e) => {
166
+ Nt((t) => {
167
+ let n = new Set(t);
168
+ return n.has(e) ? n.delete(e) : n.add(e), n;
169
+ });
170
+ }, []), Bt = f(() => ue(M), [M]), Vt = f(() => A.filter((e) => e.isMaster === !0).map((e) => e.id), [A]), Ht = ie(Vt, M), Ut = f(() => new Map([...Bt, ...Ht]), [Bt, Ht]), Wt = f(() => new Set(N.map((e) => e.childDashboardId)), [N]), Gt = f(() => new Set(M.filter((e) => e.status === "ACTIVE").map((e) => e.childDashboardId)), [M]), Kt = Gt.size > 0, { hasPermission: qt, isLoading: W } = je(), G = qt(r.DASHBOARD_READ), Jt = qt(r.DASHBOARD_CREATE), Yt = qt(r.DASHBOARD_IMPORT), [Xt, Zt] = ke();
171
+ De(() => {
172
+ let e = we(Xt, {
173
+ permissionsLoading: W,
174
+ canRead: G,
175
+ canCreate: Jt
152
176
  });
153
- e !== "none" && e !== "wait" && (e === "open" && P(!0), $e(pe(G), { replace: !0 }));
177
+ e !== "none" && e !== "wait" && (e === "open" && E(!0), Zt(Te(Xt), { replace: !0 }));
154
178
  }, [
179
+ Xt,
180
+ Zt,
181
+ W,
155
182
  G,
156
- $e,
157
- H,
158
- U,
159
- W
183
+ Jt
160
184
  ]);
161
- let K = p(() => Array.from(new Set(z.flatMap((e) => e.category ? [e.category] : []))).sort(), [z]), { filtered: q, totalPages: J, pageItems: Y } = le(z, {
162
- search: v,
163
- category: w,
164
- status: k,
165
- sort: A,
166
- page: M,
167
- pageSize: D
168
- }), et = (Math.min(M, J) - 1) * D;
169
- f(() => {
170
- N(1);
185
+ let Qt = f(() => Array.from(new Set(A.flatMap((e) => e.category ? [e.category] : []))).sort(), [A]), { filtered: K, totalPages: $t, pageItems: en } = xe(A, {
186
+ search: g,
187
+ category: v,
188
+ status: S,
189
+ sort: C,
190
+ page: w,
191
+ pageSize: x
192
+ }), q = L && D === "list" && Kt, tn = f(() => q ? le(K, M, Mt) : [], [
193
+ q,
194
+ K,
195
+ M,
196
+ Mt
197
+ ]), J = q ? Math.max(1, Math.ceil(tn.length / x)) : $t, Y = (Math.min(w, J) - 1) * x, nn = q ? tn.slice(Y, Y + x) : en.map((e) => ({
198
+ item: e,
199
+ depth: 0,
200
+ parentId: null,
201
+ childCount: 0,
202
+ collapsed: !1
203
+ })), rn = nn.map((e) => e.item), X = new Map(nn.map((e) => [e.item.id, e]));
204
+ De(() => {
205
+ T(1);
171
206
  }, [
207
+ g,
208
+ D,
172
209
  v,
173
- I,
174
- w,
175
- k,
176
- A
177
- ]), f(() => {
178
- M > J && N(J);
179
- }, [M, J]);
180
- let tt = d(() => {
181
- N((e) => Math.max(1, e - 1));
182
- }, []), nt = d(() => {
183
- N((e) => Math.min(J, e + 1));
184
- }, [J]), rt = d((e) => {
185
- N(e);
186
- }, []), it = d(() => {
187
- P(!0);
188
- }, []), at = d(({ dashboardId: e }) => {
189
- B(), u(`/dashboards/${e}`);
190
- }, [B, u]), ot = d(() => {
191
- F || P(!1);
192
- }, [F]), st = d(async (e) => {
193
- He(!0);
210
+ S,
211
+ C
212
+ ]), De(() => {
213
+ w > J && T(J);
214
+ }, [w, J]);
215
+ let an = d(() => {
216
+ T((e) => Math.max(1, e - 1));
217
+ }, []), on = d(() => {
218
+ T((e) => Math.min(J, e + 1));
219
+ }, [J]), sn = d((e) => {
220
+ T(e);
221
+ }, []), cn = d(() => {
222
+ E(!0);
223
+ }, []), ln = d(({ dashboardId: e }) => {
224
+ j(), u(`/dashboards/${e}`);
225
+ }, [j, u]), un = d(() => {
226
+ ft || E(!1);
227
+ }, [ft]), dn = d(async (e) => {
228
+ pt(!0);
194
229
  try {
195
- let t = await Ye({
230
+ let t = await bt({
196
231
  name: e.name,
197
232
  description: e.description,
198
233
  category: e.category,
199
234
  tags: e.tags
200
235
  });
201
- if (!t) throw Error(g("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
202
- P(!1), u(`/dashboards/${t.id}/builder`);
236
+ if (!t) throw Error(h("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
237
+ E(!1), u(`/dashboards/${t.id}/builder`);
203
238
  } catch (e) {
204
- throw ue(e) || console.error("Failed to create dashboard:", e), s() && l("error"), e;
239
+ throw Se(e) || console.error("Failed to create dashboard:", e), s() && l("error"), e;
205
240
  } finally {
206
- He(!1);
241
+ pt(!1);
207
242
  }
208
243
  }, [
209
- Ye,
244
+ bt,
210
245
  u,
211
- g
212
- ]), X = d((e) => {
246
+ h
247
+ ]), Z = d((e) => {
213
248
  u(`/dashboards/${e}`);
214
- }, [u]), ct = d((e, t) => {
249
+ }, [u]), fn = d((e, t) => {
215
250
  t.stopPropagation(), u(`/dashboards/${e}/builder`);
216
- }, [u]), lt = d(async (e, t) => {
251
+ }, [u]), pn = d(async (e, t) => {
217
252
  t.stopPropagation();
218
- let n = g("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await ee({
253
+ let n = h("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await c({
219
254
  title: "Delete dashboard?",
220
255
  message: n,
221
256
  okButtonTitle: "Delete",
222
257
  cancelButtonTitle: "Cancel"
223
258
  });
224
259
  if (r === null ? window.confirm(n) : r) {
225
- c("medium");
260
+ te("medium");
226
261
  try {
227
- await Xe(e), s() && l("success");
262
+ await xt(e), s() && l("success");
228
263
  } catch (e) {
229
264
  throw s() && l("error"), e;
230
265
  }
231
266
  }
232
- }, [Xe, g]), ut = d(async (e, t, n) => {
267
+ }, [xt, h]), Q = d((e) => ({
268
+ active: e.linkStatus === "ACTIVE" || Gt.has(e.id),
269
+ pending: e.linkStatus === "PENDING" || fe(e.id, M) !== null
270
+ }), [Gt, M]), mn = d((e) => {
271
+ let t = Q(e);
272
+ return {
273
+ isMaster: e.isMaster === !0,
274
+ copyCount: Ut.get(e.id) ?? 0,
275
+ isCopy: t.active,
276
+ isPending: t.pending
277
+ };
278
+ }, [Q, Ut]), hn = d((e, t) => {
279
+ t.stopPropagation(), B(null), z({
280
+ id: e.id,
281
+ name: e.name
282
+ });
283
+ }, []), [gn, _n] = p("");
284
+ De(() => {
285
+ H.current !== V && (H.current = V, z(null), B(null), _n(""), U(null), F(!1));
286
+ }, [V]);
287
+ let vn = ae(gn, R !== null), yn = f(() => {
288
+ if (!R) return [];
289
+ let e = de(R.id, M), t = /* @__PURE__ */ new Set();
290
+ return [...A.map((e) => ({
291
+ id: e.id,
292
+ name: e.name,
293
+ isMaster: e.isMaster === !0
294
+ })), ...vn].filter((n) => n.id === R.id || e.has(n.id) || t.has(n.id) ? !1 : (t.add(n.id), !0));
295
+ }, [
296
+ A,
297
+ vn,
298
+ M,
299
+ R
300
+ ]), bn = d(async (e) => {
301
+ if (!R) return;
302
+ B(null);
303
+ let t = H.current, n = () => H.current !== t;
304
+ F(!0);
305
+ try {
306
+ let t = await Ot(R.id, e);
307
+ if (n() || (z(null), await Promise.all([j(), P()]), n())) return;
308
+ U(t === "PENDING" ? h("bigconsole.fleet.notice.requested", "Link requested. The owner of \"{{name}}\" has to accept it before it follows the master.", { name: R.name }) : h("bigconsole.fleet.notice.linked", "\"{{name}}\" now follows its master.", { name: R.name }));
309
+ } catch (e) {
310
+ if (n()) return;
311
+ B(e instanceof Error && e.message ? e.message : h("bigconsole.fleet.error.link", "The board could not be linked."));
312
+ } finally {
313
+ n() || F(!1);
314
+ }
315
+ }, [
316
+ R,
317
+ Ot,
318
+ j,
319
+ P,
320
+ h
321
+ ]), xn = d(async (e, t) => {
322
+ t.stopPropagation();
323
+ let n = h("bigconsole.fleet.detach.confirm", "\"{{name}}\" will keep a plain copy of everything and stop following its master. Detach it?", { name: e.name }), r = await c({
324
+ title: h("bigconsole.fleet.detach.title", "Detach from master?"),
325
+ message: n,
326
+ okButtonTitle: h("bigconsole.fleet.detach.ok", "Detach"),
327
+ cancelButtonTitle: h("bigconsole.fleet.link.cancel", "Cancel")
328
+ });
329
+ if (!(r === null ? window.confirm(n) : r)) return;
330
+ let i = H.current, a = () => H.current !== i;
331
+ F(!0);
332
+ try {
333
+ if (await kt(e.id), await Promise.all([j(), P()]), a()) return;
334
+ U(h("bigconsole.fleet.notice.detached", "\"{{name}}\" no longer follows a master.", { name: e.name }));
335
+ } catch (e) {
336
+ if (a()) return;
337
+ U(e instanceof Error && e.message ? e.message : h("bigconsole.fleet.error.detach", "The board could not be detached."));
338
+ } finally {
339
+ a() || F(!1);
340
+ }
341
+ }, [
342
+ kt,
343
+ j,
344
+ P,
345
+ h
346
+ ]), $ = d(async (e, t, n) => {
347
+ n?.stopPropagation();
348
+ let r = N.find((t) => t.childDashboardId === e.id)?.masterName ?? "", i = H.current, a = () => H.current !== i;
349
+ F(!0);
350
+ try {
351
+ if (await At(e.id, t), await Promise.all([j(), P()]), a()) return;
352
+ U(t ? h("bigconsole.fleet.notice.accepted", "\"{{name}}\" now follows \"{{master}}\".", {
353
+ name: e.name,
354
+ master: r
355
+ }) : h("bigconsole.fleet.notice.declined", "Link request for \"{{name}}\" declined.", { name: e.name }));
356
+ } catch (e) {
357
+ if (a()) return;
358
+ U(e instanceof Error && e.message ? e.message : h("bigconsole.fleet.error.respond", "The request could not be answered."));
359
+ } finally {
360
+ a() || F(!1);
361
+ }
362
+ }, [
363
+ j,
364
+ P,
365
+ N,
366
+ At,
367
+ h
368
+ ]), Sn = d(async (e, t, n) => {
233
369
  n.stopPropagation();
234
- let r = g("bigconsole.dashboards.clone.defaultSuffix", "{{sourceName}} (Copy)", { sourceName: t }), i = window.prompt(g("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), r);
370
+ let r = h("bigconsole.dashboards.clone.defaultSuffix", "{{sourceName}} (Copy)", { sourceName: t }), i = window.prompt(h("bigconsole.dashboards.clone.namePrompt", "Name for the cloned dashboard:"), r);
235
371
  if (i && i.trim()) {
236
- c("medium");
372
+ te("medium");
237
373
  try {
238
- let t = await Ze(e, i.trim());
374
+ let t = await St(e, i.trim());
239
375
  t && (s() && l("success"), u(`/dashboards/${t.id}`));
240
376
  } catch (e) {
241
- if (de(e, "project")) return;
377
+ if (Ce(e, "project")) return;
242
378
  throw s() && l("error"), e;
243
379
  }
244
380
  }
245
381
  }, [
246
- Ze,
382
+ St,
247
383
  u,
248
- g
249
- ]), dt = d(() => {
250
- We(!0);
251
- }, []), ft = d(() => {
252
- We(!1);
253
- }, []), pt = d(() => {
254
- Ke(!0);
255
- }, []), mt = d(() => {
256
- Ke(!1);
257
- }, []), ht = d((e, t) => {
258
- B();
259
- }, [B]), gt = (e) => {
384
+ h
385
+ ]), Cn = d(() => {
386
+ ht(!0);
387
+ }, []), wn = d(() => {
388
+ ht(!1);
389
+ }, []), Tn = d(() => {
390
+ _t(!0);
391
+ }, []), En = d(() => {
392
+ _t(!1);
393
+ }, []), Dn = d((e, t) => {
394
+ j();
395
+ }, [j]), On = (e) => {
260
396
  let t = new Date(e), n = /* @__PURE__ */ new Date(), r = n.getTime() - t.getTime(), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5), o = Math.floor(r / 864e5);
261
- return i < 1 ? g("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${g("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${g("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : o < 7 ? `${o}${g("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
397
+ return i < 1 ? h("bigconsole.dashboards.time.justNow", "Just now") : i < 60 ? `${i}${h("bigconsole.dashboards.time.minutesAgoSuffix", "m ago")}` : a < 24 ? `${a}${h("bigconsole.dashboards.time.hoursAgoSuffix", "h ago")}` : o < 7 ? `${o}${h("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
262
398
  month: "short",
263
399
  day: "numeric",
264
400
  year: t.getFullYear() === n.getFullYear() ? void 0 : "numeric"
265
401
  }).format(t);
266
- }, Z = re(), Q = p(() => Array.from(new Set(z.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
402
+ }, kn = he(), An = f(() => Array.from(new Set(A.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
267
403
  value: e,
268
- label: Z(e)
269
- })), [z, Z]), _t = p(() => ce(g, !0), [g]), vt = p(() => !H && U && !R ? oe({
270
- tr: g,
271
- categories: K,
272
- statuses: Q,
273
- category: w,
274
- status: k,
275
- setCategory: O,
276
- setStatus: Be,
277
- setSearch: x,
278
- sort: A,
279
- setSort: j
404
+ label: kn(e)
405
+ })), [A, kn]), jn = f(() => be(h, !0), [h]), Mn = f(() => !W && G && !k ? ve({
406
+ tr: h,
407
+ categories: Qt,
408
+ statuses: An,
409
+ category: v,
410
+ status: S,
411
+ setCategory: ot,
412
+ setStatus: lt,
413
+ setSearch: Ye,
414
+ sort: C,
415
+ setSort: ut
280
416
  }) : null, [
281
- g,
282
- H,
283
- U,
284
- R,
285
- K,
286
- Q,
287
- w,
417
+ h,
418
+ W,
419
+ G,
288
420
  k,
289
- A
421
+ Qt,
422
+ An,
423
+ v,
424
+ S,
425
+ C
290
426
  ]);
291
- Ie(vt);
292
- let yt = (e) => e.widgetCount ?? 0, bt = (e) => e.pageCount || 0, xt = /* @__PURE__ */ T(ze, {
293
- title: g("bigconsole.dashboards.title", "Dashboards"),
294
- subtitle: g("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards"),
295
- createLabel: g("bigconsole.dashboards.actions.create", "Create Dashboard"),
296
- importLabel: g("bigconsole.dashboards.actions.import", "Import"),
297
- importFromToolLabel: g("bigconsole.dashboards.actions.importFromTool", "Import from another tool"),
298
- onCreate: it,
299
- onImport: dt,
300
- onImportFromTool: pt,
301
- canCreate: W,
302
- canImport: Qe
427
+ rt(Mn);
428
+ let Nn = (e) => e.widgetCount ?? 0, Pn = (e) => e.pageCount || 0, Fn = /* @__PURE__ */ y(ct, {
429
+ title: h("bigconsole.dashboards.title", "Dashboards"),
430
+ subtitle: h("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards"),
431
+ createLabel: h("bigconsole.dashboards.actions.create", "Create Dashboard"),
432
+ importLabel: h("bigconsole.dashboards.actions.import", "Import"),
433
+ importFromToolLabel: h("bigconsole.dashboards.actions.importFromTool", "Import from another tool"),
434
+ onCreate: cn,
435
+ onImport: Cn,
436
+ onImportFromTool: Tn,
437
+ canCreate: Jt,
438
+ canImport: Yt
303
439
  });
304
- if (H) return /* @__PURE__ */ T("div", {
440
+ if (W) return /* @__PURE__ */ y("div", {
305
441
  style: {
306
442
  display: "flex",
307
443
  alignItems: "center",
308
444
  justifyContent: "center",
309
445
  padding: "80px 0"
310
446
  },
311
- children: /* @__PURE__ */ T(Fe, { style: {
447
+ children: /* @__PURE__ */ y(nt, { style: {
312
448
  height: "var(--size-icon-xl)",
313
449
  width: "var(--size-icon-xl)"
314
450
  } })
315
451
  });
316
- if (!U) return /* @__PURE__ */ T(ge, {
317
- title: g("bigconsole.dashboards.accessDenied.title", "Access Denied"),
318
- description: g("bigconsole.dashboards.accessDenied.description", "You don't have permission to view dashboards.")
452
+ if (!G) return /* @__PURE__ */ y(Ae, {
453
+ title: h("bigconsole.dashboards.accessDenied.title", "Access Denied"),
454
+ description: h("bigconsole.dashboards.accessDenied.description", "You don't have permission to view dashboards.")
319
455
  });
320
- if (R) return /* @__PURE__ */ E("div", {
456
+ if (k) return /* @__PURE__ */ b("div", {
321
457
  "data-tour": "bigconsole-dashboards-list",
322
458
  style: {
323
459
  minHeight: "100vh",
324
460
  backgroundColor: "var(--color-bg-canvas)"
325
461
  },
326
- children: [xt, /* @__PURE__ */ T("div", {
462
+ children: [Fn, /* @__PURE__ */ y("div", {
327
463
  style: { padding: "var(--space-pagePadding)" },
328
- children: /* @__PURE__ */ T(r, {
464
+ children: /* @__PURE__ */ y(i, {
329
465
  headingLevel: 2,
330
466
  tone: "danger",
331
- title: g("bigconsole.dashboards.error.title", "Error loading dashboards"),
332
- description: R.message,
467
+ title: h("bigconsole.dashboards.error.title", "Error loading dashboards"),
468
+ description: k.message,
333
469
  "data-testid": "dashboards-error",
334
- actions: /* @__PURE__ */ T(b, {
470
+ actions: /* @__PURE__ */ y(_, {
335
471
  size: "sm",
336
- onClick: () => B(),
337
- children: g("bigconsole.dashboards.error.retry", "Retry")
472
+ onClick: () => j(),
473
+ children: h("bigconsole.dashboards.error.retry", "Retry")
338
474
  })
339
475
  })
340
476
  })]
341
477
  });
342
- let $ = q.length;
343
- return /* @__PURE__ */ E("div", {
478
+ let In = K.length;
479
+ return /* @__PURE__ */ b("div", {
344
480
  "data-tour": "bigconsole-dashboards-list",
345
481
  style: {
346
482
  minHeight: "100vh",
347
483
  backgroundColor: "var(--color-bg-canvas)"
348
484
  },
349
485
  children: [
350
- xt,
351
- /* @__PURE__ */ T("div", {
486
+ Fn,
487
+ /* @__PURE__ */ y("div", {
352
488
  style: { padding: "var(--space-pagePadding)" },
353
- children: /* @__PURE__ */ E(i, { children: [/* @__PURE__ */ T(r, {
489
+ children: /* @__PURE__ */ b(a, { children: [/* @__PURE__ */ y(i, {
354
490
  emphasis: "muted",
355
491
  padding: "compact",
356
- "aria-label": g("bigconsole.dashboards.about", "About dashboards"),
357
- children: /* @__PURE__ */ T(Pe, {
492
+ "aria-label": h("bigconsole.dashboards.about", "About dashboards"),
493
+ children: /* @__PURE__ */ y(tt, {
358
494
  className: "max-w-[80ch]",
359
495
  children: "Dashboards are live, shareable views built from widgets that query your data sinks — charts, tables, metrics, and drill-downs in one place. Compose a board to monitor a system, share KPIs with your team, or explore data interactively."
360
496
  })
361
- }), /* @__PURE__ */ E(r, {
497
+ }), /* @__PURE__ */ b(i, {
362
498
  headingLevel: 2,
363
499
  emphasis: "primary",
364
500
  "data-testid": "dashboards-results",
365
- title: g("bigconsole.dashboards.results.title", "Your dashboards"),
366
- description: g("bigconsole.dashboards.results.description", "Open a board to view it, or use the card actions to edit, duplicate or delete."),
367
- meta: /* @__PURE__ */ T(y, {
501
+ title: h("bigconsole.dashboards.results.title", "Your dashboards"),
502
+ description: h("bigconsole.dashboards.results.description", "Open a board to view it, or use the card actions to edit, duplicate or delete."),
503
+ meta: /* @__PURE__ */ y(Je, {
368
504
  variant: "secondary",
369
- "aria-label": g("bigconsole.dashboards.results.count", `${$} dashboards`),
370
- children: $
505
+ "aria-label": h("bigconsole.dashboards.results.count", `${In} dashboards`),
506
+ children: In
371
507
  }),
372
- actions: /* @__PURE__ */ E("div", {
508
+ actions: /* @__PURE__ */ b("div", {
373
509
  role: "group",
374
- "aria-label": g("bigconsole.dashboards.view.label", "Result layout"),
510
+ "aria-label": h("bigconsole.dashboards.view.label", "Result layout"),
375
511
  style: {
376
512
  display: "flex",
377
513
  alignItems: "center",
@@ -380,51 +516,153 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
380
516
  borderRadius: "var(--radius-button)",
381
517
  backgroundColor: "var(--color-bg-sunken)"
382
518
  },
383
- children: [/* @__PURE__ */ T(b, {
384
- variant: I === "grid" ? "default" : "ghost",
385
- size: "sm",
386
- onClick: () => Je("grid"),
387
- "aria-label": g("bigconsole.dashboards.view.grid", "Grid view"),
388
- "aria-pressed": I === "grid",
389
- title: g("bigconsole.dashboards.view.grid", "Grid view"),
519
+ children: [
520
+ /* @__PURE__ */ y(_, {
521
+ variant: D === "grid" ? "default" : "ghost",
522
+ size: "sm",
523
+ onClick: () => yt("grid"),
524
+ "aria-label": h("bigconsole.dashboards.view.grid", "Grid view"),
525
+ "aria-pressed": D === "grid",
526
+ title: h("bigconsole.dashboards.view.grid", "Grid view"),
527
+ style: {
528
+ height: "var(--size-controlHeight-md)",
529
+ width: "var(--size-controlHeight-md)",
530
+ padding: 0,
531
+ borderRadius: "var(--radius-button)"
532
+ },
533
+ children: /* @__PURE__ */ y(Be, { style: {
534
+ height: "var(--size-icon-sm)",
535
+ width: "var(--size-icon-sm)"
536
+ } })
537
+ }),
538
+ /* @__PURE__ */ y(_, {
539
+ variant: D === "list" ? "default" : "ghost",
540
+ size: "sm",
541
+ onClick: () => yt("list"),
542
+ "aria-label": h("bigconsole.dashboards.view.list", "List view"),
543
+ "aria-pressed": D === "list",
544
+ title: h("bigconsole.dashboards.view.list", "List view"),
545
+ style: {
546
+ height: "var(--size-controlHeight-md)",
547
+ width: "var(--size-controlHeight-md)",
548
+ padding: 0,
549
+ borderRadius: "var(--radius-button)"
550
+ },
551
+ children: /* @__PURE__ */ y(Ve, { style: {
552
+ height: "var(--size-icon-sm)",
553
+ width: "var(--size-icon-sm)"
554
+ } })
555
+ }),
556
+ D === "list" && Kt && /* @__PURE__ */ y(_, {
557
+ variant: L ? "default" : "ghost",
558
+ size: "sm",
559
+ onClick: () => Rt(!L),
560
+ "aria-label": L ? h("bigconsole.fleet.list.showFlat", "Show flat list") : h("bigconsole.fleet.list.showNested", "Show linked boards nested"),
561
+ "aria-pressed": L,
562
+ title: L ? h("bigconsole.fleet.list.showFlat", "Show flat list") : h("bigconsole.fleet.list.showNested", "Show linked boards nested"),
563
+ "data-testid": "fleet-nested-toggle",
564
+ style: {
565
+ height: "var(--size-controlHeight-md)",
566
+ width: "var(--size-controlHeight-md)",
567
+ padding: 0,
568
+ borderRadius: "var(--radius-button)"
569
+ },
570
+ children: /* @__PURE__ */ y(He, { style: {
571
+ height: "var(--size-icon-sm)",
572
+ width: "var(--size-icon-sm)"
573
+ } })
574
+ })
575
+ ]
576
+ }),
577
+ bodyClassName: "flex flex-col gap-form-gap",
578
+ children: [
579
+ N.length > 0 && /* @__PURE__ */ b("div", {
580
+ role: "region",
581
+ "aria-label": h("bigconsole.fleet.requests.title", "Link requests"),
582
+ "data-testid": "fleet-requests",
583
+ className: "flex flex-col gap-form-gap rounded-input border p-3",
390
584
  style: {
391
- height: "var(--size-controlHeight-md)",
392
- width: "var(--size-controlHeight-md)",
393
- padding: 0,
394
- borderRadius: "var(--radius-button)"
585
+ borderColor: "var(--color-border-subtle)",
586
+ backgroundColor: "var(--color-status-warning-bgSubtle)",
587
+ color: "var(--color-text-primary)",
588
+ fontSize: "var(--font-size-body-sm)"
395
589
  },
396
- children: /* @__PURE__ */ T(we, { style: {
397
- height: "var(--size-icon-sm)",
398
- width: "var(--size-icon-sm)"
399
- } })
400
- }), /* @__PURE__ */ T(b, {
401
- variant: I === "list" ? "default" : "ghost",
402
- size: "sm",
403
- onClick: () => Je("list"),
404
- "aria-label": g("bigconsole.dashboards.view.list", "List view"),
405
- "aria-pressed": I === "list",
406
- title: g("bigconsole.dashboards.view.list", "List view"),
590
+ children: [/* @__PURE__ */ y("strong", { children: h("bigconsole.fleet.requests.title", "Link requests") }), N.map((e) => /* @__PURE__ */ b("div", {
591
+ className: "flex items-center justify-between gap-form-gap",
592
+ "data-testid": "fleet-request",
593
+ children: [/* @__PURE__ */ y("span", {
594
+ className: "min-w-0",
595
+ children: h("bigconsole.fleet.requests.item", "\"{{name}}\" would follow \"{{master}}\".", {
596
+ name: e.childName,
597
+ master: e.masterName
598
+ })
599
+ }), /* @__PURE__ */ y(m, {
600
+ permission: r.DASHBOARD_UPDATE,
601
+ deniedBehavior: "hide",
602
+ children: /* @__PURE__ */ b("span", {
603
+ className: "flex flex-shrink-0 items-center gap-2",
604
+ children: [/* @__PURE__ */ y(_, {
605
+ variant: "ghost",
606
+ size: "sm",
607
+ disabled: I,
608
+ onClick: () => $({
609
+ id: e.childDashboardId,
610
+ name: e.childName
611
+ }, !0),
612
+ "data-testid": "fleet-request-accept",
613
+ children: h("bigconsole.fleet.requests.accept", "Accept")
614
+ }), /* @__PURE__ */ y(_, {
615
+ variant: "ghost",
616
+ size: "sm",
617
+ disabled: I,
618
+ onClick: () => $({
619
+ id: e.childDashboardId,
620
+ name: e.childName
621
+ }, !1),
622
+ "data-testid": "fleet-request-decline",
623
+ children: h("bigconsole.fleet.requests.decline", "Decline")
624
+ })]
625
+ })
626
+ })]
627
+ }, e.childDashboardId))]
628
+ }),
629
+ Lt && /* @__PURE__ */ b("div", {
630
+ role: "status",
631
+ "data-testid": "fleet-notice",
632
+ className: "flex items-center justify-between gap-form-gap rounded-input border p-3",
407
633
  style: {
408
- height: "var(--size-controlHeight-md)",
409
- width: "var(--size-controlHeight-md)",
410
- padding: 0,
411
- borderRadius: "var(--radius-button)"
634
+ borderColor: "var(--color-border-subtle)",
635
+ backgroundColor: "var(--color-bg-accentSubtle)",
636
+ color: "var(--color-text-primary)",
637
+ fontSize: "var(--font-size-body-sm)"
412
638
  },
413
- children: /* @__PURE__ */ T(Te, { style: {
414
- height: "var(--size-icon-sm)",
415
- width: "var(--size-icon-sm)"
416
- } })
417
- })]
418
- }),
419
- bodyClassName: "flex flex-col gap-form-gap",
420
- children: [
421
- /* @__PURE__ */ E("div", {
639
+ children: [/* @__PURE__ */ y("span", {
640
+ className: "min-w-0",
641
+ children: Lt
642
+ }), /* @__PURE__ */ y(_, {
643
+ variant: "ghost",
644
+ size: "sm",
645
+ onClick: () => U(null),
646
+ children: h("bigconsole.fleet.notice.dismiss", "Dismiss")
647
+ })]
648
+ }),
649
+ wt && /* @__PURE__ */ y("p", {
650
+ role: "status",
651
+ "data-testid": "fleet-links-error",
652
+ style: {
653
+ color: "var(--color-text-secondary)",
654
+ fontSize: "var(--font-size-body-sm)",
655
+ margin: 0
656
+ },
657
+ children: h("bigconsole.fleet.error.links", "Linked boards could not be loaded, so the list is not nested for now.")
658
+ }),
659
+ /* @__PURE__ */ b("div", {
422
660
  style: {
423
661
  position: "relative",
424
662
  width: "100%",
425
663
  maxWidth: "420px"
426
664
  },
427
- children: [/* @__PURE__ */ T(Oe, {
665
+ children: [/* @__PURE__ */ y(Ge, {
428
666
  "aria-hidden": "true",
429
667
  style: {
430
668
  position: "absolute",
@@ -435,99 +673,99 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
435
673
  width: "var(--size-icon-sm)",
436
674
  color: "var(--color-text-muted)"
437
675
  }
438
- }), /* @__PURE__ */ T(Ne, {
676
+ }), /* @__PURE__ */ y(et, {
439
677
  type: "search",
440
- "aria-label": g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
441
- placeholder: g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
442
- value: v,
443
- onChange: (e) => x(e.target.value),
678
+ "aria-label": h("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
679
+ placeholder: h("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
680
+ value: g,
681
+ onChange: (e) => Ye(e.target.value),
444
682
  style: {
445
683
  paddingLeft: "var(--size-controlHeight-md)",
446
684
  height: "var(--size-controlHeight-md)"
447
685
  }
448
686
  })]
449
687
  }),
450
- /* @__PURE__ */ E("div", {
688
+ /* @__PURE__ */ b("div", {
451
689
  className: "flex flex-wrap gap-control-gap",
452
690
  children: [
453
- /* @__PURE__ */ E("select", {
454
- "aria-label": g("bigconsole.dashboards.filters.category", "Category"),
455
- value: w,
456
- onChange: (e) => O(e.target.value),
691
+ /* @__PURE__ */ b("select", {
692
+ "aria-label": h("bigconsole.dashboards.filters.category", "Category"),
693
+ value: v,
694
+ onChange: (e) => ot(e.target.value),
457
695
  className: "min-w-0 max-w-full rounded-button border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary",
458
- children: [/* @__PURE__ */ T("option", {
696
+ children: [/* @__PURE__ */ y("option", {
459
697
  value: "",
460
- children: g("bigconsole.dashboards.filters.allCategories", "All categories")
461
- }), K.map((e) => /* @__PURE__ */ T("option", {
698
+ children: h("bigconsole.dashboards.filters.allCategories", "All categories")
699
+ }), Qt.map((e) => /* @__PURE__ */ y("option", {
462
700
  value: e,
463
701
  children: e
464
702
  }, e))]
465
703
  }),
466
- /* @__PURE__ */ E("select", {
467
- "aria-label": g("bigconsole.dashboards.filters.status", "Status"),
468
- value: k,
469
- onChange: (e) => Be(e.target.value),
704
+ /* @__PURE__ */ b("select", {
705
+ "aria-label": h("bigconsole.dashboards.filters.status", "Status"),
706
+ value: S,
707
+ onChange: (e) => lt(e.target.value),
470
708
  className: "min-w-0 max-w-full rounded-button border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary",
471
- children: [/* @__PURE__ */ T("option", {
709
+ children: [/* @__PURE__ */ y("option", {
472
710
  value: "",
473
- children: g("bigconsole.dashboards.filters.allStatuses", "All statuses")
474
- }), Q.map((e) => /* @__PURE__ */ T("option", {
711
+ children: h("bigconsole.dashboards.filters.allStatuses", "All statuses")
712
+ }), An.map((e) => /* @__PURE__ */ y("option", {
475
713
  value: e.value,
476
714
  children: e.label
477
715
  }, e.value))]
478
716
  }),
479
- /* @__PURE__ */ T(a, {
480
- label: g(se.label.key, se.label.en),
481
- value: A,
482
- options: _t,
483
- onChange: j
717
+ /* @__PURE__ */ y(o, {
718
+ label: h(ye.label.key, ye.label.en),
719
+ value: C,
720
+ options: jn,
721
+ onChange: ut
484
722
  })
485
723
  ]
486
724
  }),
487
- L && z.length === 0 && /* @__PURE__ */ T("div", {
725
+ O && A.length === 0 && /* @__PURE__ */ y("div", {
488
726
  style: {
489
727
  display: "flex",
490
728
  alignItems: "center",
491
729
  justifyContent: "center",
492
730
  padding: "80px 0"
493
731
  },
494
- children: /* @__PURE__ */ E("div", {
732
+ children: /* @__PURE__ */ b("div", {
495
733
  style: { textAlign: "center" },
496
- children: [/* @__PURE__ */ T(Fe, { style: {
734
+ children: [/* @__PURE__ */ y(nt, { style: {
497
735
  height: "var(--size-icon-xl)",
498
736
  width: "var(--size-icon-xl)",
499
737
  margin: "0 auto var(--space-formGap)"
500
- } }), /* @__PURE__ */ T("p", {
738
+ } }), /* @__PURE__ */ y("p", {
501
739
  style: {
502
740
  fontSize: "var(--font-size-body-sm)",
503
741
  color: "var(--color-text-muted)"
504
742
  },
505
- children: g("bigconsole.dashboards.loading", "Loading dashboards...")
743
+ children: h("bigconsole.dashboards.loading", "Loading dashboards...")
506
744
  })]
507
745
  })
508
746
  }),
509
- !L && I === "grid" && q.length > 0 && /* @__PURE__ */ T("div", {
747
+ !O && D === "grid" && K.length > 0 && /* @__PURE__ */ y("div", {
510
748
  style: {
511
749
  display: "grid",
512
750
  gridTemplateColumns: "repeat(auto-fill, minmax(min(320px, 100%), 1fr))",
513
751
  gap: "var(--space-formGap)"
514
752
  },
515
- children: Y.map((e) => /* @__PURE__ */ T(S, {
516
- ...me(e.id),
517
- onClick: () => X(e.id),
753
+ children: rn.map((e) => /* @__PURE__ */ y(Xe, {
754
+ ...Ee(e.id),
755
+ onClick: () => Z(e.id),
518
756
  style: { cursor: "pointer" },
519
757
  className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
520
- children: /* @__PURE__ */ E(C, {
758
+ children: /* @__PURE__ */ b(Ze, {
521
759
  style: { padding: "var(--space-cardPadding)" },
522
760
  children: [
523
- /* @__PURE__ */ E("div", {
761
+ /* @__PURE__ */ b("div", {
524
762
  style: {
525
763
  display: "flex",
526
764
  alignItems: "center",
527
765
  gap: "var(--space-controlGap)",
528
766
  marginBottom: "var(--space-formGap)"
529
767
  },
530
- children: [/* @__PURE__ */ T("div", {
768
+ children: [/* @__PURE__ */ y("div", {
531
769
  style: {
532
770
  display: "flex",
533
771
  height: "var(--size-controlHeight-lg)",
@@ -538,7 +776,7 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
538
776
  borderRadius: "var(--radius-button)",
539
777
  backgroundColor: "var(--color-bg-accentSubtle)"
540
778
  },
541
- children: /* @__PURE__ */ T(_, {
779
+ children: /* @__PURE__ */ y(ze, {
542
780
  "aria-hidden": "true",
543
781
  style: {
544
782
  height: "var(--size-icon-md)",
@@ -546,12 +784,12 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
546
784
  color: "var(--color-action-primary-bg)"
547
785
  }
548
786
  })
549
- }), /* @__PURE__ */ E("div", {
787
+ }), /* @__PURE__ */ b("div", {
550
788
  style: {
551
789
  flex: 1,
552
790
  minWidth: 0
553
791
  },
554
- children: [/* @__PURE__ */ T("h3", {
792
+ children: [/* @__PURE__ */ y("h3", {
555
793
  style: {
556
794
  fontWeight: "var(--font-weight-bold)",
557
795
  fontSize: "var(--font-size-body-md)",
@@ -561,15 +799,15 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
561
799
  textOverflow: "ellipsis",
562
800
  whiteSpace: "nowrap"
563
801
  },
564
- children: /* @__PURE__ */ T("button", {
802
+ children: /* @__PURE__ */ y("button", {
565
803
  type: "button",
566
804
  className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
567
805
  onClick: (t) => {
568
- t.stopPropagation(), X(e.id);
806
+ t.stopPropagation(), Z(e.id);
569
807
  },
570
808
  children: e.name
571
809
  })
572
- }), /* @__PURE__ */ E("div", {
810
+ }), /* @__PURE__ */ b("div", {
573
811
  style: {
574
812
  display: "flex",
575
813
  alignItems: "center",
@@ -577,22 +815,26 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
577
815
  flexWrap: "wrap",
578
816
  marginTop: "var(--space-controlGap)"
579
817
  },
580
- children: [e.category && /* @__PURE__ */ T(y, {
581
- variant: "secondary",
582
- style: {
583
- fontSize: "10px",
584
- fontWeight: "var(--font-weight-semibold)",
585
- textTransform: "uppercase"
586
- },
587
- children: e.category
588
- }), e.status && /* @__PURE__ */ T(ne, {
589
- status: e.status,
590
- label: Z(e.status)
591
- })]
818
+ children: [
819
+ e.category && /* @__PURE__ */ y(Je, {
820
+ variant: "secondary",
821
+ style: {
822
+ fontSize: "10px",
823
+ fontWeight: "var(--font-weight-semibold)",
824
+ textTransform: "uppercase"
825
+ },
826
+ children: e.category
827
+ }),
828
+ e.status && /* @__PURE__ */ y(me, {
829
+ status: e.status,
830
+ label: kn(e.status)
831
+ }),
832
+ /* @__PURE__ */ y(oe, { ...mn(e) })
833
+ ]
592
834
  })]
593
835
  })]
594
836
  }),
595
- /* @__PURE__ */ T("p", {
837
+ /* @__PURE__ */ y("p", {
596
838
  style: {
597
839
  fontSize: "var(--font-size-body-sm)",
598
840
  lineHeight: "var(--font-lineHeight-normal)",
@@ -604,9 +846,9 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
604
846
  WebkitBoxOrient: "vertical",
605
847
  overflow: "hidden"
606
848
  },
607
- children: e.description || g("bigconsole.dashboards.card.noDescription", "No description provided")
849
+ children: e.description || h("bigconsole.dashboards.card.noDescription", "No description provided")
608
850
  }),
609
- /* @__PURE__ */ E("div", {
851
+ /* @__PURE__ */ b("div", {
610
852
  style: {
611
853
  display: "flex",
612
854
  alignItems: "center",
@@ -617,72 +859,72 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
617
859
  borderRadius: "var(--radius-button)"
618
860
  },
619
861
  children: [
620
- /* @__PURE__ */ E("div", {
862
+ /* @__PURE__ */ b("div", {
621
863
  style: {
622
864
  display: "flex",
623
865
  alignItems: "center",
624
866
  gap: "var(--space-iconGap)"
625
867
  },
626
868
  children: [
627
- /* @__PURE__ */ T(Ce, { style: {
869
+ /* @__PURE__ */ y(Re, { style: {
628
870
  height: "var(--size-icon-sm)",
629
871
  width: "var(--size-icon-sm)",
630
872
  color: "var(--color-action-primary-bg)"
631
873
  } }),
632
- /* @__PURE__ */ T("span", {
874
+ /* @__PURE__ */ y("span", {
633
875
  style: {
634
876
  fontSize: "var(--font-size-body-sm)",
635
877
  fontWeight: "var(--font-weight-semibold)",
636
878
  color: "var(--color-text-primary)"
637
879
  },
638
- children: bt(e)
880
+ children: Pn(e)
639
881
  }),
640
- /* @__PURE__ */ T("span", {
882
+ /* @__PURE__ */ y("span", {
641
883
  style: {
642
884
  fontSize: "var(--font-size-body-sm)",
643
885
  color: "var(--color-text-muted)"
644
886
  },
645
- children: g("bigconsole.dashboards.card.pages", "pages")
887
+ children: h("bigconsole.dashboards.card.pages", "pages")
646
888
  })
647
889
  ]
648
890
  }),
649
- /* @__PURE__ */ T("div", { style: {
891
+ /* @__PURE__ */ y("div", { style: {
650
892
  width: "1px",
651
893
  height: "var(--size-icon-sm)",
652
894
  backgroundColor: "var(--color-border-subtle)"
653
895
  } }),
654
- /* @__PURE__ */ E("div", {
896
+ /* @__PURE__ */ b("div", {
655
897
  style: {
656
898
  display: "flex",
657
899
  alignItems: "center",
658
900
  gap: "var(--space-iconGap)"
659
901
  },
660
902
  children: [
661
- /* @__PURE__ */ T(Se, { style: {
903
+ /* @__PURE__ */ y(Le, { style: {
662
904
  height: "var(--size-icon-sm)",
663
905
  width: "var(--size-icon-sm)",
664
906
  color: "var(--color-action-primary-bg)"
665
907
  } }),
666
- /* @__PURE__ */ T("span", {
908
+ /* @__PURE__ */ y("span", {
667
909
  style: {
668
910
  fontSize: "var(--font-size-body-sm)",
669
911
  fontWeight: "var(--font-weight-semibold)",
670
912
  color: "var(--color-text-primary)"
671
913
  },
672
- children: yt(e)
914
+ children: Nn(e)
673
915
  }),
674
- /* @__PURE__ */ T("span", {
916
+ /* @__PURE__ */ y("span", {
675
917
  style: {
676
918
  fontSize: "var(--font-size-body-sm)",
677
919
  color: "var(--color-text-muted)"
678
920
  },
679
- children: g("bigconsole.dashboards.card.widgets", "widgets")
921
+ children: h("bigconsole.dashboards.card.widgets", "widgets")
680
922
  })
681
923
  ]
682
924
  })
683
925
  ]
684
926
  }),
685
- /* @__PURE__ */ E("div", {
927
+ /* @__PURE__ */ b("div", {
686
928
  style: {
687
929
  display: "flex",
688
930
  alignItems: "center",
@@ -692,78 +934,88 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
692
934
  paddingTop: "var(--space-controlGap)",
693
935
  borderTop: "1px solid var(--color-border-subtle)"
694
936
  },
695
- children: [/* @__PURE__ */ E("div", {
937
+ children: [/* @__PURE__ */ b("div", {
696
938
  style: {
697
939
  display: "flex",
698
940
  alignItems: "center",
699
941
  gap: "var(--space-iconGap)"
700
942
  },
701
- children: [/* @__PURE__ */ T(ve, { style: {
943
+ children: [/* @__PURE__ */ y(Me, { style: {
702
944
  height: "var(--size-icon-sm)",
703
945
  width: "var(--size-icon-sm)",
704
946
  color: "var(--color-text-muted)"
705
- } }), /* @__PURE__ */ T("span", {
947
+ } }), /* @__PURE__ */ y("span", {
706
948
  style: {
707
949
  fontSize: "var(--font-size-body-sm)",
708
950
  fontWeight: "var(--font-weight-medium)",
709
951
  color: "var(--color-text-muted)"
710
952
  },
711
- children: gt(e.updatedAt)
953
+ children: On(e.updatedAt)
712
954
  })]
713
- }), /* @__PURE__ */ E("div", {
955
+ }), /* @__PURE__ */ b("div", {
714
956
  style: {
715
957
  display: "flex",
716
958
  alignItems: "center",
717
959
  gap: "var(--space-controlGap)"
718
960
  },
719
961
  children: [
720
- /* @__PURE__ */ T(h, {
721
- permission: n.DASHBOARD_UPDATE,
962
+ /* @__PURE__ */ y(se, {
963
+ linked: Q(e).active || Q(e).pending,
964
+ onLink: (t) => hn(e, t),
965
+ onDetach: (t) => xn(e, t),
966
+ ready: Tt,
967
+ disabled: I,
968
+ awaitingAnswer: Wt.has(e.id),
969
+ onAccept: (t) => $(e, !0, t),
970
+ onDecline: (t) => $(e, !1, t)
971
+ }),
972
+ /* @__PURE__ */ y(m, {
973
+ permission: r.DASHBOARD_UPDATE,
722
974
  deniedBehavior: "hide",
723
- children: /* @__PURE__ */ T(b, {
975
+ children: /* @__PURE__ */ y(_, {
724
976
  variant: "ghost",
725
977
  size: "sm",
726
- onClick: (t) => ct(e.id, t),
978
+ onClick: (t) => fn(e.id, t),
727
979
  style: {
728
980
  height: "var(--size-controlHeight-md)",
729
981
  width: "var(--size-controlHeight-md)",
730
982
  padding: 0,
731
983
  borderRadius: "var(--radius-button)"
732
984
  },
733
- title: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
734
- children: /* @__PURE__ */ T(Ee, { style: {
985
+ title: h("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
986
+ children: /* @__PURE__ */ y(Ue, { style: {
735
987
  height: "var(--size-icon-sm)",
736
988
  width: "var(--size-icon-sm)"
737
989
  } })
738
990
  })
739
991
  }),
740
- /* @__PURE__ */ T(h, {
741
- permission: n.DASHBOARD_CREATE,
992
+ /* @__PURE__ */ y(m, {
993
+ permission: r.DASHBOARD_CREATE,
742
994
  deniedBehavior: "hide",
743
- children: /* @__PURE__ */ T(b, {
995
+ children: /* @__PURE__ */ y(_, {
744
996
  variant: "ghost",
745
997
  size: "sm",
746
- onClick: (t) => ut(e.id, e.name, t),
998
+ onClick: (t) => Sn(e.id, e.name, t),
747
999
  style: {
748
1000
  height: "var(--size-controlHeight-md)",
749
1001
  width: "var(--size-controlHeight-md)",
750
1002
  padding: 0,
751
1003
  borderRadius: "var(--radius-button)"
752
1004
  },
753
- title: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
754
- children: /* @__PURE__ */ T(xe, { style: {
1005
+ title: h("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
1006
+ children: /* @__PURE__ */ y(Ie, { style: {
755
1007
  height: "var(--size-icon-sm)",
756
1008
  width: "var(--size-icon-sm)"
757
1009
  } })
758
1010
  })
759
1011
  }),
760
- /* @__PURE__ */ T(h, {
761
- permission: n.DASHBOARD_DELETE,
1012
+ /* @__PURE__ */ y(m, {
1013
+ permission: r.DASHBOARD_DELETE,
762
1014
  deniedBehavior: "hide",
763
- children: /* @__PURE__ */ T(b, {
1015
+ children: /* @__PURE__ */ y(_, {
764
1016
  variant: "ghost",
765
1017
  size: "sm",
766
- onClick: (t) => lt(e.id, t),
1018
+ onClick: (t) => pn(e.id, t),
767
1019
  style: {
768
1020
  height: "var(--size-controlHeight-md)",
769
1021
  width: "var(--size-controlHeight-md)",
@@ -771,8 +1023,8 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
771
1023
  borderRadius: "var(--radius-button)"
772
1024
  },
773
1025
  className: "hover:text-status-error-text hover:bg-status-error-bg/10",
774
- title: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
775
- children: /* @__PURE__ */ T(ke, { style: {
1026
+ title: h("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
1027
+ children: /* @__PURE__ */ y(Ke, { style: {
776
1028
  height: "var(--size-icon-sm)",
777
1029
  width: "var(--size-icon-sm)"
778
1030
  } })
@@ -785,20 +1037,23 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
785
1037
  })
786
1038
  }, e.id))
787
1039
  }),
788
- !L && I === "list" && q.length > 0 && /* @__PURE__ */ T("div", {
1040
+ !O && D === "list" && K.length > 0 && /* @__PURE__ */ y("div", {
789
1041
  style: {
790
1042
  display: "flex",
791
1043
  flexDirection: "column",
792
1044
  gap: "var(--space-controlGap)"
793
1045
  },
794
- children: Y.map((e) => /* @__PURE__ */ T(S, {
795
- ...me(e.id),
796
- onClick: () => X(e.id),
797
- style: { cursor: "pointer" },
1046
+ children: rn.map((e) => /* @__PURE__ */ y(Xe, {
1047
+ ...Ee(e.id),
1048
+ onClick: () => Z(e.id),
1049
+ style: {
1050
+ cursor: "pointer",
1051
+ marginLeft: `calc(${X.get(e.id)?.depth ?? 0} * var(--space-sectionGap))`
1052
+ },
798
1053
  className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
799
- children: /* @__PURE__ */ T(C, {
1054
+ children: /* @__PURE__ */ y(Ze, {
800
1055
  style: { padding: "var(--space-cardPadding)" },
801
- children: /* @__PURE__ */ E("div", {
1056
+ children: /* @__PURE__ */ b("div", {
802
1057
  style: {
803
1058
  display: "flex",
804
1059
  alignItems: "center",
@@ -806,7 +1061,29 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
806
1061
  flexWrap: "wrap"
807
1062
  },
808
1063
  children: [
809
- /* @__PURE__ */ T("div", {
1064
+ q && (X.get(e.id)?.childCount ?? 0) > 0 ? /* @__PURE__ */ y("button", {
1065
+ type: "button",
1066
+ "aria-expanded": !X.get(e.id)?.collapsed,
1067
+ "aria-label": X.get(e.id)?.collapsed ? h("bigconsole.fleet.list.expand", "Show copies of {{name}}", { name: e.name }) : h("bigconsole.fleet.list.collapse", "Hide copies of {{name}}", { name: e.name }),
1068
+ "data-testid": "fleet-toggle-copies",
1069
+ className: "flex shrink-0 items-center justify-center rounded-button focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
1070
+ style: {
1071
+ height: "var(--size-controlHeight-md)",
1072
+ width: "var(--size-controlHeight-md)",
1073
+ color: "var(--color-text-secondary)"
1074
+ },
1075
+ onClick: (t) => {
1076
+ t.stopPropagation(), zt(e.id);
1077
+ },
1078
+ children: X.get(e.id)?.collapsed ? /* @__PURE__ */ y(Fe, { style: {
1079
+ height: "var(--size-icon-sm)",
1080
+ width: "var(--size-icon-sm)"
1081
+ } }) : /* @__PURE__ */ y(Ne, { style: {
1082
+ height: "var(--size-icon-sm)",
1083
+ width: "var(--size-icon-sm)"
1084
+ } })
1085
+ }) : null,
1086
+ /* @__PURE__ */ y("div", {
810
1087
  style: {
811
1088
  display: "flex",
812
1089
  height: "var(--size-controlHeight-lg)",
@@ -817,7 +1094,7 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
817
1094
  borderRadius: "var(--radius-button)",
818
1095
  backgroundColor: "var(--color-bg-accentSubtle)"
819
1096
  },
820
- children: /* @__PURE__ */ T(_, {
1097
+ children: /* @__PURE__ */ y(ze, {
821
1098
  "aria-hidden": "true",
822
1099
  style: {
823
1100
  height: "var(--size-icon-md)",
@@ -826,12 +1103,12 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
826
1103
  }
827
1104
  })
828
1105
  }),
829
- /* @__PURE__ */ E("div", {
1106
+ /* @__PURE__ */ b("div", {
830
1107
  style: {
831
1108
  flex: "1 1 12rem",
832
1109
  minWidth: 0
833
1110
  },
834
- children: [/* @__PURE__ */ E("div", {
1111
+ children: [/* @__PURE__ */ b("div", {
835
1112
  style: {
836
1113
  display: "flex",
837
1114
  alignItems: "center",
@@ -839,7 +1116,7 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
839
1116
  flexWrap: "wrap"
840
1117
  },
841
1118
  children: [
842
- /* @__PURE__ */ T("h3", {
1119
+ /* @__PURE__ */ y("h3", {
843
1120
  style: {
844
1121
  fontWeight: "var(--font-weight-bold)",
845
1122
  fontSize: "var(--font-size-body-md)",
@@ -850,16 +1127,16 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
850
1127
  whiteSpace: "nowrap",
851
1128
  maxWidth: "100%"
852
1129
  },
853
- children: /* @__PURE__ */ T("button", {
1130
+ children: /* @__PURE__ */ y("button", {
854
1131
  type: "button",
855
1132
  className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
856
1133
  onClick: (t) => {
857
- t.stopPropagation(), X(e.id);
1134
+ t.stopPropagation(), Z(e.id);
858
1135
  },
859
1136
  children: e.name
860
1137
  })
861
1138
  }),
862
- e.category && /* @__PURE__ */ T(y, {
1139
+ e.category && /* @__PURE__ */ y(Je, {
863
1140
  variant: "secondary",
864
1141
  style: {
865
1142
  fontSize: "10px",
@@ -868,12 +1145,13 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
868
1145
  },
869
1146
  children: e.category
870
1147
  }),
871
- e.status && /* @__PURE__ */ T(ne, {
1148
+ e.status && /* @__PURE__ */ y(me, {
872
1149
  status: e.status,
873
- label: Z(e.status)
874
- })
1150
+ label: kn(e.status)
1151
+ }),
1152
+ /* @__PURE__ */ y(oe, { ...mn(e) })
875
1153
  ]
876
- }), /* @__PURE__ */ T("p", {
1154
+ }), /* @__PURE__ */ y("p", {
877
1155
  style: {
878
1156
  fontSize: "var(--font-size-body-sm)",
879
1157
  lineHeight: "var(--font-lineHeight-normal)",
@@ -883,10 +1161,10 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
883
1161
  textOverflow: "ellipsis",
884
1162
  whiteSpace: "nowrap"
885
1163
  },
886
- children: e.description || g("bigconsole.dashboards.card.noDescription", "No description provided")
1164
+ children: e.description || h("bigconsole.dashboards.card.noDescription", "No description provided")
887
1165
  })]
888
1166
  }),
889
- /* @__PURE__ */ E("div", {
1167
+ /* @__PURE__ */ b("div", {
890
1168
  style: {
891
1169
  display: "flex",
892
1170
  alignItems: "center",
@@ -894,139 +1172,149 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
894
1172
  flexWrap: "wrap"
895
1173
  },
896
1174
  children: [
897
- /* @__PURE__ */ E("div", {
1175
+ /* @__PURE__ */ b("div", {
898
1176
  style: {
899
1177
  display: "flex",
900
1178
  alignItems: "center",
901
1179
  gap: "var(--space-iconGap)"
902
1180
  },
903
1181
  children: [
904
- /* @__PURE__ */ T(Ce, { style: {
1182
+ /* @__PURE__ */ y(Re, { style: {
905
1183
  height: "var(--size-icon-sm)",
906
1184
  width: "var(--size-icon-sm)",
907
1185
  color: "var(--color-action-primary-bg)"
908
1186
  } }),
909
- /* @__PURE__ */ T("span", {
1187
+ /* @__PURE__ */ y("span", {
910
1188
  style: {
911
1189
  fontSize: "var(--font-size-body-sm)",
912
1190
  fontWeight: "var(--font-weight-semibold)",
913
1191
  color: "var(--color-text-primary)"
914
1192
  },
915
- children: bt(e)
1193
+ children: Pn(e)
916
1194
  }),
917
- /* @__PURE__ */ T("span", {
1195
+ /* @__PURE__ */ y("span", {
918
1196
  style: {
919
1197
  fontSize: "var(--font-size-body-sm)",
920
1198
  color: "var(--color-text-muted)"
921
1199
  },
922
- children: g("bigconsole.dashboards.card.pages", "pages")
1200
+ children: h("bigconsole.dashboards.card.pages", "pages")
923
1201
  })
924
1202
  ]
925
1203
  }),
926
- /* @__PURE__ */ E("div", {
1204
+ /* @__PURE__ */ b("div", {
927
1205
  style: {
928
1206
  display: "flex",
929
1207
  alignItems: "center",
930
1208
  gap: "var(--space-iconGap)"
931
1209
  },
932
1210
  children: [
933
- /* @__PURE__ */ T(Se, { style: {
1211
+ /* @__PURE__ */ y(Le, { style: {
934
1212
  height: "var(--size-icon-sm)",
935
1213
  width: "var(--size-icon-sm)",
936
1214
  color: "var(--color-action-primary-bg)"
937
1215
  } }),
938
- /* @__PURE__ */ T("span", {
1216
+ /* @__PURE__ */ y("span", {
939
1217
  style: {
940
1218
  fontSize: "var(--font-size-body-sm)",
941
1219
  fontWeight: "var(--font-weight-semibold)",
942
1220
  color: "var(--color-text-primary)"
943
1221
  },
944
- children: yt(e)
1222
+ children: Nn(e)
945
1223
  }),
946
- /* @__PURE__ */ T("span", {
1224
+ /* @__PURE__ */ y("span", {
947
1225
  style: {
948
1226
  fontSize: "var(--font-size-body-sm)",
949
1227
  color: "var(--color-text-muted)"
950
1228
  },
951
- children: g("bigconsole.dashboards.card.widgets", "widgets")
1229
+ children: h("bigconsole.dashboards.card.widgets", "widgets")
952
1230
  })
953
1231
  ]
954
1232
  }),
955
- /* @__PURE__ */ E("div", {
1233
+ /* @__PURE__ */ b("div", {
956
1234
  style: {
957
1235
  display: "flex",
958
1236
  alignItems: "center",
959
1237
  gap: "var(--space-iconGap)"
960
1238
  },
961
- children: [/* @__PURE__ */ T(ve, { style: {
1239
+ children: [/* @__PURE__ */ y(Me, { style: {
962
1240
  height: "var(--size-icon-sm)",
963
1241
  width: "var(--size-icon-sm)",
964
1242
  color: "var(--color-text-muted)"
965
- } }), /* @__PURE__ */ T("span", {
1243
+ } }), /* @__PURE__ */ y("span", {
966
1244
  style: {
967
1245
  fontSize: "var(--font-size-body-sm)",
968
1246
  fontWeight: "var(--font-weight-medium)",
969
1247
  color: "var(--color-text-muted)"
970
1248
  },
971
- children: gt(e.updatedAt)
1249
+ children: On(e.updatedAt)
972
1250
  })]
973
1251
  })
974
1252
  ]
975
1253
  }),
976
- /* @__PURE__ */ E("div", {
1254
+ /* @__PURE__ */ b("div", {
977
1255
  style: {
978
1256
  display: "flex",
979
1257
  alignItems: "center",
980
1258
  gap: "var(--space-controlGap)"
981
1259
  },
982
1260
  children: [
983
- /* @__PURE__ */ T(h, {
984
- permission: n.DASHBOARD_UPDATE,
1261
+ /* @__PURE__ */ y(se, {
1262
+ linked: Q(e).active || Q(e).pending,
1263
+ onLink: (t) => hn(e, t),
1264
+ onDetach: (t) => xn(e, t),
1265
+ ready: Tt,
1266
+ disabled: I,
1267
+ awaitingAnswer: Wt.has(e.id),
1268
+ onAccept: (t) => $(e, !0, t),
1269
+ onDecline: (t) => $(e, !1, t)
1270
+ }),
1271
+ /* @__PURE__ */ y(m, {
1272
+ permission: r.DASHBOARD_UPDATE,
985
1273
  deniedBehavior: "hide",
986
- children: /* @__PURE__ */ T(b, {
1274
+ children: /* @__PURE__ */ y(_, {
987
1275
  variant: "ghost",
988
1276
  size: "sm",
989
- onClick: (t) => ct(e.id, t),
1277
+ onClick: (t) => fn(e.id, t),
990
1278
  style: {
991
1279
  height: "var(--size-controlHeight-md)",
992
1280
  width: "var(--size-controlHeight-md)",
993
1281
  padding: 0,
994
1282
  borderRadius: "var(--radius-button)"
995
1283
  },
996
- title: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
997
- children: /* @__PURE__ */ T(Ee, { style: {
1284
+ title: h("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
1285
+ children: /* @__PURE__ */ y(Ue, { style: {
998
1286
  height: "var(--size-icon-sm)",
999
1287
  width: "var(--size-icon-sm)"
1000
1288
  } })
1001
1289
  })
1002
1290
  }),
1003
- /* @__PURE__ */ T(h, {
1004
- permission: n.DASHBOARD_CREATE,
1291
+ /* @__PURE__ */ y(m, {
1292
+ permission: r.DASHBOARD_CREATE,
1005
1293
  deniedBehavior: "hide",
1006
- children: /* @__PURE__ */ T(b, {
1294
+ children: /* @__PURE__ */ y(_, {
1007
1295
  variant: "ghost",
1008
1296
  size: "sm",
1009
- onClick: (t) => ut(e.id, e.name, t),
1297
+ onClick: (t) => Sn(e.id, e.name, t),
1010
1298
  style: {
1011
1299
  height: "var(--size-controlHeight-md)",
1012
1300
  width: "var(--size-controlHeight-md)",
1013
1301
  padding: 0,
1014
1302
  borderRadius: "var(--radius-button)"
1015
1303
  },
1016
- title: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
1017
- children: /* @__PURE__ */ T(xe, { style: {
1304
+ title: h("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
1305
+ children: /* @__PURE__ */ y(Ie, { style: {
1018
1306
  height: "var(--size-icon-sm)",
1019
1307
  width: "var(--size-icon-sm)"
1020
1308
  } })
1021
1309
  })
1022
1310
  }),
1023
- /* @__PURE__ */ T(h, {
1024
- permission: n.DASHBOARD_DELETE,
1311
+ /* @__PURE__ */ y(m, {
1312
+ permission: r.DASHBOARD_DELETE,
1025
1313
  deniedBehavior: "hide",
1026
- children: /* @__PURE__ */ T(b, {
1314
+ children: /* @__PURE__ */ y(_, {
1027
1315
  variant: "ghost",
1028
1316
  size: "sm",
1029
- onClick: (t) => lt(e.id, t),
1317
+ onClick: (t) => pn(e.id, t),
1030
1318
  style: {
1031
1319
  height: "var(--size-controlHeight-md)",
1032
1320
  width: "var(--size-controlHeight-md)",
@@ -1034,8 +1322,8 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
1034
1322
  borderRadius: "var(--radius-button)"
1035
1323
  },
1036
1324
  className: "hover:text-status-error-text hover:bg-status-error-bg/10",
1037
- title: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
1038
- children: /* @__PURE__ */ T(ke, { style: {
1325
+ title: h("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
1326
+ children: /* @__PURE__ */ y(Ke, { style: {
1039
1327
  height: "var(--size-icon-sm)",
1040
1328
  width: "var(--size-icon-sm)"
1041
1329
  } })
@@ -1048,56 +1336,56 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
1048
1336
  })
1049
1337
  }, e.id))
1050
1338
  }),
1051
- !L && q.length > 0 && /* @__PURE__ */ T("p", {
1339
+ !O && K.length > 0 && /* @__PURE__ */ y("p", {
1052
1340
  "data-testid": "dashboards-range",
1053
1341
  style: {
1054
1342
  margin: 0,
1055
1343
  fontSize: "var(--font-size-body-sm)",
1056
1344
  color: "var(--color-text-muted)"
1057
1345
  },
1058
- children: g("bigconsole.dashboards.pagination.range", "Showing {{from}}–{{to}} of {{total}} dashboards", {
1059
- from: et + 1,
1060
- to: et + Y.length,
1061
- total: q.length
1346
+ children: h("bigconsole.dashboards.pagination.range", "Showing {{from}}–{{to}} of {{total}} dashboards", {
1347
+ from: Y + 1,
1348
+ to: Y + rn.length,
1349
+ total: K.length
1062
1350
  })
1063
1351
  }),
1064
- !L && q.length > D && /* @__PURE__ */ E("nav", {
1065
- "aria-label": g("bigconsole.dashboards.pagination.label", "Dashboard pages"),
1352
+ !O && K.length > x && /* @__PURE__ */ b("nav", {
1353
+ "aria-label": h("bigconsole.dashboards.pagination.label", "Dashboard pages"),
1066
1354
  className: "flex flex-wrap items-center justify-center gap-control-gap border-t border-[var(--color-border-subtle)] pt-control-gap",
1067
1355
  children: [
1068
- /* @__PURE__ */ E(b, {
1356
+ /* @__PURE__ */ b(_, {
1069
1357
  variant: "outline",
1070
1358
  size: "sm",
1071
- onClick: tt,
1072
- disabled: M <= 1,
1073
- "aria-label": g("bigconsole.dashboards.pagination.previous", "Previous"),
1359
+ onClick: an,
1360
+ disabled: w <= 1,
1361
+ "aria-label": h("bigconsole.dashboards.pagination.previous", "Previous"),
1074
1362
  style: { minHeight: "var(--size-controlHeight-md)" },
1075
- children: [/* @__PURE__ */ T(ye, { style: {
1363
+ children: [/* @__PURE__ */ y(Pe, { style: {
1076
1364
  marginRight: "var(--space-iconGap)",
1077
1365
  height: "var(--size-icon-sm)",
1078
1366
  width: "var(--size-icon-sm)"
1079
- } }), g("bigconsole.dashboards.pagination.previous", "Previous")]
1367
+ } }), h("bigconsole.dashboards.pagination.previous", "Previous")]
1080
1368
  }),
1081
- /* @__PURE__ */ T("div", {
1369
+ /* @__PURE__ */ y("div", {
1082
1370
  style: {
1083
1371
  display: "flex",
1084
1372
  alignItems: "center",
1085
1373
  gap: "var(--space-iconGap)",
1086
1374
  flexWrap: "wrap"
1087
1375
  },
1088
- children: Re(M, J).map((e, t) => e === null ? /* @__PURE__ */ T("span", {
1376
+ children: st(w, J).map((e, t) => e === null ? /* @__PURE__ */ y("span", {
1089
1377
  "aria-hidden": "true",
1090
1378
  style: {
1091
1379
  color: "var(--color-text-muted)",
1092
1380
  padding: "0 var(--space-iconGap)"
1093
1381
  },
1094
1382
  children: "…"
1095
- }, `gap-${t}`) : /* @__PURE__ */ T(b, {
1096
- variant: e === M ? "default" : "ghost",
1383
+ }, `gap-${t}`) : /* @__PURE__ */ y(_, {
1384
+ variant: e === w ? "default" : "ghost",
1097
1385
  size: "sm",
1098
- onClick: () => rt(e),
1099
- "aria-current": e === M ? "page" : void 0,
1100
- "aria-label": g("bigconsole.dashboards.pagination.page", `Page ${e}`),
1386
+ onClick: () => sn(e),
1387
+ "aria-current": e === w ? "page" : void 0,
1388
+ "aria-label": h("bigconsole.dashboards.pagination.page", `Page ${e}`),
1101
1389
  style: {
1102
1390
  minWidth: "var(--size-controlHeight-md)",
1103
1391
  height: "var(--size-controlHeight-md)",
@@ -1107,67 +1395,67 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
1107
1395
  children: e
1108
1396
  }, e))
1109
1397
  }),
1110
- /* @__PURE__ */ E(b, {
1398
+ /* @__PURE__ */ b(_, {
1111
1399
  variant: "outline",
1112
1400
  size: "sm",
1113
- onClick: nt,
1114
- disabled: M >= J,
1115
- "aria-label": g("bigconsole.dashboards.pagination.next", "Next"),
1401
+ onClick: on,
1402
+ disabled: w >= J,
1403
+ "aria-label": h("bigconsole.dashboards.pagination.next", "Next"),
1116
1404
  style: { minHeight: "var(--size-controlHeight-md)" },
1117
- children: [g("bigconsole.dashboards.pagination.next", "Next"), /* @__PURE__ */ T(be, { style: {
1405
+ children: [h("bigconsole.dashboards.pagination.next", "Next"), /* @__PURE__ */ y(Fe, { style: {
1118
1406
  marginLeft: "var(--space-iconGap)",
1119
1407
  height: "var(--size-icon-sm)",
1120
1408
  width: "var(--size-icon-sm)"
1121
1409
  } })]
1122
1410
  }),
1123
- /* @__PURE__ */ T("span", {
1411
+ /* @__PURE__ */ y("span", {
1124
1412
  style: {
1125
1413
  fontSize: "var(--font-size-body-sm)",
1126
1414
  color: "var(--color-text-muted)"
1127
1415
  },
1128
- children: g("bigconsole.dashboards.pagination.pageOf", "Page {{currentPage}} of {{totalPages}}", {
1129
- currentPage: M,
1416
+ children: h("bigconsole.dashboards.pagination.pageOf", "Page {{currentPage}} of {{totalPages}}", {
1417
+ currentPage: w,
1130
1418
  totalPages: J
1131
1419
  })
1132
1420
  })
1133
1421
  ]
1134
1422
  }),
1135
- !L && q.length === 0 && /* @__PURE__ */ T(je, {
1423
+ !O && K.length === 0 && /* @__PURE__ */ y(Qe, {
1136
1424
  treatment: "insight",
1137
1425
  className: "border-[var(--color-border-seam)]",
1138
- children: /* @__PURE__ */ T(Me, {
1139
- illustration: v ? "empty-search" : "empty-data",
1140
- title: v ? g("bigconsole.dashboards.empty.filteredTitle", "No dashboards found") : g("bigconsole.dashboards.empty.title", "No dashboards yet"),
1141
- description: v ? g("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : g("bigconsole.dashboards.empty.description", "Get started by creating your first dashboard to visualize your data"),
1142
- action: v ? void 0 : /* @__PURE__ */ E("div", {
1426
+ children: /* @__PURE__ */ y($e, {
1427
+ illustration: g ? "empty-search" : "empty-data",
1428
+ title: g ? h("bigconsole.dashboards.empty.filteredTitle", "No dashboards found") : h("bigconsole.dashboards.empty.title", "No dashboards yet"),
1429
+ description: g ? h("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : h("bigconsole.dashboards.empty.description", "Get started by creating your first dashboard to visualize your data"),
1430
+ action: g ? void 0 : /* @__PURE__ */ b("div", {
1143
1431
  style: {
1144
1432
  display: "flex",
1145
1433
  gap: "var(--space-controlGap)",
1146
1434
  flexWrap: "wrap",
1147
1435
  justifyContent: "center"
1148
1436
  },
1149
- children: [/* @__PURE__ */ T(h, {
1150
- permission: n.DASHBOARD_CREATE,
1437
+ children: [/* @__PURE__ */ y(m, {
1438
+ permission: r.DASHBOARD_CREATE,
1151
1439
  deniedBehavior: "hide",
1152
- children: /* @__PURE__ */ E(b, {
1153
- onClick: it,
1154
- children: [/* @__PURE__ */ T(De, { style: {
1440
+ children: /* @__PURE__ */ b(_, {
1441
+ onClick: cn,
1442
+ children: [/* @__PURE__ */ y(We, { style: {
1155
1443
  marginRight: "var(--space-iconGap)",
1156
1444
  height: "var(--size-icon-sm)",
1157
1445
  width: "var(--size-icon-sm)"
1158
- } }), g("bigconsole.dashboards.actions.create", "Create Dashboard")]
1446
+ } }), h("bigconsole.dashboards.actions.create", "Create Dashboard")]
1159
1447
  })
1160
- }), /* @__PURE__ */ T(h, {
1161
- permission: n.DASHBOARD_IMPORT,
1448
+ }), /* @__PURE__ */ y(m, {
1449
+ permission: r.DASHBOARD_IMPORT,
1162
1450
  deniedBehavior: "hide",
1163
- children: /* @__PURE__ */ E(b, {
1451
+ children: /* @__PURE__ */ b(_, {
1164
1452
  variant: "outline",
1165
- onClick: dt,
1166
- children: [/* @__PURE__ */ T(Ae, { style: {
1453
+ onClick: Cn,
1454
+ children: [/* @__PURE__ */ y(qe, { style: {
1167
1455
  marginRight: "var(--space-iconGap)",
1168
1456
  height: "var(--size-icon-sm)",
1169
1457
  width: "var(--size-icon-sm)"
1170
- } }), g("bigconsole.dashboards.actions.importDashboard", "Import Dashboard")]
1458
+ } }), h("bigconsole.dashboards.actions.importDashboard", "Import Dashboard")]
1171
1459
  })
1172
1460
  })]
1173
1461
  })
@@ -1176,24 +1464,34 @@ var ze = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, imp
1176
1464
  ]
1177
1465
  })] })
1178
1466
  }),
1179
- /* @__PURE__ */ T(te, {
1180
- isOpen: Ve,
1181
- isCreating: F,
1182
- onClose: ot,
1183
- onCreate: st,
1184
- onTemplateInstalled: at
1467
+ /* @__PURE__ */ y(pe, {
1468
+ isOpen: dt,
1469
+ isCreating: ft,
1470
+ onClose: un,
1471
+ onCreate: dn,
1472
+ onTemplateInstalled: ln
1473
+ }),
1474
+ /* @__PURE__ */ y(ce, {
1475
+ onQueryChange: _n,
1476
+ isOpen: R !== null,
1477
+ board: R,
1478
+ candidates: yn,
1479
+ busy: I,
1480
+ error: Pt,
1481
+ onClose: () => z(null),
1482
+ onLink: bn
1185
1483
  }),
1186
- /* @__PURE__ */ T(ie, {
1187
- isOpen: Ue,
1188
- onClose: ft,
1189
- onSuccess: ht
1484
+ /* @__PURE__ */ y(ge, {
1485
+ isOpen: mt,
1486
+ onClose: wn,
1487
+ onSuccess: Dn
1190
1488
  }),
1191
- /* @__PURE__ */ T(ae, {
1192
- isOpen: Ge,
1193
- onClose: mt,
1194
- onSuccess: ht
1489
+ /* @__PURE__ */ y(_e, {
1490
+ isOpen: gt,
1491
+ onClose: En,
1492
+ onSuccess: Dn
1195
1493
  })
1196
1494
  ]
1197
1495
  });
1198
1496
  });
1199
- export { k as DashboardsPage, k as default };
1497
+ export { S as DashboardsPage, S as default };