@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
@@ -64,7 +64,7 @@ var h = r(function() {
64
64
  }),
65
65
  D && /* @__PURE__ */ p("p", {
66
66
  role: "alert",
67
- className: "text-xs text-status-danger-text",
67
+ className: "text-xs text-status-error-text",
68
68
  "data-testid": "as-of-invalid",
69
69
  children: r("bigconsole.asOf.picker.invalid", "Pick a date and time that is not in the future.")
70
70
  }),
@@ -112,7 +112,7 @@ var h = r(function() {
112
112
  }),
113
113
  j && /* @__PURE__ */ p("p", {
114
114
  role: "alert",
115
- className: "text-xs text-status-danger-text",
115
+ className: "text-xs text-status-error-text",
116
116
  "data-testid": "compare-invalid",
117
117
  children: r("bigconsole.compare.picker.invalid", "Pick a time that is after the first one and not in the future.")
118
118
  }),
@@ -4,97 +4,98 @@ import { CommentComposer as n } from "../widgets/comments/WidgetComments.js";
4
4
  import { parseCommentAnchor as r, parseCommentMentionNames as i, splitTextWithMentions as a } from "../widgets/comments/commentMentions.js";
5
5
  import { memo as o, useCallback as s, useMemo as c, useState as l } from "react";
6
6
  import { Check as u, CornerDownRight as d, LayoutGrid as f, Loader2 as p, MapPin as m, MessageSquare as h, RotateCcw as g, Trash2 as _, X as v } from "lucide-react";
7
- import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
7
+ import { ThemedSelect as y } from "@burdenoff/fe-libs/ui";
8
+ import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
9
10
  // src/bigconsole/components/dashboard/DashboardCommentsDrawer.tsx
