@burdenoff/microfe-bigconsole 2026.1124.8 → 2026.1124.10

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.
@@ -2,43 +2,48 @@ import { useBigConsole as e, useBigConsoleNavigate as t } from "../context/BigCo
2
2
  import { useTr as n } from "../../shared/hooks/useTr.js";
3
3
  import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
4
4
  import { Section as i, SectionStack as a } from "../components/common/Section.js";
5
- import { SortBySelect as o } from "../components/common/SortBySelect.js";
5
+ import { SortBySelect as ee } from "../components/common/SortBySelect.js";
6
6
  import "../context/index.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";
7
+ import te from "../hooks/useDashboardOperations.js";
8
+ import { isNative as o, nativeConfirm as s, nativeImpact as ne, nativeNotify as c } from "../../utils/nativeBridge.js";
9
9
  import "../hooks/index.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 { DashboardGalleryCard as ge } from "../components/dashboard/DashboardGalleryCard.js";
21
- import { ImportDashboardDialog as _e } from "../components/dashboard/ImportDashboardDialog.js";
22
- import { ImportFromToolDialog as ve } from "../components/dashboard/ImportFromToolDialog.js";
10
+ import { useFleetLinks as re } from "../hooks/useFleetLinks.js";
11
+ import { useBoardDragLink as ie } from "../hooks/useBoardDragLink.js";
12
+ import { useFleetBoardActions as ae } from "../hooks/useFleetBoardActions.js";
13
+ import { useFleetConfirm as oe } from "../hooks/useFleetConfirm.js";
14
+ import { useFleetMasterActions as se } from "../hooks/useFleetMasterActions.js";
15
+ import { useFleetCopyTotals as ce } from "../hooks/useFleetCopyTotals.js";
16
+ import { useFleetMasterSearch as le } from "../hooks/useFleetMasterSearch.js";
17
+ import { FleetBadge as ue } from "../components/fleet/FleetBadge.js";
18
+ import { FleetCardActions as de } from "../components/fleet/FleetCardActions.js";
19
+ import { LinkToMasterDialog as fe } from "../components/fleet/LinkToMasterDialog.js";
20
+ import { buildFleetRows as pe, copyCounts as me, descendantIds as he, pendingMasterId as ge } from "../utils/fleetTree.js";
21
+ import { canDropOn as _e, canPickUp as ve, dropOutcome as ye } from "../utils/fleetDrag.js";
22
+ import { trCount as be } from "../utils/fleetPlural.js";
23
+ import { CreateDashboardDialog as xe } from "../components/dashboard/CreateDashboardDialog.js";
24
+ import { DashboardStatusPill as Se, useDashboardStatusLabel as Ce } from "../components/dashboard/DashboardStatusPill.js";
25
+ import { DashboardGalleryCard as we } from "../components/dashboard/DashboardGalleryCard.js";
26
+ import { ImportDashboardDialog as Te } from "../components/dashboard/ImportDashboardDialog.js";
27
+ import { ImportFromToolDialog as Ee } from "../components/dashboard/ImportFromToolDialog.js";
23
28
  import "../components/common/index.js";
