@burdenoff/microfe-bigconsole 2026.1102.1 → 2026.1103.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,76 +2,77 @@ import { SECTION_FOCUS_RING as e } from "../common/sectionStyles.js";
2
2
  import "../common/index.js";
3
3
  import { DataSinkStatusBadge as t } from "./DataSinkStatusBadge.js";
4
4
  import { formatByteSize as n } from "../../utils/format.js";
5
- import { memo as r, useCallback as i } from "react";
6
- import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { formatDistanceToNow as c } from "date-fns";
5
+ import { describeSetupGaps as r, getSetupGaps as i } from "../../utils/dataSinkSetup.js";
6
+ import { memo as a, useCallback as o } from "react";
7
+ import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
9
+ import { formatDistanceToNow as u } from "date-fns";
9
10
  //#region src/bigconsole/components/datasink/DataSinkCard.tsx
10
- var l = `inline-flex min-h-[var(--size-controlHeight-md)] items-center justify-center rounded-button px-3 py-1.5 text-xs font-medium motion-safe:transition-colors ${e}`, u = r(function({ dataSink: e, setupState: r, onView: u, onEdit: d, onRefresh: f, onExport: p, onDelete: m, onContinueSetup: h, canEdit: g = !0, canRefresh: _ = !0, canDelete: v = !0 }) {
11
- let y = i((t) => {
12
- t.stopPropagation(), u?.(e.id);
13
- }, [e.id, u]), b = i((t) => {
14
- t.stopPropagation(), d?.(e.id);
15
- }, [e.id, d]), x = i((t) => {
11
+ var d = `inline-flex min-h-[var(--size-controlHeight-md)] items-center justify-center rounded-button px-3 py-1.5 text-xs font-medium motion-safe:transition-colors ${e}`, f = a(function({ dataSink: e, setupState: a, onView: f, onEdit: p, onRefresh: m, onExport: h, onDelete: g, onContinueSetup: _, canEdit: v = !0, canRefresh: y = !0, canDelete: b = !0 }) {
12
+ let x = o((t) => {
16
13
  t.stopPropagation(), f?.(e.id);
17
- }, [e.id, f]), S = i((t) => {
14
+ }, [e.id, f]), S = o((t) => {
18
15
  t.stopPropagation(), p?.(e.id);
19
- }, [e.id, p]), C = i((t) => {
16
+ }, [e.id, p]), C = o((t) => {
20
17
  t.stopPropagation(), m?.(e.id);
21
- }, [e.id, m]), w = i((t) => {
18
+ }, [e.id, m]), w = o((t) => {
22
19
  t.stopPropagation(), h?.(e.id);
23
- }, [e.id, h]), { t: T } = a(), E = (r ?? e.setupState) === "completed", D = e.lastRefreshedAt ? c(new Date(e.lastRefreshedAt), { addSuffix: !0 }) : T("bigconsole.dataSinks.view.never", "Never");
24
- return /* @__PURE__ */ s("article", {
20
+ }, [e.id, h]), T = o((t) => {
21
+ t.stopPropagation(), g?.(e.id);
22
+ }, [e.id, g]), E = o((t) => {
23
+ t.stopPropagation(), _?.(e.id);
24
+ }, [e.id, _]), { t: D } = s(), O = (a ?? e.setupState) === "completed", k = r(i(e), D), A = e.lastRefreshedAt ? u(new Date(e.lastRefreshedAt), { addSuffix: !0 }) : D("bigconsole.dataSinks.view.never", "Never");
25
+ return /* @__PURE__ */ l("article", {
25
26
  className: "\n min-w-0\n cursor-pointer\n rounded-card\n border border-transparent\n bg-bg-sunken\n p-card-padding\n hover:border-[var(--color-action-primary-bg)]\n motion-safe:transition-colors\n ",
26
- onClick: y,
27
+ onClick: x,
27
28
  children: [
28
- /* @__PURE__ */ s("div", {
29
+ /* @__PURE__ */ l("div", {
29
30
  className: "mb-3 flex items-start justify-between gap-icon-gap",
30
- children: [/* @__PURE__ */ s("div", {
31
+ children: [/* @__PURE__ */ l("div", {
31
32
  className: "min-w-0 flex-1",
32
- children: [/* @__PURE__ */ o("h3", {
33
+ children: [/* @__PURE__ */ c("h3", {
33
34
  className: "truncate text-sm font-semibold text-text-primary",
34
35
  children: e.name || "Untitled data sink"
35
- }), /* @__PURE__ */ o("p", {
36
+ }), /* @__PURE__ */ c("p", {
36
37
  className: "mt-0.5 truncate font-mono text-xs text-text-secondary",
37
38
  children: e.key
38
39
  })]
39
- }), /* @__PURE__ */ o(t, {
40
+ }), /* @__PURE__ */ c(t, {
40
41
  status: e.status,
41
42
  size: "sm"
42
43
  })]
43
44
  }),
44
- e.description && /* @__PURE__ */ o("p", {
45
+ e.description && /* @__PURE__ */ c("p", {
45
46
  className: "mb-3 line-clamp-2 text-xs text-text-secondary",
46
47
  children: e.description
47
48
  }),
48
- /* @__PURE__ */ s("div", {
49
+ /* @__PURE__ */ l("div", {
49
50
  className: "mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
50
51
  children: [
51
- /* @__PURE__ */ s("span", {
52
+ /* @__PURE__ */ l("span", {
52
53
  className: "flex items-center gap-1",
53
- children: [/* @__PURE__ */ o("svg", {
54
+ children: [/* @__PURE__ */ c("svg", {
54
55
  className: "w-3.5 h-3.5",
55
56
  fill: "none",
56
57
  stroke: "currentColor",
57
58
  viewBox: "0 0 24 24",
58
- children: /* @__PURE__ */ o("path", {
59
+ children: /* @__PURE__ */ c("path", {
59
60
  strokeLinecap: "round",
60
61
  strokeLinejoin: "round",
61
62
  strokeWidth: 2,
62
63
  d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"
63
64
  })
64
- }), D]
65
+ }), A]
65
66
  }),
66
- /* @__PURE__ */ s("span", {
67
+ /* @__PURE__ */ l("span", {
67
68
  className: "flex items-center gap-1",
68
69
  title: "Stored payload size",
69
- children: [/* @__PURE__ */ o("svg", {
70
+ children: [/* @__PURE__ */ c("svg", {
70
71
  className: "w-3.5 h-3.5",
71
72
  fill: "none",
72
73
  stroke: "currentColor",
73
74
  viewBox: "0 0 24 24",
74
- children: /* @__PURE__ */ o("path", {
75
+ children: /* @__PURE__ */ c("path", {
75
76
  strokeLinecap: "round",
76
77
  strokeLinejoin: "round",
77
78
  strokeWidth: 2,
@@ -79,15 +80,15 @@ var l = `inline-flex min-h-[var(--size-controlHeight-md)] items-center justify-c
79
80
  })
80
81
  }), n(e.sizeBytes)]
81
82
  }),
82
- e.linkedWorkflowCount !== void 0 && e.linkedWorkflowCount > 0 && /* @__PURE__ */ s("span", {
83
+ e.linkedWorkflowCount !== void 0 && e.linkedWorkflowCount > 0 && /* @__PURE__ */ l("span", {
83
84
  className: "flex items-center gap-1",
84
85
  children: [
85
- /* @__PURE__ */ o("svg", {
86
+ /* @__PURE__ */ c("svg", {
86
87
  className: "w-3.5 h-3.5",
87
88
  fill: "none",
88
89
  stroke: "currentColor",
89
90
  viewBox: "0 0 24 24",
90
- children: /* @__PURE__ */ o("path", {
91
+ children: /* @__PURE__ */ c("path", {
91
92
  strokeLinecap: "round",
92
93
  strokeLinejoin: "round",
93
94
  strokeWidth: 2,
@@ -101,50 +102,50 @@ var l = `inline-flex min-h-[var(--size-controlHeight-md)] items-center justify-c
101
102
  })
102
103
  ]
103
104
  }),
104
- !E && /* @__PURE__ */ s("div", {
105
+ !O && /* @__PURE__ */ l("div", {
105
106
  className: "mb-3 flex items-center justify-between gap-icon-gap rounded-input border border-[var(--color-status-warning-border)] bg-[var(--color-status-warning-bgSubtle)] p-2",
106
- children: [/* @__PURE__ */ o("span", {
107
+ children: [/* @__PURE__ */ c("span", {
107
108
  className: "text-xs text-[var(--color-status-warning-text)]",
108
- children: "Setup incomplete"
109
- }), /* @__PURE__ */ o("button", {
109
+ children: k
110
+ }), v && _ && /* @__PURE__ */ c("button", {
110
111
  type: "button",
111
- onClick: w,
112
+ onClick: E,
112
113
  className: "rounded-button px-1 text-xs font-medium text-text-link hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
113
- children: "Continue"
114
+ children: D("bigconsole.dataSinks.setup.continue", "Continue")
114
115
  })]
115
116
  }),
116
- /* @__PURE__ */ s("div", {
117
+ /* @__PURE__ */ l("div", {
117
118
  className: "flex flex-wrap items-center gap-2 border-t border-[var(--color-border-subtle)] pt-2",
118
119
  children: [
119
- /* @__PURE__ */ o("button", {
120
+ /* @__PURE__ */ c("button", {
120
121
  type: "button",
121
- onClick: y,
122
- className: `${l} flex-1 bg-bg-surface text-text-primary hover:bg-bg-elevated`,
123
- children: T("bigconsole.dataSinks.actions.view", "View")
122
+ onClick: x,
123
+ className: `${d} flex-1 bg-bg-surface text-text-primary hover:bg-bg-elevated`,
124
+ children: D("bigconsole.dataSinks.actions.view", "View")
124
125
  }),
125
- g && /* @__PURE__ */ o("button", {
126
+ v && /* @__PURE__ */ c("button", {
126
127
  type: "button",
127
- onClick: b,
128
- className: `${l} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
129
- children: T("bigconsole.dataSinks.actions.edit", "Edit")
128
+ onClick: S,
129
+ className: `${d} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
130
+ children: D("bigconsole.dataSinks.actions.edit", "Edit")
130
131
  }),
131
- _ && /* @__PURE__ */ o("button", {
132
+ y && /* @__PURE__ */ c("button", {
132
133
  type: "button",
133
- onClick: x,
134
- className: `${l} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
135
- children: T("bigconsole.dataSinks.actions.refresh", "Refresh")
134
+ onClick: C,
135
+ className: `${d} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
136
+ children: D("bigconsole.dataSinks.actions.refresh", "Refresh")
136
137
  }),
137
- p && /* @__PURE__ */ o("button", {
138
+ h && /* @__PURE__ */ c("button", {
138
139
  type: "button",
139
- onClick: S,
140
- className: `${l} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
141
- children: T("bigconsole.dataSinks.actions.export", "Export")
140
+ onClick: w,
141
+ className: `${d} text-text-secondary hover:bg-bg-surface hover:text-text-primary`,
142
+ children: D("bigconsole.dataSinks.actions.export", "Export")
142
143
  }),
143
- v && /* @__PURE__ */ o("button", {
144
+ b && /* @__PURE__ */ c("button", {
144
145
  type: "button",
145
- onClick: C,
146
- className: `${l} text-status-error-text hover:bg-[var(--color-status-error-bgSubtle)]`,
147
- children: T("bigconsole.dataSinks.actions.delete", "Delete")
146
+ onClick: T,
147
+ className: `${d} text-status-error-text hover:bg-[var(--color-status-error-bgSubtle)]`,
148
+ children: D("bigconsole.dataSinks.actions.delete", "Delete")
148
149
  })
149
150
  ]
150
151
  })
@@ -152,4 +153,4 @@ var l = `inline-flex min-h-[var(--size-controlHeight-md)] items-center justify-c
152
153
  });
153
154
  });
154
155
  //#endregion
155
- export { u as DataSinkCard, u as default };
156
+ export { f as DataSinkCard, f as default };
@@ -66,10 +66,10 @@ var i = {
66
66
  info: "text-[var(--color-status-info-text)]",
67
67
  neutral: "text-text-secondary"
68
68
  }, a = {
69
- success: "bg-status-success-bg",
70
- warning: "bg-status-warning-bg",
71
- danger: "bg-status-error-bg",
72
- info: "bg-status-info-bg",
69
+ success: "bg-status-success-bg-subtle",
70
+ warning: "bg-status-warning-bg-subtle",
71
+ danger: "bg-status-error-bg-subtle",
72
+ info: "bg-status-info-bg-subtle",
73
73
  neutral: "bg-bg-sunken"
74
74
  };
75
75
  function o(e) {