@burdenoff/microfe-bigconsole 2026.1123.4 → 2026.1123.6

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.
@@ -1,9 +1,9 @@
1
1
  import { useTr as e } from "../../../shared/hooks/useTr.js";
2
- import { countPushStates as t, pushTone as n } from "../../utils/fleetPush.js";
3
- import { memo as r } from "react";
4
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { appliedLabel as t, countPushStates as n, pushTone as r } from "../../utils/fleetPush.js";
3
+ import { memo as i } from "react";
4
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
5
5
  // src/bigconsole/components/fleet/FleetPushResultTable.tsx
6
- var s = {
6
+ var c = {
7
7
  success: {
8
8
  backgroundColor: "var(--color-status-success-bgSubtle)",
9
9
  color: "var(--color-status-success-text)"
@@ -17,7 +17,7 @@ var s = {
17
17
  color: "var(--color-status-error-text)"
18
18
  },
19
19
  muted: { color: "var(--color-text-secondary)" }
20
- }, c = {
20
+ }, l = {
21
21
  display: "inline-flex",
22
22
  alignItems: "center",
23
23
  padding: "2px 8px",
@@ -28,38 +28,46 @@ var s = {
28
28
  textTransform: "uppercase",
29
29
  letterSpacing: "0.02em",
30
30
  whiteSpace: "nowrap"
31
- }, l = r(function({ result: r }) {
32
- let l = e(), u = t(r.copies), d = (e) => {
33
- switch (e) {
34
- case "APPLIED": return l("bigconsole.fleet.push.state.applied", "Up to date");
35
- case "BLOCKED": return l("bigconsole.fleet.push.state.blocked", "Not reached");
36
- case "INCOMPATIBLE": return l("bigconsole.fleet.push.state.incompatible", "Cannot take it");
37
- default: return l("bigconsole.fleet.push.state.notSelected", "Not selected");
31
+ }, u = i(function({ result: i }) {
32
+ let u = e(), d = n(i.copies), f = (e) => {
33
+ switch (e.state) {
34
+ case "APPLIED": {
35
+ let n = t(e, i.preview);
36
+ return n === "willReceive" ? u("bigconsole.fleet.push.state.willReceive", "Will receive it") : n === "received" ? u("bigconsole.fleet.push.state.received", "Received it") : u("bigconsole.fleet.push.state.applied", "Up to date");
37
+ }
38
+ case "BLOCKED": return u("bigconsole.fleet.push.state.blocked", "Not reached");
39
+ case "INCOMPATIBLE": return u("bigconsole.fleet.push.state.incompatible", "Cannot take it");
40
+ default: return u("bigconsole.fleet.push.state.notSelected", "Not selected");
38
41
  }
39
42
  };
40
- return /* @__PURE__ */ o("div", {
43
+ return /* @__PURE__ */ s("div", {
41
44
  "data-testid": "fleet-push-result",
42
45
  className: "flex flex-col gap-form-gap",
43
- children: [/* @__PURE__ */ o("p", {
46
+ children: [/* @__PURE__ */ s("p", {
44
47
  style: {
45
48
  margin: 0,
46
49
  color: "var(--color-text-primary)",
47
50
  fontSize: "var(--font-size-body-sm)"
48
51
  },
49
- children: [l("bigconsole.fleet.push.totals", "{{added}} widgets added, {{updated}} updated, {{flags}} flagged for owners across {{copies}} copies.", {
50
- added: r.widgetsAdded,
51
- updated: r.widgetsUpdated,
52
- flags: r.flagsRaised,
53
- copies: r.appliedCount
54
- }), (u.blocked > 0 || u.incompatible > 0) && /* @__PURE__ */ o(i, { children: [" ", l("bigconsole.fleet.push.skipped", "{{count}} copies did not take it.", { count: u.blocked + u.incompatible })] })]
55
- }), /* @__PURE__ */ a("ul", {
52
+ children: [i.preview ? u("bigconsole.fleet.push.totalsPreview", "Would add {{added}} widgets, update {{updated}} and flag {{flags}} for owners across {{copies}} copies.", {
53
+ added: i.widgetsAdded,
54
+ updated: i.widgetsUpdated,
55
+ flags: i.flagsRaised,
56
+ copies: i.appliedCount
57
+ }) : u("bigconsole.fleet.push.totals", "{{added}} widgets added, {{updated}} updated, {{flags}} flagged for owners across {{copies}} copies.", {
58
+ added: i.widgetsAdded,
59
+ updated: i.widgetsUpdated,
60
+ flags: i.flagsRaised,
61
+ copies: i.appliedCount
62
+ }), (d.blocked > 0 || d.incompatible > 0) && /* @__PURE__ */ s(a, { children: [" ", u("bigconsole.fleet.push.skipped", "{{count}} copies did not take it.", { count: d.blocked + d.incompatible })] })]
63
+ }), /* @__PURE__ */ o("ul", {
56
64
  className: "flex flex-col gap-1",
57
65
  style: {
58
66
  listStyle: "none",
59
67
  margin: 0,
60
68
  padding: 0
61
69
  },
62
- children: r.copies.map((e) => /* @__PURE__ */ o("li", {
70
+ children: i.copies.map((e) => /* @__PURE__ */ s("li", {
63
71
  "data-testid": "fleet-push-copy",
64
72
  className: "flex flex-col gap-1 rounded-input border px-3 py-2",
65
73
  style: {
@@ -67,48 +75,52 @@ var s = {
67
75
  marginLeft: `calc(${Math.max(e.level - 1, 0)} * var(--space-controlGap))`
68
76
  },
69
77
  children: [
70
- /* @__PURE__ */ o("div", {
78
+ /* @__PURE__ */ s("div", {
71
79
  className: "flex items-center justify-between gap-form-gap",
72
- children: [/* @__PURE__ */ a("span", {
80
+ children: [/* @__PURE__ */ o("span", {
73
81
  className: "min-w-0 truncate",
74
82
  style: { color: "var(--color-text-primary)" },
75
- children: e.name ?? l("bigconsole.fleet.push.unreadable", "A board you cannot open")
76
- }), /* @__PURE__ */ a("span", {
83
+ children: e.name ?? u("bigconsole.fleet.push.unreadable", "A board you cannot open")
84
+ }), /* @__PURE__ */ o("span", {
77
85
  style: {
78
- ...c,
79
- ...s[n(e.state)]
86
+ ...l,
87
+ ...c[r(e.state)]
80
88
  },
81
- children: d(e.state)
89
+ children: f(e)
82
90
  })]
83
91
  }),
84
- e.state === "APPLIED" && /* @__PURE__ */ a("span", {
92
+ e.state === "APPLIED" && /* @__PURE__ */ o("span", {
85
93
  style: {
86
94
  color: "var(--color-text-secondary)",
87
95
  fontSize: "var(--font-size-body-sm)"
88
96
  },
89
- children: l("bigconsole.fleet.push.copyDetail", "{{added}} widgets added, {{updated}} updated, {{flags}} flagged.", {
97
+ children: i.preview ? u("bigconsole.fleet.push.copyDetailPreview", "Would add {{added}} widgets, update {{updated}} and flag {{flags}}.", {
98
+ added: e.widgetCount,
99
+ updated: e.widgetsUpdated,
100
+ flags: e.flagsRaised
101
+ }) : u("bigconsole.fleet.push.copyDetail", "{{added}} widgets added, {{updated}} updated, {{flags}} flagged.", {
90
102
  added: e.widgetCount,
91
103
  updated: e.widgetsUpdated,
92
104
  flags: e.flagsRaised
93
105
  })
94
106
  }),
95
- e.state === "INCOMPATIBLE" && e.reason && /* @__PURE__ */ a("span", {
107
+ e.state === "INCOMPATIBLE" && e.reason && /* @__PURE__ */ o("span", {
96
108
  style: {
97
109
  color: "var(--color-status-error-text)",
98
110
  fontSize: "var(--font-size-body-sm)"
99
111
  },
100
112
  children: e.reason
101
113
  }),
102
- e.state === "BLOCKED" && /* @__PURE__ */ a("span", {
114
+ e.state === "BLOCKED" && /* @__PURE__ */ o("span", {
103
115
  style: {
104
116
  color: "var(--color-text-secondary)",
105
117
  fontSize: "var(--font-size-body-sm)"
106
118
  },
107
- children: e.blockedByName ? l("bigconsole.fleet.push.blockedBy", "\"{{name}}\" above it did not take the push.", { name: e.blockedByName }) : l("bigconsole.fleet.push.blockedByUnknown", "A board above it did not take the push.")
119
+ children: e.blockedByName ? u("bigconsole.fleet.push.blockedBy", "\"{{name}}\" above it did not take the push.", { name: e.blockedByName }) : u("bigconsole.fleet.push.blockedByUnknown", "A board above it did not take the push.")
108
120
  })
109
121
  ]
110
122
  }, e.dashboardId))
111
123
  })]
112
124
  });
113
125
  });
114
- export { l as FleetPushResultTable, l as default };
126
+ export { u as FleetPushResultTable, u as default };
@@ -22,3 +22,14 @@ export declare function pushIsEmpty(result: {
22
22
  widgetsUpdated: number;
23
23
  flagsRaised: number;
24
24
  }): boolean;
25
+ /**
26
+ * What an applied copy's chip says. A preview has changed nothing, so a copy that would receive something must
27
+ * not read as already up to date; after a push it reads as received. A copy with nothing to take is up to date
28
+ * either way.
29
+ */
30
+ export type AppliedLabel = 'upToDate' | 'willReceive' | 'received';
31
+ export declare function appliedLabel(copy: {
32
+ widgetCount: number;
33
+ widgetsUpdated: number;
34
+ flagsRaised: number;
35
+ }, preview: boolean): AppliedLabel;
@@ -20,4 +20,7 @@ function t(e) {
20
20
  function n(e) {
21
21
  return e.widgetsAdded === 0 && e.widgetsUpdated === 0 && e.flagsRaised === 0;
22
22
  }
23
- export { t as countPushStates, n as pushIsEmpty, e as pushTone };
23
+ function r(e, t) {
24
+ return e.widgetCount + e.widgetsUpdated + e.flagsRaised > 0 ? t ? "willReceive" : "received" : "upToDate";
25
+ }
26
+ export { r as appliedLabel, t as countPushStates, n as pushIsEmpty, e as pushTone };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-bigconsole",
3
- "version": "2026.1123.4",
3
+ "version": "2026.1123.6",
4
4
  "description": "BigConsole - AI-powered analytics and dashboard platform",
5
5
  "repository": {
6
6
  "type": "git",