@burdenoff/microfe-bigconsole 2026.1123.6 → 2026.1124.1

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