@burdenoff/microfe-bigconsole 2026.1124.8 → 2026.1124.9

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