10
- function S(e) {
11
+ function C(e) {
11
12
  let t = new Date(e);
12
13
  return Number.isNaN(t.getTime()) ? "" : new Intl.DateTimeFormat(void 0, {
13
14
  dateStyle: "medium",
14
15
  timeStyle: "short"
15
16
  }).format(t);
16
17
  }
17
- var C = ({ comment: e, isReply: t, busy: n, memberNames: o, onResolve: s, onDelete: l, onReply: p, onSelectWidget: h }) => {
18
- let { t: v } = y(), C = !!e.resolvedAt, w = e.content.text ?? e.content.markdown ?? "", T = c(() => r(e.metadata), [e.metadata]), E = c(() => i(e.metadata), [e.metadata]), D = c(() => a(w, E), [w, E]), O = o.get(e.authorId) ?? v("bigconsole.widget.comments.authorLabel", "User {{id}}", { id: e.authorId.slice(0, 6) });
19
- return /* @__PURE__ */ b("div", {
18
+ var w = ({ comment: e, isReply: t, busy: n, memberNames: o, onResolve: s, onDelete: l, onReply: p, onSelectWidget: h }) => {
19
+ let { t: v } = b(), y = !!e.resolvedAt, w = e.content.text ?? e.content.markdown ?? "", T = c(() => r(e.metadata), [e.metadata]), E = c(() => i(e.metadata), [e.metadata]), D = c(() => a(w, E), [w, E]), O = o.get(e.authorId) ?? v("bigconsole.widget.comments.authorLabel", "User {{id}}", { id: e.authorId.slice(0, 6) });
20
+ return /* @__PURE__ */ x("div", {
20
21
  className: t ? "pl-5" : "",
21
22
  "data-testid": t ? "dashboard-comment-reply" : "dashboard-comment-item",
22
- children: /* @__PURE__ */ x("div", {
23
+ children: /* @__PURE__ */ S("div", {
23
24
  className: "rounded-md border border-[var(--color-border-default)] bg-bg-surface p-2.5",
24
25
  children: [
25
- /* @__PURE__ */ x("div", {
26
+ /* @__PURE__ */ S("div", {
26
27
  className: "flex items-center justify-between gap-2",
27
- children: [/* @__PURE__ */ b("span", {
28
+ children: [/* @__PURE__ */ x("span", {
28
29
  className: "truncate text-xs font-medium text-text-primary",
29
30
  children: O
30
- }), /* @__PURE__ */ b("span", {
31
+ }), /* @__PURE__ */ x("span", {
31
32
  className: "shrink-0 text-[10px] text-text-muted tabular-nums",
32
- children: S(e.createdAt)
33
+ children: C(e.createdAt)
33
34
  })]
34
35
  }),
35
- !t && T && T.anchorType !== "dashboard" && /* @__PURE__ */ b("div", {
36
+ !t && T && T.anchorType !== "dashboard" && /* @__PURE__ */ x("div", {
36
37
  className: "mt-1",
37
- children: T.anchorType === "widget" && T.widgetId ? /* @__PURE__ */ x("button", {
38
+ children: T.anchorType === "widget" && T.widgetId ? /* @__PURE__ */ S("button", {
38
39
  type: "button",
39
40
  "data-testid": "dashboard-comment-anchor-badge",
40
41
  onClick: () => h?.(T.widgetId),
41
42
  className: "inline-flex items-center gap-1 rounded-full border border-[var(--color-border-subtle)] bg-bg-sunken px-2 py-0.5 text-[10px] font-medium text-text-secondary hover:text-text-primary",
42
- children: [/* @__PURE__ */ b(f, {
43
+ children: [/* @__PURE__ */ x(f, {
43
44
  className: "h-3 w-3 shrink-0",
44
45
  "aria-hidden": "true"
45
46
  }), T.widgetTitle || T.widgetId.slice(0, 8)]
46
- }) : T.anchorType === "region" && T.regionLabel ? /* @__PURE__ */ x("span", {
47
+ }) : T.anchorType === "region" && T.regionLabel ? /* @__PURE__ */ S("span", {
47
48
  "data-testid": "dashboard-comment-anchor-badge",
48
49
  className: "inline-flex items-center gap-1 rounded-full border border-[var(--color-border-subtle)] bg-bg-sunken px-2 py-0.5 text-[10px] font-medium text-text-secondary",
49
- children: [/* @__PURE__ */ b(m, {
50
+ children: [/* @__PURE__ */ x(m, {
50
51
  className: "h-3 w-3 shrink-0",
51
52
  "aria-hidden": "true"
52
53
  }), T.regionLabel]
53
54
  }) : null
54
55
  }),
55
- /* @__PURE__ */ b("p", {
56
+ /* @__PURE__ */ x("p", {
56
57
  className: "mt-1 whitespace-pre-wrap break-words text-sm text-text-secondary",
57
- children: D.map((e, t) => e.isMention ? /* @__PURE__ */ b("span", {
58
+ children: D.map((e, t) => e.isMention ? /* @__PURE__ */ x("span", {
58
59
  className: "rounded bg-bg-sunken px-1 py-0.5 text-xs font-medium text-action-primary-bg",
59
60
  children: e.text
60
- }, t) : /* @__PURE__ */ b("span", { children: e.text }, t))
61
+ }, t) : /* @__PURE__ */ x("span", { children: e.text }, t))
61
62
  }),
62
- /* @__PURE__ */ x("div", {
63
+ /* @__PURE__ */ S("div", {
63
64
  className: "mt-1.5 flex flex-wrap items-center gap-2",
64
65
  children: [
65
- C && /* @__PURE__ */ x("span", {
66
- className: "inline-flex items-center gap-1 rounded bg-status-success-bg px-1.5 py-0.5 text-[10px] font-medium text-status-success-text",
66
+ y && /* @__PURE__ */ S("span", {
67
+ className: "inline-flex items-center gap-1 rounded border border-[var(--color-status-success-border)] bg-[var(--color-status-success-bgSubtle)] text-[var(--color-status-success-text)] px-1.5 py-0.5 text-[10px] font-medium",
67
68
  children: [
68
- /* @__PURE__ */ b(u, { className: "h-3 w-3" }),
69
+ /* @__PURE__ */ x(u, { className: "h-3 w-3" }),
69
70
  " ",
70
71
  v("bigconsole.widget.comments.resolvedBadge", "Resolved")
71
72
  ]
72
73
  }),
73
- p && /* @__PURE__ */ x("button", {
74
+ p && /* @__PURE__ */ S("button", {
74
75
  type: "button",
75
76
  disabled: n,
76
77
  onClick: () => p(e.id),
77
78
  className: "inline-flex items-center gap-1 text-[11px] text-text-muted hover:text-text-primary disabled:opacity-50",
78
79
  children: [
79
- /* @__PURE__ */ b(d, { className: "h-3 w-3" }),
80
+ /* @__PURE__ */ x(d, { className: "h-3 w-3" }),
80
81
  " ",
81
82
  v("bigconsole.widget.comments.reply", "Reply")
82
83
  ]
83
84
  }),
84
- /* @__PURE__ */ x("button", {
85
+ /* @__PURE__ */ S("button", {
85
86
  type: "button",
86
87
  disabled: n,
87
- onClick: () => s(e.id, !C),
88
+ onClick: () => s(e.id, !y),
88
89
  className: "inline-flex items-center gap-1 text-[11px] text-text-muted hover:text-text-primary disabled:opacity-50",
89
- children: [b(C ? g : u, { className: "h-3 w-3" }), C ? v("bigconsole.widget.comments.reopen", "Reopen") : v("bigconsole.widget.comments.resolve", "Resolve")]
90
+ children: [x(y ? g : u, { className: "h-3 w-3" }), y ? v("bigconsole.widget.comments.reopen", "Reopen") : v("bigconsole.widget.comments.resolve", "Resolve")]
90
91
  }),
91
- /* @__PURE__ */ x("button", {
92
+ /* @__PURE__ */ S("button", {
92
93
  type: "button",
93
94
  disabled: n,
94
95
  onClick: () => l(e.id),
95
96
  className: "inline-flex items-center gap-1 text-[11px] text-status-error-text hover:opacity-80 disabled:opacity-50",
96
97
  children: [
97
- /* @__PURE__ */ b(_, { className: "h-3 w-3" }),
98
+ /* @__PURE__ */ x(_, { className: "h-3 w-3" }),
98
99
  " ",
99
100
  v("bigconsole.widget.comments.delete", "Delete")
100
101
  ]
@@ -104,47 +105,47 @@ var C = ({ comment: e, isReply: t, busy: n, memberNames: o, onResolve: s, onDele
104
105
  ]
105
106
  })
106
107
  });
107
- }, w = o(function({ dashboardId: r, isOpen: i, onClose: a, widgets: o, onSelectWidget: u }) {
108
- let { t: d } = y(), { threads: f, count: m, loading: g, error: _, mutating: S, addComment: w, resolveComment: T, deleteComment: E } = e(r, i), { results: D } = t(i, ""), [O, k] = l("all"), [A, j] = l(null), [M, N] = l("dashboard"), [P, F] = l(""), [I, L] = l(""), R = c(() => D.filter((e) => e.type === "USER").map((e) => ({
108
+ }, T = o(function({ dashboardId: r, isOpen: i, onClose: a, widgets: o, onSelectWidget: u }) {
109
+ let { t: d } = b(), { threads: f, count: m, loading: g, error: _, mutating: C, addComment: T, resolveComment: E, deleteComment: D } = e(r, i), { results: O } = t(i, ""), [k, A] = l("all"), [j, M] = l(null), [N, P] = l("dashboard"), [F, I] = l(""), [L, R] = l(""), z = c(() => O.filter((e) => e.type === "USER").map((e) => ({
109
110
  id: e.id,
110
111
  name: e.name,
111
112
  ...e.email ? { email: e.email } : {}
112
- })), [D]), z = c(() => {
113
+ })), [O]), B = c(() => {
113
114
  let e = /* @__PURE__ */ new Map();
114
- for (let t of R) e.set(t.id, t.name);
115
+ for (let t of z) e.set(t.id, t.name);
115
116
  return e;
116
- }, [R]), B = c(() => O === "all" ? f : f.filter(({ comment: e }) => {
117
+ }, [z]), V = c(() => k === "all" ? f : f.filter(({ comment: e }) => {
117
118
  let t = !!e.resolvedAt;
118
- return O === "resolved" ? t : !t;
119
- }), [O, f]), V = s(() => {
120
- if (M === "widget" && P) {
121
- let e = o.find((e) => e.id === P);
119
+ return k === "resolved" ? t : !t;
120
+ }), [k, f]), H = s(() => {
121
+ if (N === "widget" && F) {
122
+ let e = o.find((e) => e.id === F);
122
123
  return {
123
124
  anchorType: "widget",
124
- widgetId: P,
125
+ widgetId: F,
125
126
  ...e?.title ? { widgetTitle: e.title } : {}
126
127
  };
127
128
  }
128
- return M === "region" && I.trim() ? {
129
+ return N === "region" && L.trim() ? {
129
130
  anchorType: "region",
130
- regionLabel: I.trim()
131
+ regionLabel: L.trim()
131
132
  } : { anchorType: "dashboard" };
132
133
  }, [
133
- I,
134
- M,
135
- P,
134
+ L,
135
+ N,
136
+ F,
136
137
  o
137
- ]), H = s(async (e, t, n, r) => {
138
+ ]), U = s(async (e, t, n, r) => {
138
139
  let i = {
139
- ...r ? { parentCommentId: r } : { anchor: V() },
140
+ ...r ? { parentCommentId: r } : { anchor: H() },
140
141
  ...t.length > 0 ? {
141
142
  mentionUserIds: t,
142
143
  mentionNames: n
143
144
  } : {}
144
- }, a = await w(e, i);
145
- return a && r && j(null), a;
146
- }, [w, V]);
147
- return i ? /* @__PURE__ */ x("aside", {
145
+ }, a = await T(e, i);
146
+ return a && r && M(null), a;
147
+ }, [T, H]);
148
+ return i ? /* @__PURE__ */ S("aside", {
148
149
  role: "dialog",
149
150
  "aria-label": d("bigconsole.dashboard.comments.drawerAriaLabel", "Console comments"),
150
151
  "data-testid": "dashboard-comments-drawer",
@@ -153,156 +154,156 @@ var C = ({ comment: e, isReply: t, busy: n, memberNames: o, onResolve: s, onDele
153
154
  },
154
155
  className: "fixed bottom-0 right-0 top-14 z-40 flex w-full max-w-sm flex-col border-l border-[var(--color-border-default)] bg-bg-surface shadow-xl",
155
156
  children: [
156
- /* @__PURE__ */ x("div", {
157
+ /* @__PURE__ */ S("div", {
157
158
  className: "flex items-center justify-between gap-2 border-b border-[var(--color-border-subtle)] px-4 py-3",
158
- children: [/* @__PURE__ */ x("h2", {
159
+ children: [/* @__PURE__ */ S("h2", {
159
160
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
160
161
  children: [
161
- /* @__PURE__ */ b(h, {
162
+ /* @__PURE__ */ x(h, {
162
163
  className: "h-4 w-4 text-text-secondary",
163
164
  "aria-hidden": "true"
164
165
  }),
165
166
  d("bigconsole.dashboard.comments.title", "Console comments"),
166
- /* @__PURE__ */ b("span", {
167
+ /* @__PURE__ */ x("span", {
167
168
  "data-testid": "dashboard-comments-count",
168
169
  className: "rounded-full bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium text-text-secondary tabular-nums",
169
170
  children: m
170
171
  })
171
172
  ]
172
- }), /* @__PURE__ */ b("button", {
173
+ }), /* @__PURE__ */ x("button", {
173
174
  type: "button",
174
175
  onClick: a,
175
176
  "aria-label": d("bigconsole.dashboard.comments.close", "Close comments"),
176
177
  className: "rounded-md p-1 text-text-muted hover:bg-bg-sunken hover:text-text-primary",
177
- children: /* @__PURE__ */ b(v, { className: "h-4 w-4" })
178
+ children: /* @__PURE__ */ x(v, { className: "h-4 w-4" })
178
179
  })]
179
180
  }),
180
- /* @__PURE__ */ b("div", {
181
+ /* @__PURE__ */ x("div", {
181
182
  className: "flex items-center gap-1 border-b border-[var(--color-border-subtle)] px-4 py-2",
182
183
  children: [
183
184
  "all",
184
185
  "open",
185
186
  "resolved"
186
- ].map((e) => /* @__PURE__ */ b("button", {
187
+ ].map((e) => /* @__PURE__ */ x("button", {
187
188
  type: "button",
188
- onClick: () => k(e),
189
- className: O === e ? "rounded-full bg-action-primary-bg px-2.5 py-0.5 text-xs font-medium text-action-primary-text" : "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary hover:text-text-primary",
189
+ onClick: () => A(e),
190
+ className: k === e ? "rounded-full bg-action-primary-bg px-2.5 py-0.5 text-xs font-medium text-action-primary-text" : "rounded-full bg-bg-sunken px-2.5 py-0.5 text-xs font-medium text-text-secondary hover:text-text-primary",
190
191
  children: e === "all" ? d("bigconsole.dashboard.comments.filterAll", "All") : e === "open" ? d("bigconsole.dashboard.comments.filterOpen", "Open") : d("bigconsole.dashboard.comments.filterResolved", "Resolved")
191
192
  }, e))
192
193
  }),
193
- /* @__PURE__ */ x("div", {
194
+ /* @__PURE__ */ S("div", {
194
195
  className: "flex-1 space-y-3 overflow-auto p-3",
195
196
  children: [
196
- g && f.length === 0 && /* @__PURE__ */ b("div", {
197
+ g && f.length === 0 && /* @__PURE__ */ x("div", {
197
198
  className: "flex items-center justify-center py-8 text-text-muted",
198
- children: /* @__PURE__ */ b(p, { className: "h-5 w-5 animate-spin" })
199
+ children: /* @__PURE__ */ x(p, { className: "h-5 w-5 animate-spin" })
199
200
  }),
200
- _ && !g && /* @__PURE__ */ b("p", {
201
+ _ && !g && /* @__PURE__ */ x("p", {
201
202
  role: "alert",
202
203
  className: "rounded-md border border-[var(--color-status-error-border)] bg-status-error-bg-subtle px-2.5 py-2 text-xs text-status-error-text",
203
204
  children: d("bigconsole.widget.comments.loadError", "Couldn’t load comments.")
204
205
  }),
205
- !g && !_ && B.length === 0 && /* @__PURE__ */ b("p", {
206
+ !g && !_ && V.length === 0 && /* @__PURE__ */ x("p", {
206
207
  className: "py-8 text-center text-sm text-text-muted",
207
208
  children: d("bigconsole.dashboard.comments.empty", "No comments in this view yet. Anchor a note below.")
208
209
  }),
209
- B.map(({ comment: e, replies: t }) => /* @__PURE__ */ x("div", {
210
+ V.map(({ comment: e, replies: t }) => /* @__PURE__ */ S("div", {
210
211
  className: "space-y-2",
211
212
  children: [
212
- /* @__PURE__ */ b(C, {
213
+ /* @__PURE__ */ x(w, {
213
214
  comment: e,
214
- busy: S,
215
- memberNames: z,
216
- onResolve: (e, t) => void T(e, t),
217
- onDelete: (e) => void E(e),
218
- onReply: (e) => j((t) => t === e ? null : e),
215
+ busy: C,
216
+ memberNames: B,
217
+ onResolve: (e, t) => void E(e, t),
218
+ onDelete: (e) => void D(e),
219
+ onReply: (e) => M((t) => t === e ? null : e),
219
220
  onSelectWidget: u
220
221
  }),
221
- t.map((e) => /* @__PURE__ */ b(C, {
222
+ t.map((e) => /* @__PURE__ */ x(w, {
222
223
  comment: e,
223
224
  isReply: !0,
224
- busy: S,
225
- memberNames: z,
226
- onResolve: (e, t) => void T(e, t),
227
- onDelete: (e) => void E(e)
225
+ busy: C,
226
+ memberNames: B,
227
+ onResolve: (e, t) => void E(e, t),
228
+ onDelete: (e) => void D(e)
228
229
  }, e.id)),
229
- A === e.id && /* @__PURE__ */ b("div", {
230
+ j === e.id && /* @__PURE__ */ x("div", {
230
231
  className: "pl-5",
231
- children: /* @__PURE__ */ b(n, {
232
+ children: /* @__PURE__ */ x(n, {
232
233
  placeholder: d("bigconsole.widget.comments.replyPlaceholder", "Write a reply… (type @ to mention)"),
233
- busy: S,
234
+ busy: C,
234
235
  autoFocus: !0,
235
- candidates: R,
236
- onSubmit: (t, n, r) => H(t, n, r, e.id),
237
- onCancel: () => j(null)
236
+ candidates: z,
237
+ onSubmit: (t, n, r) => U(t, n, r, e.id),
238
+ onCancel: () => M(null)
238
239
  })
239
240
  })
240
241
  ]
241
242
  }, e.id))
242
243
  ]
243
244
  }),
244
- /* @__PURE__ */ x("div", {
245
+ /* @__PURE__ */ S("div", {
245
246
  className: "space-y-2 border-t border-[var(--color-border-default)] p-3",
246
- children: [/* @__PURE__ */ x("div", {
247
+ children: [/* @__PURE__ */ S("div", {
247
248
  className: "flex flex-wrap items-center gap-1.5 text-xs",
248
249
  children: [
249
- /* @__PURE__ */ b("span", {
250
+ /* @__PURE__ */ x("span", {
250
251
  className: "text-text-muted",
251
252
  children: d("bigconsole.dashboard.comments.anchorLabel", "Anchor:")
252
253
  }),
253
- /* @__PURE__ */ x("select", {
254
+ /* @__PURE__ */ S(y, {
254
255
  "aria-label": d("bigconsole.dashboard.comments.anchorTypeAria", "Comment anchor target"),
255
256
  "data-testid": "dashboard-comment-anchor-type",
256
- value: M,
257
- onChange: (e) => N(e.target.value),
257
+ value: N,
258
+ onChange: (e) => P(e.target.value),
258
259
  className: "rounded border border-[var(--color-border-default)] bg-bg-surface px-2 py-1 text-xs text-text-primary",
259
260
  children: [
260
- /* @__PURE__ */ b("option", {
261
+ /* @__PURE__ */ x("option", {
261
262
  value: "dashboard",
262
263
  children: d("bigconsole.dashboard.comments.anchorDashboard", "Whole dashboard")
263
264
  }),
264
- o.length > 0 && /* @__PURE__ */ b("option", {
265
+ o.length > 0 && /* @__PURE__ */ x("option", {
265
266
  value: "widget",
266
267
  children: d("bigconsole.dashboard.comments.anchorWidget", "Widget")
267
268
  }),
268
- /* @__PURE__ */ b("option", {
269
+ /* @__PURE__ */ x("option", {
269
270
  value: "region",
270
271
  children: d("bigconsole.dashboard.comments.anchorRegion", "Region")
271
272
  })
272
273
  ]
273
274
  }),
274
- M === "widget" && o.length > 0 && /* @__PURE__ */ x("select", {
275
+ N === "widget" && o.length > 0 && /* @__PURE__ */ S(y, {
275
276
  "aria-label": d("bigconsole.dashboard.comments.anchorWidgetSelectAria", "Select widget"),
276
277
  "data-testid": "dashboard-comment-anchor-widget",
277
- value: P,
278
- onChange: (e) => F(e.target.value),
278
+ value: F,
279
+ onChange: (e) => I(e.target.value),
279
280
  className: "min-w-0 flex-1 rounded border border-[var(--color-border-default)] bg-bg-surface px-2 py-1 text-xs text-text-primary",
280
- children: [/* @__PURE__ */ b("option", {
281
+ children: [/* @__PURE__ */ x("option", {
281
282
  value: "",
282
283
  children: d("bigconsole.dashboard.comments.selectWidgetPlaceholder", "Choose widget…")
283
- }), o.map((e) => /* @__PURE__ */ b("option", {
284
+ }), o.map((e) => /* @__PURE__ */ x("option", {
284
285
  value: e.id,
285
286
  children: e.title
286
287
  }, e.id))]
287
288
  }),
288
- M === "region" && /* @__PURE__ */ b("input", {
289
+ N === "region" && /* @__PURE__ */ x("input", {
289
290
  type: "text",
290
291
  "data-testid": "dashboard-comment-anchor-region",
291
- value: I,
292
- onChange: (e) => L(e.target.value),
292
+ value: L,
293
+ onChange: (e) => R(e.target.value),
293
294
  maxLength: 60,
294
295
  placeholder: d("bigconsole.dashboard.comments.regionPlaceholder", "e.g. Revenue KPI row"),
295
296
  className: "min-w-0 flex-1 rounded border border-[var(--color-border-default)] bg-bg-surface px-2 py-1 text-xs text-text-primary placeholder:text-text-muted"
296
297
  })
297
298
  ]
298
- }), /* @__PURE__ */ b(n, {
299
+ }), /* @__PURE__ */ x(n, {
299
300
  placeholder: d("bigconsole.dashboard.comments.addPlaceholder", "Comment on this console… (@ to mention)"),
300
- busy: S,
301
- candidates: R,
302
- onSubmit: (e, t, n) => H(e, t, n)
301
+ busy: C,
302
+ candidates: z,
303
+ onSubmit: (e, t, n) => U(e, t, n)
303
304
  })]
304
305
  })
305
306
  ]
306
307
  }) : null;
307
308
  });
308
- export { w as DashboardCommentsDrawer, w as default };
309
+ export { T as DashboardCommentsDrawer, T as default };
@@ -0,0 +1,34 @@
1
+ import { FC } from 'react';
2
+ import { LucideIcon } from 'lucide-react';
3
+ import { DashboardListStatus } from '../../hooks/useDashboardOperations';
4
+ import { FleetBadgeProps } from '../fleet/FleetBadge';
5
+ export interface DashboardCardAction {
6
+ id: string;
7
+ label: string;
8
+ icon: LucideIcon;
9
+ onSelect: () => void;
10
+ disabled?: boolean;
11
+ /** Drawn in the error colour, after a separator (Delete). */
12
+ danger?: boolean;
13
+ testId?: string;
14
+ }
15
+ export interface DashboardGalleryCardProps {
16
+ dashboard: {
17
+ id: string;
18
+ name: string;
19
+ description?: string | null;
20
+ category?: string | null;
21
+ status?: DashboardListStatus;
22
+ };
23
+ description: string;
24
+ statusLabel?: string;
25
+ /** "3 pages · 12 widgets · 2h ago", already translated. */
26
+ meta: string;
27
+ fleetBadge: FleetBadgeProps;
28
+ openLabel: string;
29
+ moreLabel: string;
30
+ actions: readonly DashboardCardAction[];
31
+ onOpen: (dashboardId: string) => void;
32
+ }
33
+ export declare const DashboardGalleryCard: FC<DashboardGalleryCardProps>;
34
+ export default DashboardGalleryCard;
@@ -0,0 +1,123 @@
1
+ import { dashboardSuggestAnchorProps as e } from "../../proactive/entities.js";
2
+ import { FleetBadge as t } from "../fleet/FleetBadge.js";
3
+ import { DashboardStatusPill as n } from "./DashboardStatusPill.js";
4
+ import { memo as r } from "react";
5
+ import { Eye as i, LayoutDashboard as a, MoreHorizontal as o } from "lucide-react";
6
+ import { Button as s, DropdownMenu as c, DropdownMenuContent as l, DropdownMenuItem as u, DropdownMenuSeparator as d, DropdownMenuTrigger as f } from "@burdenoff/fe-libs/ui";
7
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
8
+ // src/bigconsole/components/dashboard/DashboardGalleryCard.tsx
9
+ var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description: g, statusLabel: _, meta: v, fleetBadge: y, openLabel: b, moreLabel: x, actions: S, onOpen: C }) {
10
+ let w = () => C(r.id), T = S.filter((e) => !e.danger), E = S.filter((e) => e.danger);
11
+ return /* @__PURE__ */ m("div", {
12
+ ...e(r.id),
13
+ "data-testid": "dashboard-card",
14
+ onClick: w,
15
+ className: "group flex min-h-40 cursor-pointer flex-col gap-2.5 rounded-card border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)] motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]",
16
+ children: [
17
+ /* @__PURE__ */ m("div", {
18
+ className: "flex items-start gap-3",
19
+ children: [
20
+ /* @__PURE__ */ p("span", {
21
+ "aria-hidden": "true",
22
+ className: "flex size-10 shrink-0 items-center justify-center rounded-button bg-[var(--color-bg-accentSubtle)] text-[var(--color-action-primary-bg)]",
23
+ children: /* @__PURE__ */ p(a, { className: "size-5" })
24
+ }),
25
+ /* @__PURE__ */ p("h3", {
26
+ className: "m-0 min-w-0 flex-1 pt-0.5 text-base font-semibold leading-snug text-text-primary",
27
+ children: /* @__PURE__ */ p("button", {
28
+ type: "button",
29
+ className: "line-clamp-2 max-w-full text-start hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
30
+ onClick: (e) => {
31
+ e.stopPropagation(), w();
32
+ },
33
+ children: r.name
34
+ })
35
+ }),
36
+ S.length > 0 && /* @__PURE__ */ p("div", {
37
+ onClick: h,
38
+ className: "-me-1.5 -mt-1 shrink-0",
39
+ children: /* @__PURE__ */ m(c, {
40
+ modal: !1,
41
+ children: [/* @__PURE__ */ p(f, {
42
+ asChild: !0,
43
+ children: /* @__PURE__ */ p(s, {
44
+ variant: "ghost",
45
+ size: "sm",
46
+ "aria-label": x,
47
+ title: x,
48
+ "data-testid": "dashboard-card-menu",
49
+ className: "size-8 p-0 text-text-secondary",
50
+ children: /* @__PURE__ */ p(o, {
51
+ className: "size-4",
52
+ "aria-hidden": "true"
53
+ })
54
+ })
55
+ }), /* @__PURE__ */ m(l, {
56
+ align: "end",
57
+ className: "min-w-52",
58
+ children: [
59
+ T.map((e) => /* @__PURE__ */ m(u, {
60
+ disabled: e.disabled,
61
+ onSelect: e.onSelect,
62
+ "data-testid": e.testId,
63
+ children: [/* @__PURE__ */ p(e.icon, {
64
+ className: "size-4",
65
+ "aria-hidden": "true"
66
+ }), e.label]
67
+ }, e.id)),
68
+ E.length > 0 && T.length > 0 && /* @__PURE__ */ p(d, {}),
69
+ E.map((e) => /* @__PURE__ */ m(u, {
70
+ disabled: e.disabled,
71
+ onSelect: e.onSelect,
72
+ "data-testid": e.testId,
73
+ className: "text-status-error-text focus:text-status-error-text",
74
+ children: [/* @__PURE__ */ p(e.icon, {
75
+ className: "size-4",
76
+ "aria-hidden": "true"
77
+ }), e.label]
78
+ }, e.id))
79
+ ]
80
+ })]
81
+ })
82
+ })
83
+ ]
84
+ }),
85
+ /* @__PURE__ */ p("p", {
86
+ className: "m-0 line-clamp-2 text-sm leading-normal text-text-secondary",
87
+ children: g
88
+ }),
89
+ /* @__PURE__ */ p("p", {
90
+ className: "m-0 text-xs text-text-muted",
91
+ "data-testid": "dashboard-card-meta",
92
+ children: v
93
+ }),
94
+ /* @__PURE__ */ m("div", {
95
+ className: "mt-auto flex flex-wrap items-center gap-1.5",
96
+ children: [
97
+ r.category && /* @__PURE__ */ p("span", {
98
+ className: "inline-flex max-w-full items-center truncate rounded-pill border border-[var(--color-border-default)] px-2 py-0.5 text-xs font-medium text-text-primary",
99
+ children: r.category
100
+ }),
101
+ r.status && _ && /* @__PURE__ */ p(n, {
102
+ status: r.status,
103
+ label: _
104
+ }),
105
+ /* @__PURE__ */ p(t, { ...y }),
106
+ /* @__PURE__ */ m(s, {
107
+ variant: "outline",
108
+ size: "sm",
109
+ className: "ms-auto",
110
+ onClick: (e) => {
111
+ e.stopPropagation(), w();
112
+ },
113
+ children: [/* @__PURE__ */ p(i, {
114
+ className: "size-4",
115
+ "aria-hidden": "true"
116
+ }), b]
117
+ })
118
+ ]
119
+ })
120
+ ]
121
+ });
122
+ });
123
+ export { g as DashboardGalleryCard, g as default };
@@ -102,7 +102,7 @@ var A = d(function({ open: r, onClose: c, dashboardId: l, pages: d, canFix: O })
102
102
  className: "min-h-0 flex-1 overflow-y-auto py-4",
103
103
  children: I ? /* @__PURE__ */ T("p", {
104
104
  role: "alert",
105
- style: { color: "var(--color-status-danger-text, var(--color-text-primary))" },
105
+ style: { color: "var(--color-status-error-text)" },
106
106
  children: A("bigconsole.dashboards.review.loadFailed", "Could not read your widgets: {{message}}", { message: I })
107
107
  }) : z ? /* @__PURE__ */ T(u, {
108
108
  spec: z.board,