24
- import { dashboardsListControls as ye } from "../assistant/pageControls.js";
25
- import { LIST_SORT_COPY as be, listSortOptions as xe } from "../utils/listSort.js";
26
- import { selectDashboards as Se } from "../utils/dashboardList.js";
27
- import { categoryFacets as Ce, categoryFromRail as we, categoryRailValue as Te, dashboardListQueryKey as Ee, galleryPage as De, pageClampParams as Oe } from "../utils/dashboardGallery.js";
28
- import { useDashboardListQuery as ke } from "../hooks/useDashboardListQuery.js";
29
- import { isBigConsoleQuotaError as Ae, reportBigConsoleQuotaError as je } from "../utils/quota.js";
30
- import { resolveCreateParam as Me, withoutCreateParam as Ne } from "../utils/createDialogParam.js";
31
- import { dashboardSuggestAnchorProps as Pe } from "../proactive/entities.js";
32
- import { memo as u, useCallback as d, useEffect as Fe, useMemo as f, useRef as p, useState as m } from "react";
33
- import { useSearchParams as Ie } from "react-router";
34
- import { AccessDenied as Le, PermissionButton as h } from "@burdenoff/fe-libs/shared/components";
35
- import { usePermissions as Re } from "@burdenoff/fe-libs/shared/providers/shell";
36
- import { ArrowRightLeft as g, Calendar as ze, Check as Be, ChevronDown as Ve, ChevronRight as He, Copy as Ue, FileText as We, Layers as Ge, LayoutDashboard as Ke, LayoutGrid as qe, Link2 as Je, List as Ye, ListTree as Xe, Pencil as Ze, Plus as Qe, Search as $e, Tag as et, Trash2 as tt, Unlink as nt, Upload as rt, X as it } from "lucide-react";
37
- import { AuroraBackground as _, Badge as at, Button as v, CTAOverflowMenu as y, Card as ot, CardContent as st, EmptyState as ct, GALLERY_PAGE_SIZE as b, GalleryCategoryRail as lt, GalleryPager as ut, GlassCard as dt, GradientText as x, IllustratedEmptyState as ft, Input as pt, PagePurpose as mt, Spinner as ht, ThemedSelect as gt, pageRange as _t, useGlassEmptyStates as vt } from "@burdenoff/fe-libs/ui";
29
+ import { dashboardsListControls as De } from "../assistant/pageControls.js";
30
+ import { LIST_SORT_COPY as Oe, listSortOptions as ke } from "../utils/listSort.js";
31
+ import { selectDashboards as Ae } from "../utils/dashboardList.js";
32
+ import { categoryFacets as je, categoryFromRail as Me, categoryRailValue as Ne, dashboardListQueryKey as Pe, galleryPage as Fe, pageClampParams as Ie } from "../utils/dashboardGallery.js";
33
+ import { useDashboardListQuery as Le } from "../hooks/useDashboardListQuery.js";
34
+ import { isBigConsoleQuotaError as Re, reportBigConsoleQuotaError as ze } from "../utils/quota.js";
35
+ import { resolveCreateParam as Be, withoutCreateParam as Ve } from "../utils/createDialogParam.js";
36
+ import { dashboardSuggestAnchorProps as He } from "../proactive/entities.js";
37
+ import { memo as l, useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
38
+ import { useSearchParams as Ue } from "react-router";
39
+ import { AccessDenied as We, PermissionButton as h } from "@burdenoff/fe-libs/shared/components";
40
+ import { usePermissions as Ge } from "@burdenoff/fe-libs/shared/providers/shell";
41
+ import { ArrowRightLeft as g, Calendar as Ke, Check as qe, ChevronDown as Je, ChevronRight as Ye, Copy as Xe, FileText as Ze, Layers as Qe, LayoutDashboard as $e, LayoutGrid as et, Link2 as tt, List as nt, ListTree as rt, Network as it, Pencil as at, Plus as ot, Search as st, Tag as ct, Trash2 as lt, Unlink as ut, Upload as dt, X as ft } from "lucide-react";
42
+ import { AuroraBackground as _, Badge as pt, Button as v, CTAOverflowMenu as y, Card as mt, CardContent as ht, EmptyState as gt, GALLERY_PAGE_SIZE as b, GalleryCategoryRail as _t, GalleryPager as vt, GlassCard as yt, GradientText as x, IllustratedEmptyState as bt, Input as xt, PagePurpose as St, Spinner as Ct, ThemedSelect as wt, pageRange as Tt, useGlassEmptyStates as Et } from "@burdenoff/fe-libs/ui";
38
43
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
39
- import { useAssistantPageControls as yt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
44
+ import { useAssistantPageControls as Dt } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
40
45
  // src/bigconsole/pages/DashboardsPage.tsx
41
- var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested", w = b, St = u(function({ title: e, subtitle: t, createLabel: n, importLabel: r, importFromToolLabel: i, onCreate: a, onImport: o, onImportFromTool: ee, canCreate: s, canImport: c }) {
46
+ var Ot = "bf-bigconsole-dashboards-view", kt = "bf-bigconsole-dashboards-nested", w = b, At = l(function({ title: e, subtitle: t, createLabel: n, importLabel: r, importFromToolLabel: i, onCreate: a, onImport: ee, onImportFromTool: te, canCreate: o, canImport: s }) {
42
47
  return /* @__PURE__ */ C("div", {
43
48
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
44
49
  children: [/* @__PURE__ */ S(_, { intensity: "subtle" }), /* @__PURE__ */ S("div", {
@@ -69,7 +74,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
69
74
  borderRadius: "var(--radius-card)",
70
75
  backgroundColor: "var(--color-action-primary-bg)"
71
76
  },
72
- children: /* @__PURE__ */ S(Ke, { style: {
77
+ children: /* @__PURE__ */ S($e, { style: {
73
78
  height: "var(--size-icon-lg)",
74
79
  width: "var(--size-icon-lg)",
75
80
  color: "var(--color-action-primary-text)"
@@ -99,8 +104,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
99
104
  primary: {
100
105
  label: n,
101
106
  onSelect: a,
102
- disabled: !s,
103
- icon: /* @__PURE__ */ S(Qe, { style: {
107
+ disabled: !o,
108
+ icon: /* @__PURE__ */ S(ot, { style: {
104
109
  marginRight: "var(--space-iconGap)",
105
110
  height: "var(--size-icon-sm)",
106
111
  width: "var(--size-icon-sm)"
@@ -108,16 +113,16 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
108
113
  },
109
114
  actions: [{
110
115
  label: r,
111
- onSelect: o,
112
- disabled: !c,
113
- icon: /* @__PURE__ */ S(rt, { style: {
116
+ onSelect: ee,
117
+ disabled: !s,
118
+ icon: /* @__PURE__ */ S(dt, { style: {
114
119
  height: "var(--size-icon-sm)",
115
120
  width: "var(--size-icon-sm)"
116
121
  } })
117
122
  }, {
118
123
  label: i,
119
- onSelect: ee,
120
- disabled: !c,
124
+ onSelect: te,
125
+ disabled: !s,
121
126
  icon: /* @__PURE__ */ S(g, { style: {
122
127
  height: "var(--size-icon-sm)",
123
128
  width: "var(--size-icon-sm)"
@@ -128,368 +133,435 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
128
133
  })
129
134
  })]
130
135
  });
131
- }), T = u(function() {
132
- let u = t(), g = n(), _ = ke(), { search: y, category: b, status: x, sort: T } = _.query, { setSearch: Ct, setCategory: wt, setStatus: Tt, setSort: Et, resetPage: Dt } = _, [Ot, E] = m(!1), [kt, At] = m(!1), [jt, Mt] = m(!1), [Nt, Pt] = m(!1), [D, Ft] = m(() => {
136
+ }), T = l(function() {
137
+ let l = t(), g = n(), _ = Le(), { search: y, category: b, status: x, sort: T } = _.query, { setSearch: jt, setCategory: Mt, setStatus: Nt, setSort: Pt, resetPage: Ft } = _, [It, Lt] = m(!1), [Rt, zt] = m(!1), [Bt, Vt] = m(!1), [Ht, Ut] = m(!1), [E, Wt] = m(() => {
133
138
  try {
134
- return window.localStorage.getItem(bt) === "list" ? "list" : "grid";
139
+ return window.localStorage.getItem(Ot) === "list" ? "list" : "grid";
135
140
  } catch {
136
141
  return "grid";
137
142
  }
138
- }), It = d((e) => {
139
- Ft(e), Dt();
143
+ }), Gt = u((e) => {
144
+ Wt(e), Ft();
140
145
  try {
141
- window.localStorage.setItem(bt, e);
146
+ window.localStorage.setItem(Ot, e);
142
147
  } catch {}
143
- }, [Dt]), { loading: O, error: k, dashboards: A, createDashboard: Lt, deleteDashboard: Rt, cloneDashboard: zt, refetch: j } = ee(), { links: M, requests: N, loading: Bt, error: Vt, refetch: P } = ne(), Ht = !Bt && !Vt, [Ut, F] = m(!1), { busy: Wt, linkToMaster: Gt, detach: Kt, respond: qt } = re(), I = Wt || Ut, [L, Jt] = m(() => {
148
+ }, [Ft]), { loading: D, error: O, dashboards: k, createDashboard: Kt, deleteDashboard: qt, cloneDashboard: Jt, refetch: A } = te(), { links: j, requests: M, loading: Yt, error: Xt, refetch: N } = re(), Zt = !Yt && !Xt, [Qt, P] = m(!1), { busy: $t, linkToMaster: en, detach: tn, respond: nn } = ae(), { setAsMaster: rn } = se(), F = $t || Qt, [I, an] = m(() => {
144
149
  try {
145
- return window.localStorage.getItem(xt) !== "flat";
150
+ return window.localStorage.getItem(kt) !== "flat";
146
151
  } catch {
147
152
  return !0;
148
153
  }
149
- }), [Yt, Xt] = m(() => /* @__PURE__ */ new Set()), [R, z] = m(null), [Zt, B] = m(null), { workspaceId: Qt, currentUser: $t } = e(), V = `${Qt ?? ""}:${$t?.id ?? ""}`, H = p(V), [en, U] = m(null), tn = d((e) => {
150
- Jt(e);
154
+ }), [on, sn] = m(() => /* @__PURE__ */ new Set()), [L, cn] = m(null), [ln, un] = m(null), { workspaceId: dn, currentUser: fn } = e(), R = `${dn ?? ""}:${fn?.id ?? ""}`, z = p(R), [pn, B] = m(null), mn = u((e) => {
155
+ an(e);
151
156
  try {
152
- window.localStorage.setItem(xt, e ? "nested" : "flat");
157
+ window.localStorage.setItem(kt, e ? "nested" : "flat");
153
158
  } catch {}
154
- }, []), nn = d((e) => {
155
- Xt((t) => {
159
+ }, []), hn = u((e) => {
160
+ sn((t) => {
156
161
  let n = new Set(t);
157
162
  return n.has(e) ? n.delete(e) : n.add(e), n;
158
163
  });
159
- }, []), rn = f(() => ue(M), [M]), an = f(() => A.filter((e) => e.isMaster === !0).map((e) => e.id), [A]), on = ie(an, M), sn = f(() => new Map([...rn, ...on]), [rn, on]), cn = f(() => new Set(N.map((e) => e.childDashboardId)), [N]), ln = f(() => new Set(M.filter((e) => e.status === "ACTIVE").map((e) => e.childDashboardId)), [M]), un = ln.size > 0, { hasPermission: W, isLoading: G } = Re(), K = W(r.DASHBOARD_READ), dn = W(r.DASHBOARD_CREATE), fn = W(r.DASHBOARD_IMPORT), pn = W(r.DASHBOARD_UPDATE), mn = W(r.DASHBOARD_DELETE), hn = vt(), [q, gn] = Ie();
160
- Fe(() => {
161
- let e = Me(q, {
162
- permissionsLoading: G,
163
- canRead: K,
164
- canCreate: dn
164
+ }, []), gn = f(() => me(j), [j]), _n = f(() => k.filter((e) => e.isMaster === !0).map((e) => e.id), [k]), vn = ce(_n, j), yn = f(() => new Map([...gn, ...vn]), [gn, vn]), bn = f(() => new Set(M.map((e) => e.childDashboardId)), [M]), xn = f(() => new Set(j.filter((e) => e.status === "ACTIVE").map((e) => e.childDashboardId)), [j]), Sn = xn.size > 0, { hasPermission: V, isLoading: H } = Ge(), U = V(r.DASHBOARD_READ), Cn = V(r.DASHBOARD_CREATE), wn = V(r.DASHBOARD_IMPORT), Tn = V(r.DASHBOARD_UPDATE), En = V(r.DASHBOARD_DELETE), Dn = Et(), [W, On] = Ue();
165
+ d(() => {
166
+ let e = Be(W, {
167
+ permissionsLoading: H,
168
+ canRead: U,
169
+ canCreate: Cn
165
170
  });
166
- e !== "none" && e !== "wait" && (e === "open" && E(!0), gn(Ne(q), { replace: !0 }));
171
+ e !== "none" && e !== "wait" && (e === "open" && Lt(!0), On(Ve(W), { replace: !0 }));
167
172
  }, [
168
- q,
169
- gn,
170
- G,
171
- K,
172
- dn
173
+ W,
174
+ On,
175
+ H,
176
+ U,
177
+ Cn
173
178
  ]);
174
- let _n = f(() => Array.from(new Set(A.flatMap((e) => e.category ? [e.category] : []))).sort(), [A]), { requestedPage: vn } = _, { filtered: yn, pageItems: bn } = Se(A, {
179
+ let kn = f(() => Array.from(new Set(k.flatMap((e) => e.category ? [e.category] : []))).sort(), [k]), { requestedPage: An } = _, { filtered: jn, pageItems: Mn } = Ae(k, {
175
180
  search: y,
176
181
  category: b,
177
182
  status: x,
178
183
  sort: T,
179
- page: vn,
184
+ page: An,
180
185
  pageSize: w
181
- }), J = L && D === "list" && un, xn = f(() => J ? le(yn, M, Yt) : [], [
182
- J,
183
- yn,
184
- M,
185
- Yt
186
- ]), Y = J ? xn.length : yn.length, { page: X, totalPages: Sn } = De(q.get("page"), Y, w), Cn = (X - 1) * w, wn = J ? xn.slice(Cn, Cn + w) : bn.map((e) => ({
186
+ }), G = I && E === "list" && Sn, Nn = f(() => G ? pe(jn, j, on) : [], [
187
+ G,
188
+ jn,
189
+ j,
190
+ on
191
+ ]), K = G ? Nn.length : jn.length, { page: q, totalPages: Pn } = Fe(W.get("page"), K, w), Fn = (q - 1) * w, In = G ? Nn.slice(Fn, Fn + w) : Mn.map((e) => ({
187
192
  item: e,
188
193
  depth: 0,
189
194
  parentId: null,
190
195
  childCount: 0,
191
196
  collapsed: !1
192
- })), Tn = wn.map((e) => e.item), Z = new Map(wn.map((e) => [e.item.id, e])), { facets: En, total: Dn } = f(() => Ce(A, {
197
+ })), Ln = In.map((e) => e.item), J = new Map(In.map((e) => [e.item.id, e])), { facets: Rn, total: zn } = f(() => je(k, {
193
198
  search: y,
194
199
  status: x,
195
200
  selected: b
196
201
  }), [
197
- A,
202
+ k,
198
203
  y,
199
204
  x,
200
205
  b
201
- ]), On = p(!1), kn = `${Ee(_.query)}\u0000${D}`, An = p(kn);
202
- Fe(() => {
203
- if (O) {
204
- On.current = !0;
206
+ ]), Bn = p(!1), Vn = `${Pe(_.query)}\u0000${E}`, Hn = p(Vn);
207
+ d(() => {
208
+ if (D) {
209
+ Bn.current = !0;
205
210
  return;
206
211
  }
207
- if (!On.current || k || q.has("create")) return;
208
- let e = Oe({
209
- params: q,
210
- requestedPage: vn,
211
- page: X,
212
- totalPages: Sn,
213
- previousKey: An.current,
214
- key: kn
212
+ if (!Bn.current || O || W.has("create")) return;
213
+ let e = Ie({
214
+ params: W,
215
+ requestedPage: An,
216
+ page: q,
217
+ totalPages: Pn,
218
+ previousKey: Hn.current,
219
+ key: Vn
215
220
  });
216
- An.current = kn, e && gn(e, { replace: !0 });
221
+ Hn.current = Vn, e && On(e, { replace: !0 });
217
222
  }, [
223
+ D,
218
224
  O,
219
- k,
220
- X,
221
- Sn,
222
- vn,
223
- kn,
224
225
  q,
225
- gn
226
+ Pn,
227
+ An,
228
+ Vn,
229
+ W,
230
+ On
226
231
  ]);
227
- let jn = p(null), Mn = p(!1);
228
- Fe(() => {
229
- if (!Mn.current) return;
230
- Mn.current = !1;
231
- let e = jn.current;
232
+ let Un = p(null), Wn = p(!1);
233
+ d(() => {
234
+ if (!Wn.current) return;
235
+ Wn.current = !1;
236
+ let e = Un.current;
232
237
  e && (e.focus({ preventScroll: !0 }), e.scrollIntoView?.({ block: "start" }));
233
- }, [X]);
234
- let { goToPage: Nn } = _, Pn = d((e) => {
235
- e !== X && (Mn.current = !0, Nn(e));
236
- }, [X, Nn]), Fn = d(() => {
237
- E(!0);
238
- }, []), In = d(({ dashboardId: e }) => {
239
- j(), u(`/dashboards/${e}`);
240
- }, [j, u]), Ln = d(() => {
241
- kt || E(!1);
242
- }, [kt]), Rn = d(async (e) => {
243
- At(!0);
238
+ }, [q]);
239
+ let { goToPage: Gn } = _, Kn = u((e) => {
240
+ e !== q && (Wn.current = !0, Gn(e));
241
+ }, [q, Gn]), qn = u(() => {
242
+ Lt(!0);
243
+ }, []), Jn = u(({ dashboardId: e }) => {
244
+ A(), l(`/dashboards/${e}`);
245
+ }, [A, l]), Yn = u(() => {
246
+ Rt || Lt(!1);
247
+ }, [Rt]), Xn = u(async (e) => {
248
+ zt(!0);
244
249
  try {
245
- let t = await Lt({
250
+ let t = await Kt({
246
251
  name: e.name,
247
252
  description: e.description,
248
253
  category: e.category,
249
254
  tags: e.tags
250
255
  });
251
256
  if (!t) throw Error(g("bigconsole.dashboards.createDialog.error.createFailed", "Failed to create dashboard. Please try again."));
252
- E(!1), u(`/dashboards/${t.id}/builder`);
257
+ Lt(!1), l(`/dashboards/${t.id}/builder`);
253
258
  } catch (e) {
254
- throw Ae(e) || console.error("Failed to create dashboard:", e), s() && l("error"), e;
259
+ throw Re(e) || console.error("Failed to create dashboard:", e), o() && c("error"), e;
255
260
  } finally {
256
- At(!1);
261
+ zt(!1);
257
262
  }
258
263
  }, [
259
- Lt,
260
- u,
264
+ Kt,
265
+ l,
261
266
  g
262
- ]), zn = d((e) => {
263
- u(`/dashboards/${e}`);
264
- }, [u]), Bn = d((e, t) => {
265
- t?.stopPropagation(), u(`/dashboards/${e}/builder`);
266
- }, [u]), Vn = d(async (e, t) => {
267
+ ]), Zn = u((e) => {
268
+ l(`/dashboards/${e}`);
269
+ }, [l]), Qn = u((e, t) => {
270
+ t?.stopPropagation(), l(`/dashboards/${e}/builder`);
271
+ }, [l]), $n = u(async (e, t) => {
267
272
  t?.stopPropagation();
268
- let n = g("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), r = await c({
273
+ let n = k.find((t) => t.id === e)?.isMaster === !0, r = vn.get(e), i = r !== void 0 && r > 0 ? be(g, r, "bigconsole.fleet.delete.confirmWithCopies", "Are you sure you want to delete this dashboard? {{count}} copies follow it. They keep a plain copy of everything and stop following it.", "Are you sure you want to delete this dashboard? 1 copy follows it. It keeps a plain copy of everything and stops following it.") : n && r === void 0 ? g("bigconsole.fleet.delete.confirmMaster", "Are you sure you want to delete this dashboard? Boards that follow it keep a plain copy of everything and stop following it.") : g("bigconsole.dashboards.confirmDelete", "Are you sure you want to delete this dashboard?"), a = await s({
269
274
  title: "Delete dashboard?",
270
- message: n,
275
+ message: i,
271
276
  okButtonTitle: "Delete",
272
277
  cancelButtonTitle: "Cancel"
273
278
  });
274
- if (r === null ? window.confirm(n) : r) {
275
- te("medium");
279
+ if (a === null ? window.confirm(i) : a) {
280
+ ne("medium");
276
281
  try {
277
- await Rt(e), s() && l("success");
282
+ await qt(e), o() && c("success");
278
283
  } catch (e) {
279
- throw s() && l("error"), e;
284
+ throw o() && c("error"), e;
280
285
  }
281
286
  }
282
- }, [Rt, g]), Q = d((e) => ({
283
- active: e.linkStatus === "ACTIVE" || ln.has(e.id),
284
- pending: e.linkStatus === "PENDING" || fe(e.id, M) !== null
285
- }), [ln, M]), Hn = d((e) => {
286
- let t = Q(e);
287
+ }, [
288
+ vn,
289
+ k,
290
+ qt,
291
+ g
292
+ ]), Y = u((e) => ({
293
+ active: e.linkStatus === "ACTIVE" || xn.has(e.id),
294
+ pending: e.linkStatus === "PENDING" || ge(e.id, j) !== null
295
+ }), [xn, j]), er = u((e) => {
296
+ let t = Y(e);
287
297
  return {
288
298
  isMaster: e.isMaster === !0,
289
- copyCount: sn.get(e.id) ?? 0,
299
+ copyCount: yn.get(e.id) ?? 0,
290
300
  isCopy: t.active,
291
301
  isPending: t.pending
292
302
  };
293
- }, [Q, sn]), Un = d((e, t) => {
294
- t?.stopPropagation(), B(null), z({
303
+ }, [Y, yn]), tr = u((e, t) => {
304
+ t?.stopPropagation(), un(null), cn({
295
305
  id: e.id,
296
306
  name: e.name
297
307
  });
298
- }, []), [Wn, Gn] = m("");
299
- Fe(() => {
300
- H.current !== V && (H.current = V, z(null), B(null), Gn(""), U(null), F(!1));
301
- }, [V]);
302
- let Kn = ae(Wn, R !== null), qn = f(() => {
303
- if (!R) return [];
304
- let e = de(R.id, M), t = /* @__PURE__ */ new Set();
305
- return [...A.map((e) => ({
308
+ }, []), [nr, rr] = m("");
309
+ d(() => {
310
+ z.current !== R && (z.current = R, cn(null), un(null), rr(""), B(null), P(!1));
311
+ }, [R]);
312
+ let ir = le(nr, L !== null), ar = f(() => {
313
+ if (!L) return [];
314
+ let e = he(L.id, j), t = /* @__PURE__ */ new Set();
315
+ return [...k.map((e) => ({
306
316
  id: e.id,
307
317
  name: e.name,
308
318
  isMaster: e.isMaster === !0
309
- })), ...Kn].filter((n) => n.id === R.id || e.has(n.id) || t.has(n.id) ? !1 : (t.add(n.id), !0));
319
+ })), ...ir].filter((n) => n.id === L.id || e.has(n.id) || t.has(n.id) ? !1 : (t.add(n.id), !0));
320
+ }, [
321
+ k,
322
+ ir,
323
+ j,
324
+ L
325
+ ]), X = p(null), or = u(async (e, t, n) => {
326
+ let r = z.current;
327
+ if (X.current === r) return;
328
+ X.current = r;
329
+ let i = () => z.current !== r;
330
+ P(!0);
331
+ try {
332
+ let n = await en(e.id, t);
333
+ if (i() || (cn(null), await Promise.all([A(), N()]), i())) return;
334
+ B(n === "PENDING" ? g("bigconsole.fleet.notice.requested", "Link requested. The owner of \"{{name}}\" has to accept it before it follows the master.", { name: e.name }) : g("bigconsole.fleet.notice.linked", "\"{{name}}\" now follows its master.", { name: e.name }));
335
+ } catch (e) {
336
+ if (i()) return;
337
+ n(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.link", "The board could not be linked."));
338
+ } finally {
339
+ X.current === r && (X.current = null), i() || P(!1);
340
+ }
310
341
  }, [
342
+ en,
311
343
  A,
312
- Kn,
313
- M,
314
- R
315
- ]), Jn = d(async (e) => {
316
- if (!R) return;
317
- B(null);
318
- let t = H.current, n = () => H.current !== t;
319
- F(!0);
344
+ N,
345
+ g
346
+ ]), sr = u(async (e) => {
347
+ L && (un(null), await or(L, e, un));
348
+ }, [or, L]), cr = u(async (e, t) => {
349
+ t?.stopPropagation();
350
+ let n = z.current;
351
+ if (X.current === n) return;
352
+ X.current = n;
353
+ let r = () => z.current !== n;
354
+ B(null), P(!0);
320
355
  try {
321
- let t = await Gt(R.id, e);
322
- if (n() || (z(null), await Promise.all([j(), P()]), n())) return;
323
- U(t === "PENDING" ? g("bigconsole.fleet.notice.requested", "Link requested. The owner of \"{{name}}\" has to accept it before it follows the master.", { name: R.name }) : g("bigconsole.fleet.notice.linked", "\"{{name}}\" now follows its master.", { name: R.name }));
356
+ if (await rn(e.id), r() || (await Promise.all([A(), N()]), r())) return;
357
+ B(g("bigconsole.fleet.notice.nowMaster", "\"{{name}}\" is now a master. Other boards can follow it.", { name: e.name }));
324
358
  } catch (e) {
325
- if (n()) return;
326
- B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.link", "The board could not be linked."));
359
+ if (r()) return;
360
+ B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.setMaster", "The board could not be made a master."));
327
361
  } finally {
328
- n() || F(!1);
362
+ X.current === n && (X.current = null), r() || P(!1);
363
+ }
364
+ }, [
365
+ A,
366
+ N,
367
+ rn,
368
+ g
369
+ ]), lr = oe(), ur = u(async (e, t) => {
370
+ let n = ye({
371
+ id: e.id,
372
+ follows: Y(e)
373
+ }, t.id, j);
374
+ if (n.kind !== "link") {
375
+ let r = n.kind === "followsOther" || n.kind === "pendingOther" ? n.masterId : null, i = k.find((e) => e.id === r)?.name ?? g("bigconsole.fleet.drop.anotherBoard", "another board"), a = {
376
+ name: e.name,
377
+ master: t.name,
378
+ other: i
379
+ };
380
+ B(n.kind === "alreadyFollowsTarget" ? g("bigconsole.fleet.drop.alreadyFollows", "\"{{name}}\" already follows \"{{master}}\".", a) : n.kind === "pendingToTarget" ? g("bigconsole.fleet.drop.alreadyRequested", "A request for \"{{name}}\" to follow \"{{master}}\" is already waiting for its owner.", a) : n.kind === "followsOther" ? g("bigconsole.fleet.drop.followsOther", "\"{{name}}\" already follows \"{{other}}\". Detach it from that board first to link it to another.", a) : g("bigconsole.fleet.drop.requestedOther", "\"{{name}}\" has already asked to follow \"{{other}}\". Detach it first to link it to another.", a));
381
+ return;
329
382
  }
383
+ let r = z.current;
384
+ await lr(g("bigconsole.fleet.drop.title", "Link to master?"), g("bigconsole.fleet.drop.confirm", "\"{{name}}\" will follow \"{{master}}\" and receive the widgets added to it. Its own widgets stay. If someone else owns \"{{name}}\", they are asked to accept first. Link it?", {
385
+ name: e.name,
386
+ master: t.name
387
+ }), g("bigconsole.fleet.drop.ok", "Link")) && z.current === r && (B(null), await or(e, t.id, B));
330
388
  }, [
331
- R,
332
- Gt,
389
+ lr,
390
+ k,
391
+ Y,
392
+ or,
333
393
  j,
334
- P,
335
394
  g
336
- ]), Yn = d(async (e, t) => {
395
+ ]), Z = ie({
396
+ canPickUp: (e) => ve({
397
+ canUpdate: Tn,
398
+ linksReady: Zt,
399
+ busy: F,
400
+ awaitingAnswer: bn.has(e.id)
401
+ }),
402
+ canDrop: (e, t) => !F && _e(e.id, t.id, j),
403
+ onDrop: (e, t) => void ur(e, t)
404
+ }), dr = Z.reset;
405
+ d(() => {
406
+ dr();
407
+ }, [R, dr]);
408
+ let fr = u(async (e, t) => {
337
409
  t?.stopPropagation();
338
- let n = H.current, r = () => H.current !== n, i = g("bigconsole.fleet.detach.confirm", "\"{{name}}\" will keep a plain copy of everything and stop following its master. Detach it?", { name: e.name }), a = await c({
410
+ let n = z.current, r = () => z.current !== n, i = g("bigconsole.fleet.detach.confirm", "\"{{name}}\" will keep a plain copy of everything and stop following its master. Detach it?", { name: e.name }), a = await s({
339
411
  title: g("bigconsole.fleet.detach.title", "Detach from master?"),
340
412
  message: i,
341
413
  okButtonTitle: g("bigconsole.fleet.detach.ok", "Detach"),
342
414
  cancelButtonTitle: g("bigconsole.fleet.link.cancel", "Cancel")
343
415
  });
344
416
  if ((a === null ? window.confirm(i) : a) && !r()) {
345
- F(!0);
417
+ P(!0);
346
418
  try {
347
- if (await Kt(e.id), await Promise.all([j(), P()]), r()) return;
348
- U(g("bigconsole.fleet.notice.detached", "\"{{name}}\" no longer follows a master.", { name: e.name }));
419
+ if (await tn(e.id), await Promise.all([A(), N()]), r()) return;
420
+ B(g("bigconsole.fleet.notice.detached", "\"{{name}}\" no longer follows a master.", { name: e.name }));
349
421
  } catch (e) {
350
422
  if (r()) return;
351
- U(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.detach", "The board could not be detached."));
423
+ B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.detach", "The board could not be detached."));
352
424
  } finally {
353
- r() || F(!1);
425
+ r() || P(!1);
354
426
  }
355
427
  }
356
428
  }, [
357
- Kt,
358
- j,
359
- P,
429
+ tn,
430
+ A,
431
+ N,
360
432
  g
361
- ]), $ = d(async (e, t, n) => {
433
+ ]), Q = u(async (e, t, n) => {
362
434
  n?.stopPropagation();
363
- let r = N.find((t) => t.childDashboardId === e.id)?.masterName ?? "", i = H.current, a = () => H.current !== i;
364
- F(!0);
435
+ let r = M.find((t) => t.childDashboardId === e.id)?.masterName ?? "", i = z.current, a = () => z.current !== i;
436
+ P(!0);
365
437
  try {
366
- if (await qt(e.id, t), await Promise.all([j(), P()]), a()) return;
367
- U(t ? g("bigconsole.fleet.notice.accepted", "\"{{name}}\" now follows \"{{master}}\".", {
438
+ if (await nn(e.id, t), await Promise.all([A(), N()]), a()) return;
439
+ B(t ? g("bigconsole.fleet.notice.accepted", "\"{{name}}\" now follows \"{{master}}\".", {
368
440
  name: e.name,
369
441
  master: r
370
442
  }) : g("bigconsole.fleet.notice.declined", "Link request for \"{{name}}\" declined.", { name: e.name }));
371
443
  } catch (e) {
372
444
  if (a()) return;
373
- U(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.respond", "The request could not be answered."));
445
+ B(e instanceof Error && e.message ? e.message : g("bigconsole.fleet.error.respond", "The request could not be answered."));
374
446
  } finally {
375
- a() || F(!1);
447
+ a() || P(!1);
376
448
  }
377
449
  }, [
378
- j,
379
- P,
450
+ A,
380
451
  N,
381
- qt,
452
+ M,
453
+ nn,
382
454
  g
383
- ]), Xn = d(async (e, t, n) => {
455
+ ]), pr = u(async (e, t, n) => {
384
456
  n?.stopPropagation();
385
457
  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);
386
458
  if (i && i.trim()) {
387
- te("medium");
459
+ ne("medium");
388
460
  try {
389
- let t = await zt(e, i.trim());
390
- t && (s() && l("success"), u(`/dashboards/${t.id}`));
461
+ let t = await Jt(e, i.trim());
462
+ t && (o() && c("success"), l(`/dashboards/${t.id}`));
391
463
  } catch (e) {
392
- if (je(e, "project")) return;
393
- throw s() && l("error"), e;
464
+ if (ze(e, "project")) return;
465
+ throw o() && c("error"), e;
394
466
  }
395
467
  }
396
468
  }, [
397
- zt,
398
- u,
469
+ Jt,
470
+ l,
399
471
  g
400
- ]), Zn = _.clearFilters, Qn = d(() => {
401
- Mt(!0);
402
- }, []), $n = d(() => {
403
- Mt(!1);
404
- }, []), er = d(() => {
405
- Pt(!0);
406
- }, []), tr = d(() => {
407
- Pt(!1);
408
- }, []), nr = d((e, t) => {
409
- j();
410
- }, [j]), rr = (e) => {
411
- 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);
412
- 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", {
472
+ ]), mr = _.clearFilters, hr = u(() => {
473
+ Vt(!0);
474
+ }, []), gr = u(() => {
475
+ Vt(!1);
476
+ }, []), _r = u(() => {
477
+ Ut(!0);
478
+ }, []), vr = u(() => {
479
+ Ut(!1);
480
+ }, []), yr = u((e, t) => {
481
+ A();
482
+ }, [A]), br = (e) => {
483
+ let t = new Date(e), n = /* @__PURE__ */ new Date(), r = n.getTime() - t.getTime(), i = Math.floor(r / 6e4), a = Math.floor(r / 36e5), ee = Math.floor(r / 864e5);
484
+ 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")}` : ee < 7 ? `${ee}${g("bigconsole.dashboards.time.daysAgoSuffix", "d ago")}` : new Intl.DateTimeFormat("en-US", {
413
485
  month: "short",
414
486
  day: "numeric",
415
487
  year: t.getFullYear() === n.getFullYear() ? void 0 : "numeric"
416
488
  }).format(t);
417
- }, ir = he(), ar = f(() => Array.from(new Set(A.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
489
+ }, xr = Ce(), Sr = f(() => Array.from(new Set(k.map((e) => e.status).filter((e) => e !== void 0))).sort().map((e) => ({
418
490
  value: e,
419
- label: ir(e)
420
- })), [A, ir]), or = f(() => xe(g, !0), [g]), sr = f(() => !G && K && !k ? ye({
491
+ label: xr(e)
492
+ })), [k, xr]), Cr = f(() => ke(g, !0), [g]), wr = f(() => !H && U && !O ? De({
421
493
  tr: g,
422
- categories: _n,
423
- statuses: ar,
494
+ categories: kn,
495
+ statuses: Sr,
424
496
  category: b,
425
497
  status: x,
426
- setCategory: wt,
427
- setStatus: Tt,
428
- setSearch: Ct,
498
+ setCategory: Mt,
499
+ setStatus: Nt,
500
+ setSearch: jt,
429
501
  sort: T,
430
- setSort: Et
502
+ setSort: Pt
431
503
  }) : null, [
432
504
  g,
433
- G,
434
- K,
435
- k,
436
- _n,
437
- ar,
505
+ H,
506
+ U,
507
+ O,
508
+ kn,
509
+ Sr,
438
510
  b,
439
511
  x,
440
512
  T,
441
- wt,
442
- Tt,
443
- Ct,
444
- Et
513
+ Mt,
514
+ Nt,
515
+ jt,
516
+ Pt
445
517
  ]);
446
- yt(sr);
447
- let cr = (e) => e.widgetCount ?? 0, lr = (e) => e.pageCount || 0, ur = /* @__PURE__ */ S(St, {
518
+ Dt(wr);
519
+ let Tr = (e) => e.widgetCount ?? 0, Er = (e) => e.pageCount || 0, Dr = /* @__PURE__ */ S(At, {
448
520
  title: g("bigconsole.dashboards.title", "Dashboards"),
449
521
  subtitle: g("bigconsole.dashboards.subtitle", "Create and manage your analytics dashboards"),
450
522
  createLabel: g("bigconsole.dashboards.actions.create", "Create Dashboard"),
451
523
  importLabel: g("bigconsole.dashboards.actions.import", "Import"),
452
524
  importFromToolLabel: g("bigconsole.dashboards.actions.importFromTool", "Import from another tool"),
453
- onCreate: Fn,
454
- onImport: Qn,
455
- onImportFromTool: er,
456
- canCreate: dn,
457
- canImport: fn
525
+ onCreate: qn,
526
+ onImport: hr,
527
+ onImportFromTool: _r,
528
+ canCreate: Cn,
529
+ canImport: wn
458
530
  });
459
- if (G) return /* @__PURE__ */ S("div", {
531
+ if (H) return /* @__PURE__ */ S("div", {
460
532
  style: {
461
533
  display: "flex",
462
534
  alignItems: "center",
463
535
  justifyContent: "center",
464
536
  padding: "80px 0"
465
537
  },
466
- children: /* @__PURE__ */ S(ht, { style: {
538
+ children: /* @__PURE__ */ S(Ct, { style: {
467
539
  height: "var(--size-icon-xl)",
468
540
  width: "var(--size-icon-xl)"
469
541
  } })
470
542
  });
471
- if (!K) return /* @__PURE__ */ S(Le, {
543
+ if (!U) return /* @__PURE__ */ S(We, {
472
544
  title: g("bigconsole.dashboards.accessDenied.title", "Access Denied"),
473
545
  description: g("bigconsole.dashboards.accessDenied.description", "You don't have permission to view dashboards.")
474
546
  });
475
- if (k) return /* @__PURE__ */ C("div", {
547
+ if (O) return /* @__PURE__ */ C("div", {
476
548
  "data-tour": "bigconsole-dashboards-list",
477
549
  style: {
478
550
  minHeight: "100vh",
479
551
  backgroundColor: "var(--color-bg-canvas)"
480
552
  },
481
- children: [ur, /* @__PURE__ */ S("div", {
553
+ children: [Dr, /* @__PURE__ */ S("div", {
482
554
  style: { padding: "var(--space-pagePadding)" },
483
- children: hn ? /* @__PURE__ */ S("div", {
555
+ children: Dn ? /* @__PURE__ */ S("div", {
484
556
  "data-testid": "dashboards-error",
485
- children: /* @__PURE__ */ S(ct, {
557
+ children: /* @__PURE__ */ S(gt, {
486
558
  kind: "error",
487
559
  size: "page",
488
560
  title: g("bigconsole.dashboards.error.title", "Error loading dashboards"),
489
- description: k.message,
561
+ description: O.message,
490
562
  action: /* @__PURE__ */ S(v, {
491
563
  size: "sm",
492
- onClick: () => j(),
564
+ onClick: () => A(),
493
565
  children: g("bigconsole.dashboards.error.retry", "Retry")
494
566
  })
495
567
  })
@@ -497,17 +569,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
497
569
  headingLevel: 2,
498
570
  tone: "danger",
499
571
  title: g("bigconsole.dashboards.error.title", "Error loading dashboards"),
500
- description: k.message,
572
+ description: O.message,
501
573
  "data-testid": "dashboards-error",
502
574
  actions: /* @__PURE__ */ S(v, {
503
575
  size: "sm",
504
- onClick: () => j(),
576
+ onClick: () => A(),
505
577
  children: g("bigconsole.dashboards.error.retry", "Retry")
506
578
  })
507
579
  })
508
580
  })]
509
581
  });
510
- let dr = {
582
+ let Or = {
511
583
  pagesNav: g("bigconsole.dashboards.pagination.label", "Dashboard pages"),
512
584
  previous: g("bigconsole.dashboards.pagination.previous", "Previous"),
513
585
  next: g("bigconsole.dashboards.pagination.next", "Next"),
@@ -523,61 +595,68 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
523
595
  currentPage: e,
524
596
  totalPages: t
525
597
  })
526
- }, fr = _t(X, w, Y), pr = !O && Y > 0, mr = !O && A.length > 0 && yn.length === 0, hr = !O && A.length === 0, gr = (e) => {
598
+ }, kr = Tt(q, w, K), $ = !D && K > 0, Ar = !D && k.length > 0 && jn.length === 0, jr = !D && k.length === 0, Mr = (e) => {
527
599
  let t = [];
528
- if (pn && t.push({
600
+ if (Tn && t.push({
529
601
  id: "edit",
530
602
  label: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
531
- icon: Ze,
532
- onSelect: () => Bn(e.id)
533
- }), dn && t.push({
603
+ icon: at,
604
+ onSelect: () => Qn(e.id)
605
+ }), Cn && t.push({
534
606
  id: "clone",
535
607
  label: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
536
- icon: Ue,
537
- onSelect: () => void Xn(e.id, e.name)
538
- }), pn && Ht) {
539
- if (cn.has(e.id)) t.push({
608
+ icon: Xe,
609
+ onSelect: () => void pr(e.id, e.name)
610
+ }), Tn && Zt) {
611
+ if (bn.has(e.id)) t.push({
540
612
  id: "accept",
541
613
  label: g("bigconsole.fleet.action.accept", "Accept link request"),
542
- icon: Be,
543
- disabled: I,
544
- onSelect: () => void $(e, !0),
614
+ icon: qe,
615
+ disabled: F,
616
+ onSelect: () => void Q(e, !0),
545
617
  testId: "fleet-accept"
546
618
  }, {
547
619
  id: "decline",
548
620
  label: g("bigconsole.fleet.action.decline", "Decline link request"),
549
- icon: it,
550
- disabled: I,
551
- onSelect: () => void $(e, !1),
621
+ icon: ft,
622
+ disabled: F,
623
+ onSelect: () => void Q(e, !1),
552
624
  testId: "fleet-decline"
553
625
  });
554
626
  else {
555
- let n = Q(e);
627
+ let n = Y(e);
556
628
  t.push(n.active || n.pending ? {
557
629
  id: "detach",
558
630
  label: g("bigconsole.fleet.action.detach", "Detach from master"),
559
- icon: nt,
560
- disabled: I,
561
- onSelect: () => void Yn(e),
631
+ icon: ut,
632
+ disabled: F,
633
+ onSelect: () => void fr(e),
562
634
  testId: "fleet-detach"
563
635
  } : {
564
636
  id: "link",
565
637
  label: g("bigconsole.fleet.action.link", "Link to master…"),
566
- icon: Je,
567
- disabled: I,
568
- onSelect: () => Un(e),
638
+ icon: tt,
639
+ disabled: F,
640
+ onSelect: () => tr(e),
569
641
  testId: "fleet-link"
642
+ }), !n.active && !n.pending && e.isMaster !== !0 && t.push({
643
+ id: "setMaster",
644
+ label: g("bigconsole.fleet.action.setMaster", "Set as master"),
645
+ icon: it,
646
+ disabled: F,
647
+ onSelect: () => void cr(e),
648
+ testId: "fleet-set-master-card"
570
649
  });
571
650
  }
572
651
  }
573
- return mn && t.push({
652
+ return En && t.push({
574
653
  id: "delete",
575
654
  label: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
576
- icon: tt,
655
+ icon: lt,
577
656
  danger: !0,
578
- onSelect: () => void Vn(e.id)
657
+ onSelect: () => void $n(e.id)
579
658
  }), t;
580
- }, _r = /* @__PURE__ */ C("div", {
659
+ }, Nr = /* @__PURE__ */ C("div", {
581
660
  role: "group",
582
661
  "aria-label": g("bigconsole.dashboards.view.label", "Result layout"),
583
662
  style: {
@@ -590,11 +669,11 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
590
669
  },
591
670
  children: [
592
671
  /* @__PURE__ */ S(v, {
593
- variant: D === "grid" ? "default" : "ghost",
672
+ variant: E === "grid" ? "default" : "ghost",
594
673
  size: "sm",
595
- onClick: () => It("grid"),
674
+ onClick: () => Gt("grid"),
596
675
  "aria-label": g("bigconsole.dashboards.view.grid", "Grid view"),
597
- "aria-pressed": D === "grid",
676
+ "aria-pressed": E === "grid",
598
677
  title: g("bigconsole.dashboards.view.grid", "Grid view"),
599
678
  style: {
600
679
  height: "var(--size-controlHeight-md)",
@@ -602,17 +681,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
602
681
  padding: 0,
603
682
  borderRadius: "var(--radius-button)"
604
683
  },
605
- children: /* @__PURE__ */ S(qe, { style: {
684
+ children: /* @__PURE__ */ S(et, { style: {
606
685
  height: "var(--size-icon-sm)",
607
686
  width: "var(--size-icon-sm)"
608
687
  } })
609
688
  }),
610
689
  /* @__PURE__ */ S(v, {
611
- variant: D === "list" ? "default" : "ghost",
690
+ variant: E === "list" ? "default" : "ghost",
612
691
  size: "sm",
613
- onClick: () => It("list"),
692
+ onClick: () => Gt("list"),
614
693
  "aria-label": g("bigconsole.dashboards.view.list", "List view"),
615
- "aria-pressed": D === "list",
694
+ "aria-pressed": E === "list",
616
695
  title: g("bigconsole.dashboards.view.list", "List view"),
617
696
  style: {
618
697
  height: "var(--size-controlHeight-md)",
@@ -620,18 +699,18 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
620
699
  padding: 0,
621
700
  borderRadius: "var(--radius-button)"
622
701
  },
623
- children: /* @__PURE__ */ S(Ye, { style: {
702
+ children: /* @__PURE__ */ S(nt, { style: {
624
703
  height: "var(--size-icon-sm)",
625
704
  width: "var(--size-icon-sm)"
626
705
  } })
627
706
  }),
628
- D === "list" && un && /* @__PURE__ */ S(v, {
629
- variant: L ? "default" : "ghost",
707
+ E === "list" && Sn && /* @__PURE__ */ S(v, {
708
+ variant: I ? "default" : "ghost",
630
709
  size: "sm",
631
- onClick: () => tn(!L),
632
- "aria-label": L ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
633
- "aria-pressed": L,
634
- title: L ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
710
+ onClick: () => mn(!I),
711
+ "aria-label": I ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
712
+ "aria-pressed": I,
713
+ title: I ? g("bigconsole.fleet.list.showFlat", "Show flat list") : g("bigconsole.fleet.list.showNested", "Show linked boards nested"),
635
714
  "data-testid": "fleet-nested-toggle",
636
715
  style: {
637
716
  height: "var(--size-controlHeight-md)",
@@ -639,7 +718,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
639
718
  padding: 0,
640
719
  borderRadius: "var(--radius-button)"
641
720
  },
642
- children: /* @__PURE__ */ S(Xe, { style: {
721
+ children: /* @__PURE__ */ S(rt, { style: {
643
722
  height: "var(--size-icon-sm)",
644
723
  width: "var(--size-icon-sm)"
645
724
  } })
@@ -653,14 +732,14 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
653
732
  backgroundColor: "var(--color-bg-canvas)"
654
733
  },
655
734
  children: [
656
- ur,
735
+ Dr,
657
736
  /* @__PURE__ */ S("div", {
658
737
  style: { padding: "var(--space-pagePadding)" },
659
738
  children: /* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(i, {
660
739
  emphasis: "muted",
661
740
  padding: "compact",
662
741
  "aria-label": g("bigconsole.dashboards.about", "About dashboards"),
663
- children: /* @__PURE__ */ S(mt, {
742
+ children: /* @__PURE__ */ S(St, {
664
743
  className: "max-w-[80ch]",
665
744
  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."
666
745
  })
@@ -669,7 +748,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
669
748
  "aria-label": g("bigconsole.dashboards.results.title", "Your dashboards"),
670
749
  className: "flex flex-col gap-form-gap",
671
750
  children: [
672
- N.length > 0 && /* @__PURE__ */ C("div", {
751
+ M.length > 0 && /* @__PURE__ */ C("div", {
673
752
  role: "region",
674
753
  "aria-label": g("bigconsole.fleet.requests.title", "Link requests"),
675
754
  "data-testid": "fleet-requests",
@@ -680,7 +759,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
680
759
  color: "var(--color-text-primary)",
681
760
  fontSize: "var(--font-size-body-sm)"
682
761
  },
683
- children: [/* @__PURE__ */ S("strong", { children: g("bigconsole.fleet.requests.title", "Link requests") }), N.map((e) => /* @__PURE__ */ C("div", {
762
+ children: [/* @__PURE__ */ S("strong", { children: g("bigconsole.fleet.requests.title", "Link requests") }), M.map((e) => /* @__PURE__ */ C("div", {
684
763
  className: "flex items-center justify-between gap-form-gap",
685
764
  "data-testid": "fleet-request",
686
765
  children: [/* @__PURE__ */ S("span", {
@@ -697,8 +776,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
697
776
  children: [/* @__PURE__ */ S(v, {
698
777
  variant: "ghost",
699
778
  size: "sm",
700
- disabled: I,
701
- onClick: () => $({
779
+ disabled: F,
780
+ onClick: () => Q({
702
781
  id: e.childDashboardId,
703
782
  name: e.childName
704
783
  }, !0),
@@ -707,8 +786,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
707
786
  }), /* @__PURE__ */ S(v, {
708
787
  variant: "ghost",
709
788
  size: "sm",
710
- disabled: I,
711
- onClick: () => $({
789
+ disabled: F,
790
+ onClick: () => Q({
712
791
  id: e.childDashboardId,
713
792
  name: e.childName
714
793
  }, !1),
@@ -719,7 +798,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
719
798
  })]
720
799
  }, e.childDashboardId))]
721
800
  }),
722
- en && /* @__PURE__ */ C("div", {
801
+ pn && /* @__PURE__ */ C("div", {
723
802
  role: "status",
724
803
  "data-testid": "fleet-notice",
725
804
  className: "flex items-center justify-between gap-form-gap rounded-input border p-3",
@@ -731,15 +810,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
731
810
  },
732
811
  children: [/* @__PURE__ */ S("span", {
733
812
  className: "min-w-0",
734
- children: en
813
+ children: pn
735
814
  }), /* @__PURE__ */ S(v, {
736
815
  variant: "ghost",
737
816
  size: "sm",
738
- onClick: () => U(null),
817
+ onClick: () => B(null),
739
818
  children: g("bigconsole.fleet.notice.dismiss", "Dismiss")
740
819
  })]
741
820
  }),
742
- Vt && /* @__PURE__ */ S("p", {
821
+ Xt && /* @__PURE__ */ S("p", {
743
822
  role: "status",
744
823
  "data-testid": "fleet-links-error",
745
824
  style: {
@@ -753,15 +832,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
753
832
  className: "flex flex-wrap items-center gap-2.5",
754
833
  children: [/* @__PURE__ */ C("div", {
755
834
  className: "relative min-w-0 flex-[1_1_320px] sm:max-w-md",
756
- children: [/* @__PURE__ */ S($e, {
835
+ children: [/* @__PURE__ */ S(st, {
757
836
  "aria-hidden": "true",
758
837
  className: "pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2 text-text-muted"
759
- }), /* @__PURE__ */ S(pt, {
838
+ }), /* @__PURE__ */ S(xt, {
760
839
  type: "search",
761
840
  "aria-label": g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
762
- placeholder: A.length > 0 ? g("bigconsole.dashboards.gallery.searchPlaceholder", "Search {{count}} dashboards…", { count: A.length }) : g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
841
+ placeholder: k.length > 0 ? g("bigconsole.dashboards.gallery.searchPlaceholder", "Search {{count}} dashboards…", { count: k.length }) : g("bigconsole.dashboards.search.placeholder", "Search dashboards..."),
763
842
  value: _.searchText,
764
- onChange: (e) => Ct(e.target.value),
843
+ onChange: (e) => jt(e.target.value),
765
844
  style: {
766
845
  height: "var(--size-controlHeight-md)",
767
846
  paddingInlineStart: "var(--size-controlHeight-md)"
@@ -769,29 +848,29 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
769
848
  })]
770
849
  }), /* @__PURE__ */ C("div", {
771
850
  className: "ms-auto flex flex-wrap items-center gap-2.5",
772
- children: [/* @__PURE__ */ S(o, {
773
- label: g(be.label.key, be.label.en),
851
+ children: [/* @__PURE__ */ S(ee, {
852
+ label: g(Oe.label.key, Oe.label.en),
774
853
  value: T,
775
- options: or,
776
- onChange: Et
777
- }), _r]
854
+ options: Cr,
855
+ onChange: Pt
856
+ }), Nr]
778
857
  })]
779
858
  }),
780
859
  /* @__PURE__ */ C("div", {
781
860
  className: "flex items-start gap-2",
782
861
  children: [/* @__PURE__ */ S("div", {
783
862
  className: "min-w-0 flex-1",
784
- children: /* @__PURE__ */ S(lt, {
785
- facets: En,
786
- facetsTotal: Dn,
787
- category: b ? Te(b) : "all",
788
- onCategoryChange: (e) => wt(we(e)),
789
- labelFor: we,
790
- iconFor: () => /* @__PURE__ */ S(et, {
863
+ children: /* @__PURE__ */ S(_t, {
864
+ facets: Rn,
865
+ facetsTotal: zn,
866
+ category: b ? Ne(b) : "all",
867
+ onCategoryChange: (e) => Mt(Me(e)),
868
+ labelFor: Me,
869
+ iconFor: () => /* @__PURE__ */ S(ct, {
791
870
  className: "size-4",
792
871
  "aria-hidden": "true"
793
872
  }),
794
- allIcon: /* @__PURE__ */ S(qe, {
873
+ allIcon: /* @__PURE__ */ S(et, {
795
874
  className: "size-4",
796
875
  "aria-hidden": "true"
797
876
  }),
@@ -801,22 +880,22 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
801
880
  testId: "dashboards-categories",
802
881
  moreTestId: "dashboards-categories-more"
803
882
  })
804
- }), /* @__PURE__ */ C(gt, {
883
+ }), /* @__PURE__ */ C(wt, {
805
884
  "aria-label": g("bigconsole.dashboards.filters.status", "Status"),
806
885
  value: x,
807
- onChange: (e) => Tt(e.target.value),
886
+ onChange: (e) => Nt(e.target.value),
808
887
  className: "max-w-[45%] shrink-0 rounded-lg border border-border-default bg-surface px-3 py-1.5 text-sm text-text-secondary",
809
888
  "data-testid": "dashboards-status-filter",
810
889
  children: [/* @__PURE__ */ S("option", {
811
890
  value: "",
812
891
  children: g("bigconsole.dashboards.filters.allStatuses", "All statuses")
813
- }), ar.map((e) => /* @__PURE__ */ S("option", {
892
+ }), Sr.map((e) => /* @__PURE__ */ S("option", {
814
893
  value: e.value,
815
894
  children: e.label
816
895
  }, e.value))]
817
896
  })]
818
897
  }),
819
- O && A.length === 0 && /* @__PURE__ */ S("div", {
898
+ D && k.length === 0 && /* @__PURE__ */ S("div", {
820
899
  style: {
821
900
  display: "flex",
822
901
  alignItems: "center",
@@ -825,7 +904,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
825
904
  },
826
905
  children: /* @__PURE__ */ C("div", {
827
906
  style: { textAlign: "center" },
828
- children: [/* @__PURE__ */ S(ht, { style: {
907
+ children: [/* @__PURE__ */ S(Ct, { style: {
829
908
  height: "var(--size-icon-xl)",
830
909
  width: "var(--size-icon-xl)",
831
910
  margin: "0 auto var(--space-formGap)"
@@ -838,10 +917,10 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
838
917
  })]
839
918
  })
840
919
  }),
841
- pr && /* @__PURE__ */ C("div", {
920
+ $ && /* @__PURE__ */ C("div", {
842
921
  className: "flex items-baseline justify-between gap-3",
843
922
  children: [/* @__PURE__ */ S("h2", {
844
- ref: jn,
923
+ ref: Un,
845
924
  tabIndex: -1,
846
925
  className: "m-0 text-base font-semibold text-text-primary outline-none",
847
926
  "data-testid": "dashboards-results-heading",
@@ -849,47 +928,59 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
849
928
  }), /* @__PURE__ */ S("span", {
850
929
  className: "text-sm text-text-muted",
851
930
  "data-testid": "dashboards-range",
852
- children: dr.showing(fr.start, fr.end, Y)
931
+ children: Or.showing(kr.start, kr.end, K)
853
932
  })]
854
933
  }),
855
- pr && D === "grid" && /* @__PURE__ */ S("div", {
934
+ $ && Tn && Zt && k.length > 1 && /* @__PURE__ */ S("p", {
935
+ className: "m-0 text-sm text-text-muted",
936
+ "data-testid": "dashboards-drag-tip",
937
+ children: g("bigconsole.fleet.drag.tip", "Tip: drag a board onto another to make it follow that board.")
938
+ }),
939
+ $ && E === "grid" && /* @__PURE__ */ S("div", {
856
940
  "data-testid": "dashboards-grid",
857
941
  style: {
858
942
  display: "grid",
859
943
  gridTemplateColumns: "repeat(auto-fill, minmax(min(280px, 100%), 1fr))",
860
944
  gap: "var(--space-controlGap)"
861
945
  },
862
- children: Tn.map((e) => /* @__PURE__ */ S(ge, {
946
+ children: Ln.map((e) => /* @__PURE__ */ S(we, {
863
947
  dashboard: e,
864
948
  description: e.description || g("bigconsole.dashboards.card.noDescription", "No description provided"),
865
- statusLabel: e.status ? ir(e.status) : void 0,
949
+ statusLabel: e.status ? xr(e.status) : void 0,
866
950
  meta: [
867
- `${lr(e)} ${g("bigconsole.dashboards.card.pages", "pages")}`,
868
- `${cr(e)} ${g("bigconsole.dashboards.card.widgets", "widgets")}`,
869
- rr(e.updatedAt)
951
+ `${Er(e)} ${g("bigconsole.dashboards.card.pages", "pages")}`,
952
+ `${Tr(e)} ${g("bigconsole.dashboards.card.widgets", "widgets")}`,
953
+ br(e.updatedAt)
870
954
  ].join(" · "),
871
- fleetBadge: Hn(e),
955
+ fleetBadge: er(e),
872
956
  openLabel: g("bigconsole.dashboards.card.open", "Open"),
873
957
  moreLabel: g("bigconsole.dashboards.card.moreActions", "More actions for {{name}}", { name: e.name }),
874
- actions: gr(e),
875
- onOpen: zn
958
+ actions: Mr(e),
959
+ onOpen: Zn,
960
+ dnd: Z.dndOf(e)
876
961
  }, e.id))
877
962
  }),
878
- pr && D === "list" && /* @__PURE__ */ S("div", {
963
+ $ && E === "list" && /* @__PURE__ */ S("div", {
879
964
  style: {
880
965
  display: "flex",
881
966
  flexDirection: "column",
882
967
  gap: "var(--space-controlGap)"
883
968
  },
884
- children: Tn.map((e) => /* @__PURE__ */ S(ot, {
885
- ...Pe(e.id),
886
- onClick: () => zn(e.id),
969
+ children: Ln.map((e) => /* @__PURE__ */ S(mt, {
970
+ ...He(e.id),
971
+ ...Z.dndOf(e).drag,
972
+ ...Z.dndOf(e).drop,
973
+ "data-dragging": Z.dndOf(e).dragging ? "true" : void 0,
974
+ "data-drop-target": Z.dndOf(e).target ? "true" : void 0,
975
+ onClick: () => Zn(e.id),
887
976
  style: {
888
977
  cursor: "pointer",
889
- marginLeft: `calc(${Z.get(e.id)?.depth ?? 0} * var(--space-sectionGap))`
978
+ marginLeft: `calc(${J.get(e.id)?.depth ?? 0} * var(--space-sectionGap))`,
979
+ opacity: Z.draggingId === e.id ? .6 : void 0,
980
+ outline: Z.overId === e.id ? "2px solid var(--color-action-primary-bg)" : void 0
890
981
  },
891
982
  className: "motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
892
- children: /* @__PURE__ */ S(st, {
983
+ children: /* @__PURE__ */ S(ht, {
893
984
  style: { padding: "var(--space-cardPadding)" },
894
985
  children: /* @__PURE__ */ C("div", {
895
986
  style: {
@@ -899,10 +990,10 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
899
990
  flexWrap: "wrap"
900
991
  },
901
992
  children: [
902
- J && (Z.get(e.id)?.childCount ?? 0) > 0 ? /* @__PURE__ */ S("button", {
993
+ G && (J.get(e.id)?.childCount ?? 0) > 0 ? /* @__PURE__ */ S("button", {
903
994
  type: "button",
904
- "aria-expanded": !Z.get(e.id)?.collapsed,
905
- "aria-label": Z.get(e.id)?.collapsed ? g("bigconsole.fleet.list.expand", "Show copies of {{name}}", { name: e.name }) : g("bigconsole.fleet.list.collapse", "Hide copies of {{name}}", { name: e.name }),
995
+ "aria-expanded": !J.get(e.id)?.collapsed,
996
+ "aria-label": J.get(e.id)?.collapsed ? g("bigconsole.fleet.list.expand", "Show copies of {{name}}", { name: e.name }) : g("bigconsole.fleet.list.collapse", "Hide copies of {{name}}", { name: e.name }),
906
997
  "data-testid": "fleet-toggle-copies",
907
998
  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)]",
908
999
  style: {
@@ -911,12 +1002,12 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
911
1002
  color: "var(--color-text-secondary)"
912
1003
  },
913
1004
  onClick: (t) => {
914
- t.stopPropagation(), nn(e.id);
1005
+ t.stopPropagation(), hn(e.id);
915
1006
  },
916
- children: Z.get(e.id)?.collapsed ? /* @__PURE__ */ S(He, { style: {
1007
+ children: J.get(e.id)?.collapsed ? /* @__PURE__ */ S(Ye, { style: {
917
1008
  height: "var(--size-icon-sm)",
918
1009
  width: "var(--size-icon-sm)"
919
- } }) : /* @__PURE__ */ S(Ve, { style: {
1010
+ } }) : /* @__PURE__ */ S(Je, { style: {
920
1011
  height: "var(--size-icon-sm)",
921
1012
  width: "var(--size-icon-sm)"
922
1013
  } })
@@ -932,7 +1023,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
932
1023
  borderRadius: "var(--radius-button)",
933
1024
  backgroundColor: "var(--color-bg-accentSubtle)"
934
1025
  },
935
- children: /* @__PURE__ */ S(Ke, {
1026
+ children: /* @__PURE__ */ S($e, {
936
1027
  "aria-hidden": "true",
937
1028
  style: {
938
1029
  height: "var(--size-icon-md)",
@@ -967,14 +1058,15 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
967
1058
  },
968
1059
  children: /* @__PURE__ */ S("button", {
969
1060
  type: "button",
1061
+ "data-drag-through": "",
970
1062
  className: "max-w-full truncate text-left hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
971
1063
  onClick: (t) => {
972
- t.stopPropagation(), zn(e.id);
1064
+ t.stopPropagation(), Zn(e.id);
973
1065
  },
974
1066
  children: e.name
975
1067
  })
976
1068
  }),
977
- e.category && /* @__PURE__ */ S(at, {
1069
+ e.category && /* @__PURE__ */ S(pt, {
978
1070
  variant: "secondary",
979
1071
  style: {
980
1072
  fontSize: "10px",
@@ -983,11 +1075,11 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
983
1075
  },
984
1076
  children: e.category
985
1077
  }),
986
- e.status && /* @__PURE__ */ S(me, {
1078
+ e.status && /* @__PURE__ */ S(Se, {
987
1079
  status: e.status,
988
- label: ir(e.status)
1080
+ label: xr(e.status)
989
1081
  }),
990
- /* @__PURE__ */ S(oe, { ...Hn(e) })
1082
+ /* @__PURE__ */ S(ue, { ...er(e) })
991
1083
  ]
992
1084
  }), /* @__PURE__ */ S("p", {
993
1085
  style: {
@@ -1017,7 +1109,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1017
1109
  gap: "var(--space-iconGap)"
1018
1110
  },
1019
1111
  children: [
1020
- /* @__PURE__ */ S(Ge, { style: {
1112
+ /* @__PURE__ */ S(Qe, { style: {
1021
1113
  height: "var(--size-icon-sm)",
1022
1114
  width: "var(--size-icon-sm)",
1023
1115
  color: "var(--color-action-primary-bg)"
@@ -1028,7 +1120,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1028
1120
  fontWeight: "var(--font-weight-semibold)",
1029
1121
  color: "var(--color-text-primary)"
1030
1122
  },
1031
- children: lr(e)
1123
+ children: Er(e)
1032
1124
  }),
1033
1125
  /* @__PURE__ */ S("span", {
1034
1126
  style: {
@@ -1046,7 +1138,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1046
1138
  gap: "var(--space-iconGap)"
1047
1139
  },
1048
1140
  children: [
1049
- /* @__PURE__ */ S(We, { style: {
1141
+ /* @__PURE__ */ S(Ze, { style: {
1050
1142
  height: "var(--size-icon-sm)",
1051
1143
  width: "var(--size-icon-sm)",
1052
1144
  color: "var(--color-action-primary-bg)"
@@ -1057,7 +1149,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1057
1149
  fontWeight: "var(--font-weight-semibold)",
1058
1150
  color: "var(--color-text-primary)"
1059
1151
  },
1060
- children: cr(e)
1152
+ children: Tr(e)
1061
1153
  }),
1062
1154
  /* @__PURE__ */ S("span", {
1063
1155
  style: {
@@ -1074,7 +1166,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1074
1166
  alignItems: "center",
1075
1167
  gap: "var(--space-iconGap)"
1076
1168
  },
1077
- children: [/* @__PURE__ */ S(ze, { style: {
1169
+ children: [/* @__PURE__ */ S(Ke, { style: {
1078
1170
  height: "var(--size-icon-sm)",
1079
1171
  width: "var(--size-icon-sm)",
1080
1172
  color: "var(--color-text-muted)"
@@ -1084,7 +1176,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1084
1176
  fontWeight: "var(--font-weight-medium)",
1085
1177
  color: "var(--color-text-muted)"
1086
1178
  },
1087
- children: rr(e.updatedAt)
1179
+ children: br(e.updatedAt)
1088
1180
  })]
1089
1181
  })
1090
1182
  ]
@@ -1096,15 +1188,17 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1096
1188
  gap: "var(--space-controlGap)"
1097
1189
  },
1098
1190
  children: [
1099
- /* @__PURE__ */ S(se, {
1100
- linked: Q(e).active || Q(e).pending,
1101
- onLink: (t) => Un(e, t),
1102
- onDetach: (t) => Yn(e, t),
1103
- ready: Ht,
1104
- disabled: I,
1105
- awaitingAnswer: cn.has(e.id),
1106
- onAccept: (t) => $(e, !0, t),
1107
- onDecline: (t) => $(e, !1, t)
1191
+ /* @__PURE__ */ S(de, {
1192
+ linked: Y(e).active || Y(e).pending,
1193
+ onLink: (t) => tr(e, t),
1194
+ onDetach: (t) => fr(e, t),
1195
+ isMaster: e.isMaster === !0,
1196
+ onSetMaster: (t) => cr(e, t),
1197
+ ready: Zt,
1198
+ disabled: F,
1199
+ awaitingAnswer: bn.has(e.id),
1200
+ onAccept: (t) => Q(e, !0, t),
1201
+ onDecline: (t) => Q(e, !1, t)
1108
1202
  }),
1109
1203
  /* @__PURE__ */ S(h, {
1110
1204
  permission: r.DASHBOARD_UPDATE,
@@ -1112,7 +1206,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1112
1206
  children: /* @__PURE__ */ S(v, {
1113
1207
  variant: "ghost",
1114
1208
  size: "sm",
1115
- onClick: (t) => Bn(e.id, t),
1209
+ onClick: (t) => Qn(e.id, t),
1116
1210
  style: {
1117
1211
  height: "var(--size-controlHeight-md)",
1118
1212
  width: "var(--size-controlHeight-md)",
@@ -1120,7 +1214,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1120
1214
  borderRadius: "var(--radius-button)"
1121
1215
  },
1122
1216
  title: g("bigconsole.dashboards.actions.editTitle", "Edit Dashboard"),
1123
- children: /* @__PURE__ */ S(Ze, { style: {
1217
+ children: /* @__PURE__ */ S(at, { style: {
1124
1218
  height: "var(--size-icon-sm)",
1125
1219
  width: "var(--size-icon-sm)"
1126
1220
  } })
@@ -1132,7 +1226,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1132
1226
  children: /* @__PURE__ */ S(v, {
1133
1227
  variant: "ghost",
1134
1228
  size: "sm",
1135
- onClick: (t) => Xn(e.id, e.name, t),
1229
+ onClick: (t) => pr(e.id, e.name, t),
1136
1230
  style: {
1137
1231
  height: "var(--size-controlHeight-md)",
1138
1232
  width: "var(--size-controlHeight-md)",
@@ -1140,7 +1234,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1140
1234
  borderRadius: "var(--radius-button)"
1141
1235
  },
1142
1236
  title: g("bigconsole.dashboards.actions.cloneTitle", "Clone Dashboard"),
1143
- children: /* @__PURE__ */ S(Ue, { style: {
1237
+ children: /* @__PURE__ */ S(Xe, { style: {
1144
1238
  height: "var(--size-icon-sm)",
1145
1239
  width: "var(--size-icon-sm)"
1146
1240
  } })
@@ -1152,7 +1246,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1152
1246
  children: /* @__PURE__ */ S(v, {
1153
1247
  variant: "ghost",
1154
1248
  size: "sm",
1155
- onClick: (t) => Vn(e.id, t),
1249
+ onClick: (t) => $n(e.id, t),
1156
1250
  style: {
1157
1251
  height: "var(--size-controlHeight-md)",
1158
1252
  width: "var(--size-controlHeight-md)",
@@ -1161,7 +1255,7 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1161
1255
  },
1162
1256
  className: "hover:text-status-error-text hover:bg-status-error-bg/10",
1163
1257
  title: g("bigconsole.dashboards.actions.deleteTitle", "Delete Dashboard"),
1164
- children: /* @__PURE__ */ S(tt, { style: {
1258
+ children: /* @__PURE__ */ S(lt, { style: {
1165
1259
  height: "var(--size-icon-sm)",
1166
1260
  width: "var(--size-icon-sm)"
1167
1261
  } })
@@ -1174,19 +1268,19 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1174
1268
  })
1175
1269
  }, e.id))
1176
1270
  }),
1177
- pr && Sn > 1 && /* @__PURE__ */ S(ut, {
1178
- page: X,
1179
- totalPages: Sn,
1180
- total: Y,
1271
+ $ && Pn > 1 && /* @__PURE__ */ S(vt, {
1272
+ page: q,
1273
+ totalPages: Pn,
1274
+ total: K,
1181
1275
  pageSize: w,
1182
- onPage: Pn,
1183
- labels: dr,
1276
+ onPage: Kn,
1277
+ labels: Or,
1184
1278
  className: "mt-0"
1185
1279
  }),
1186
- mr && /* @__PURE__ */ S(dt, {
1280
+ Ar && /* @__PURE__ */ S(yt, {
1187
1281
  treatment: "insight",
1188
1282
  className: "border-[var(--color-border-seam)]",
1189
- children: /* @__PURE__ */ S(ft, {
1283
+ children: /* @__PURE__ */ S(bt, {
1190
1284
  illustration: "empty-search",
1191
1285
  kind: y.trim() ? "no-results" : "filtered",
1192
1286
  size: "page",
@@ -1194,16 +1288,16 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1194
1288
  description: y.trim() ? g("bigconsole.dashboards.empty.filteredDescription", "Try adjusting your search terms") : g("bigconsole.dashboards.empty.filtersDescription", "No dashboards have the category and status you picked."),
1195
1289
  action: /* @__PURE__ */ S(v, {
1196
1290
  variant: "outline",
1197
- onClick: Zn,
1291
+ onClick: mr,
1198
1292
  "data-testid": "dashboards-clear-filters",
1199
1293
  children: g("bigconsole.dashboards.filters.clear", "Clear filters")
1200
1294
  })
1201
1295
  })
1202
1296
  }),
1203
- hr && /* @__PURE__ */ S(dt, {
1297
+ jr && /* @__PURE__ */ S(yt, {
1204
1298
  treatment: "insight",
1205
1299
  className: "border-[var(--color-border-seam)]",
1206
- children: /* @__PURE__ */ S(ft, {
1300
+ children: /* @__PURE__ */ S(bt, {
1207
1301
  illustration: "empty-data",
1208
1302
  kind: "first-use",
1209
1303
  glassIllustration: "charts",
@@ -1221,8 +1315,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1221
1315
  permission: r.DASHBOARD_CREATE,
1222
1316
  deniedBehavior: "hide",
1223
1317
  children: /* @__PURE__ */ C(v, {
1224
- onClick: Fn,
1225
- children: [/* @__PURE__ */ S(Qe, { style: {
1318
+ onClick: qn,
1319
+ children: [/* @__PURE__ */ S(ot, { style: {
1226
1320
  marginRight: "var(--space-iconGap)",
1227
1321
  height: "var(--size-icon-sm)",
1228
1322
  width: "var(--size-icon-sm)"
@@ -1233,8 +1327,8 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1233
1327
  deniedBehavior: "hide",
1234
1328
  children: /* @__PURE__ */ C(v, {
1235
1329
  variant: "outline",
1236
- onClick: Qn,
1237
- children: [/* @__PURE__ */ S(rt, { style: {
1330
+ onClick: hr,
1331
+ children: [/* @__PURE__ */ S(dt, { style: {
1238
1332
  marginRight: "var(--space-iconGap)",
1239
1333
  height: "var(--size-icon-sm)",
1240
1334
  width: "var(--size-icon-sm)"
@@ -1247,32 +1341,32 @@ var bt = "bf-bigconsole-dashboards-view", xt = "bf-bigconsole-dashboards-nested"
1247
1341
  ]
1248
1342
  })] })
1249
1343
  }),
1250
- /* @__PURE__ */ S(pe, {
1251
- isOpen: Ot,
1252
- isCreating: kt,
1253
- onClose: Ln,
1254
- onCreate: Rn,
1255
- onTemplateInstalled: In
1344
+ /* @__PURE__ */ S(xe, {
1345
+ isOpen: It,
1346
+ isCreating: Rt,
1347
+ onClose: Yn,
1348
+ onCreate: Xn,
1349
+ onTemplateInstalled: Jn
1256
1350
  }),
1257
- /* @__PURE__ */ S(ce, {
1258
- onQueryChange: Gn,
1259
- isOpen: R !== null,
1260
- board: R,
1261
- candidates: qn,
1262
- busy: I,
1263
- error: Zt,
1264
- onClose: () => z(null),
1265
- onLink: Jn
1351
+ /* @__PURE__ */ S(fe, {
1352
+ onQueryChange: rr,
1353
+ isOpen: L !== null,
1354
+ board: L,
1355
+ candidates: ar,
1356
+ busy: F,
1357
+ error: ln,
1358
+ onClose: () => cn(null),
1359
+ onLink: sr
1266
1360
  }),
1267
- /* @__PURE__ */ S(_e, {
1268
- isOpen: jt,
1269
- onClose: $n,
1270
- onSuccess: nr
1361
+ /* @__PURE__ */ S(Te, {
1362
+ isOpen: Bt,
1363
+ onClose: gr,
1364
+ onSuccess: yr
1271
1365
  }),
1272
- /* @__PURE__ */ S(ve, {
1273
- isOpen: Nt,
1274
- onClose: tr,
1275
- onSuccess: nr
1366
+ /* @__PURE__ */ S(Ee, {
1367
+ isOpen: Ht,
1368
+ onClose: vr,
1369
+ onSuccess: yr
1276
1370
  })
1277
1371
  ]
1278
1372
  });