@burdenoff/microfe-bigconsole 2026.1124.1 → 2026.1124.3

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 (38) hide show
  1. package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +12 -0
  2. package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +179 -184
  3. package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +18 -0
  4. package/dist/bigconsole/components/fleet/FleetCopySection.js +263 -0
  5. package/dist/bigconsole/components/fleet/FleetWidgetActions.d.ts +36 -0
  6. package/dist/bigconsole/components/fleet/FleetWidgetActions.js +82 -0
  7. package/dist/bigconsole/components/widgets/WidgetMenu.js +146 -96
  8. package/dist/bigconsole/hooks/useFleetBreadcrumb.d.ts +8 -1
  9. package/dist/bigconsole/hooks/useFleetBreadcrumb.js +4 -1
  10. package/dist/bigconsole/hooks/useFleetChildren.d.ts +2 -0
  11. package/dist/bigconsole/hooks/useFleetChildren.js +10 -6
  12. package/dist/bigconsole/hooks/useFleetConfirm.d.ts +7 -0
  13. package/dist/bigconsole/hooks/useFleetConfirm.js +17 -0
  14. package/dist/bigconsole/hooks/useFleetCopyActions.d.ts +23 -0
  15. package/dist/bigconsole/hooks/useFleetCopyActions.js +74 -0
  16. package/dist/bigconsole/hooks/useFleetFlags.d.ts +16 -0
  17. package/dist/bigconsole/hooks/useFleetFlags.js +79 -0
  18. package/dist/bigconsole/hooks/useFleetWidgetActions.d.ts +10 -0
  19. package/dist/bigconsole/hooks/useFleetWidgetActions.js +41 -0
  20. package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +28 -0
  21. package/dist/bigconsole/hooks/useOwnerBoundRun.js +56 -0
  22. package/dist/bigconsole/hooks/useWidgetOperations.js +2 -0
  23. package/dist/bigconsole/pages/DashboardViewPage.js +335 -320
  24. package/dist/bigconsole/pages/DashboardsPage.js +13 -13
  25. package/dist/bigconsole/types/index.d.ts +4 -0
  26. package/dist/bigconsole/utils/fleetFlags.d.ts +22 -0
  27. package/dist/bigconsole/utils/fleetFlags.js +40 -0
  28. package/dist/bigconsole/utils/fleetNotices.d.ts +12 -0
  29. package/dist/bigconsole/utils/fleetNotices.js +5 -0
  30. package/dist/bigconsole/utils/fleetTree.d.ts +9 -0
  31. package/dist/bigconsole/utils/fleetTree.js +5 -1
  32. package/dist/bigconsole/utils/fleetWidgetMenu.d.ts +20 -0
  33. package/dist/bigconsole/utils/fleetWidgetMenu.js +13 -0
  34. package/dist/generated/wspace-operations.d.ts +155 -0
  35. package/dist/generated/wspace-operations.js +928 -99
  36. package/dist/generated/wspace-types.d.ts +395 -9
  37. package/dist/generated/wspace-types.js +6 -4
  38. package/package.json +1 -1
@@ -1,7 +1,19 @@
1
1
  import { FC } from 'react';
2
+ import { ActionLock } from '../../hooks/useOwnerBoundRun';
2
3
  export interface FleetChildrenPanelProps {
3
4
  dashboardId: string;
4
5
  dashboardName: string;
6
+ /** The board this one follows, when it follows one and its name can be read. */
7
+ masterName?: string | null;
8
+ /** Called after an action changed this board's widgets (a flag answered, the board restored). */
9
+ onBoardChanged?: () => Promise<unknown> | void;
10
+ /**
11
+ * The page's action lock, when the board's widget menu shares it with this panel, so a widget restored or
12
+ * promoted from its menu holds the panel's buttons too. The panel keeps its own when none is given.
13
+ */
14
+ lock?: ActionLock;
15
+ /** Changes when something outside the panel changed this board's widgets, so open flags are read again. */
16
+ changeToken?: number;
5
17
  onClose: () => void;
6
18
  onOpenBoard: (dashboardId: string) => void;
7
19
  }
@@ -3,17 +3,19 @@ import { BIGCONSOLE_PERMISSIONS as t } from "../../../constants/permissions.js";
3
3
  import { useTr as n } from "../../../shared/hooks/useTr.js";
4
4
  import "../../context/index.js";
5
5
  import { useFleetChildren as r } from "../../hooks/useFleetChildren.js";
6
- import { useFleetMasterActions as i } from "../../hooks/useFleetMasterActions.js";
7
- import { pushIsEmpty as a } from "../../utils/fleetPush.js";
8
- import { CreateLinkedCopyDialog as o } from "./CreateLinkedCopyDialog.js";
9
- import { FleetPushResultTable as s } from "./FleetPushResultTable.js";
10
- import { memo as c, useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
11
- import { PermissionButton as p } from "@burdenoff/fe-libs/shared/components";
12
- import { Network as m, X as h } from "lucide-react";
13
- import { Button as g, Spinner as _ } from "@burdenoff/fe-libs/ui";
14
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
6
+ import { useActionLock as i, useOwnerBoundRun as a } from "../../hooks/useOwnerBoundRun.js";
7
+ import { useFleetMasterActions as o } from "../../hooks/useFleetMasterActions.js";
8
+ import { pushIsEmpty as s } from "../../utils/fleetPush.js";
9
+ import { CreateLinkedCopyDialog as c } from "./CreateLinkedCopyDialog.js";
10
+ import { FleetCopySection as l } from "./FleetCopySection.js";
11
+ import { FleetPushResultTable as u } from "./FleetPushResultTable.js";
12
+ import { memo as d, useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
13
+ import { PermissionButton as g } from "@burdenoff/fe-libs/shared/components";
14
+ import { Network as ee, X as te } from "lucide-react";
15
+ import { Button as _, Spinner as v } from "@burdenoff/fe-libs/ui";
16
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
17
  // src/bigconsole/components/fleet/FleetChildrenPanel.tsx
16
- var x = {
18
+ var S = {
17
19
  display: "inline-flex",
18
20
  alignItems: "center",
19
21
  padding: "2px 8px",
@@ -24,121 +26,107 @@ var x = {
24
26
  textTransform: "uppercase",
25
27
  letterSpacing: "0.02em",
26
28
  whiteSpace: "nowrap"
27
- }, S = {
28
- ...x,
29
+ }, C = {
30
+ ...S,
29
31
  backgroundColor: "var(--color-status-warning-bgSubtle)",
30
32
  color: "var(--color-status-warning-text)"
31
- }, C = (e, t) => e instanceof Error && e.message ? e.message : t, w = c(function({ dashboardId: c, dashboardName: w, onClose: T, onOpenBoard: E }) {
32
- let D = n(), { workspaceId: O, currentUser: k } = e(), A = `${O ?? ""}:${k?.id ?? ""}:${c}`, { loading: j, error: M, isMaster: N, summary: P, refetch: F } = r(c, !0), I = i(), [L, R] = f({ phase: "idle" }), [z, B] = f(!1), [V, H] = f(null), [U, W] = f(null), [G, K] = f(!1), q = I.busy || G, J = d(A);
33
- u(() => {
34
- J.current !== A && (J.current = A, R({ phase: "idle" }), B(!1), H(null), W(null), K(!1));
35
- }, [A]);
36
- let Y = l(async (e, t, n) => {
37
- let r = J.current, i = () => J.current !== r;
38
- K(!0);
39
- try {
40
- let r;
41
- try {
42
- r = await e();
43
- } catch (e) {
44
- i() || n(e);
45
- return;
46
- }
47
- if (i()) return;
48
- t(r), await F();
49
- } finally {
50
- i() || K(!1);
51
- }
52
- }, [F]), X = l(() => (W(null), Y(() => I.setAsMaster(c), () => W({
33
+ }, w = (e, t) => e instanceof Error && e.message ? e.message : t, T = d(function({ dashboardId: d, dashboardName: T, masterName: E = null, onBoardChanged: D, lock: O, changeToken: k, onClose: ne, onOpenBoard: re }) {
34
+ let A = n(), { workspaceId: ie, currentUser: ae } = e(), j = `${ie ?? ""}:${ae?.id ?? ""}:${d}`, { loading: M, error: N, isMaster: P, linkStatus: F, summary: I, refetch: L } = r(d, !0), R = o(), [z, B] = h({ phase: "idle" }), [V, H] = h(!1), [U, W] = h(null), [G, K] = h(null), q = i(), J = O ?? q, Y = m(k);
35
+ p(() => {
36
+ k !== Y.current && (Y.current = k, B((e) => e.phase === "preview" ? { phase: "idle" } : e), L());
37
+ }, [k, L]);
38
+ let oe = f(() => {
39
+ B({ phase: "idle" }), H(!1), W(null), K(null);
40
+ }, []), { acting: se, run: X } = a(j, L, oe, J), Z = R.busy || se, Q = f(() => (K(null), X(() => R.setAsMaster(d), () => K({
53
41
  tone: "ok",
54
- text: D("bigconsole.fleet.children.nowMaster", "This board is now a master.")
55
- }), (e) => W({
42
+ text: A("bigconsole.fleet.children.nowMaster", "This board is now a master.")
43
+ }), (e) => K({
56
44
  tone: "error",
57
- text: C(e, D("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
45
+ text: w(e, A("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
58
46
  }))), [
59
- I,
60
- c,
61
- Y,
62
- D
63
- ]), Z = l(() => (W(null), Y(() => I.unsetAsMaster(c), () => W({
47
+ R,
48
+ d,
49
+ X,
50
+ A
51
+ ]), ce = f(() => (K(null), X(() => R.unsetAsMaster(d), () => K({
64
52
  tone: "ok",
65
- text: D("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
66
- }), (e) => W({
53
+ text: A("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
54
+ }), (e) => K({
67
55
  tone: "error",
68
- text: C(e, D("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
56
+ text: w(e, A("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
69
57
  }))), [
70
- I,
71
- c,
72
- Y,
73
- D
74
- ]), Q = l((e) => (H(null), Y(() => I.createLinkedCopy(c, e), () => {
75
- B(!1), W({
58
+ R,
59
+ d,
60
+ X,
61
+ A
62
+ ]), le = f((e) => (W(null), X(() => R.createLinkedCopy(d, e), () => {
63
+ H(!1), K({
76
64
  tone: "ok",
77
- text: D("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
65
+ text: A("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
78
66
  });
79
- }, (e) => H(C(e, D("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
80
- I,
81
- c,
82
- Y,
83
- D
84
- ]), $ = l((e) => (W(null), Y(() => I.previewPush(c, e), (t) => R({
67
+ }, (e) => W(w(e, A("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
68
+ R,
69
+ d,
70
+ X,
71
+ A
72
+ ]), $ = f((e) => (K(null), X(() => R.previewPush(d, e), (t) => B({
85
73
  phase: "preview",
86
74
  scope: e,
87
75
  result: t
88
- }), (e) => W({
76
+ }), (e) => K({
89
77
  tone: "error",
90
- text: C(e, D("bigconsole.fleet.error.preview", "The preview could not be made."))
78
+ text: w(e, A("bigconsole.fleet.error.preview", "The preview could not be made."))
91
79
  }))), [
92
- I,
93
- c,
94
- Y,
95
- D
96
- ]), ee = l((e) => (W(null), Y(() => I.push(c, e), (e) => R({
80
+ R,
81
+ d,
82
+ X,
83
+ A
84
+ ]), ue = f((e) => (K(null), X(() => R.push(d, e), (e) => B({
97
85
  phase: "done",
98
86
  result: e
99
- }), (e) => W({
87
+ }), (e) => K({
100
88
  tone: "error",
101
- text: C(e, D("bigconsole.fleet.error.push", "The push could not be made."))
89
+ text: w(e, A("bigconsole.fleet.error.push", "The push could not be made."))
102
90
  }))), [
103
- I,
104
- c,
105
- Y,
106
- D
107
- ]), te = (e) => /* @__PURE__ */ b("span", {
91
+ R,
92
+ d,
93
+ X,
94
+ A
95
+ ]), de = (e) => /* @__PURE__ */ x("span", {
108
96
  className: "flex flex-wrap items-center gap-1",
109
97
  children: [
110
- e.status === "PENDING" && /* @__PURE__ */ y("span", {
98
+ e.status === "PENDING" && /* @__PURE__ */ b("span", {
111
99
  "data-testid": "fleet-child-pending",
112
- style: S,
113
- children: D("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
100
+ style: C,
101
+ children: A("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
114
102
  }),
115
- e.behindMaster && /* @__PURE__ */ y("span", {
103
+ e.behindMaster && /* @__PURE__ */ b("span", {
116
104
  "data-testid": "fleet-child-behind",
117
- style: S,
118
- children: e.missingWidgetCount ? D("bigconsole.fleet.children.behindCount", "Behind · {{count}} widgets missing", { count: e.missingWidgetCount }) : D("bigconsole.fleet.children.behind", "Behind the master")
105
+ style: C,
106
+ children: e.missingWidgetCount ? A("bigconsole.fleet.children.behindCount", "Behind · {{count}} widgets missing", { count: e.missingWidgetCount }) : A("bigconsole.fleet.children.behind", "Behind the master")
119
107
  }),
120
- e.openFlagCount > 0 && /* @__PURE__ */ y("span", {
108
+ e.openFlagCount > 0 && /* @__PURE__ */ b("span", {
121
109
  "data-testid": "fleet-child-flags",
122
- style: S,
123
- children: D("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
110
+ style: C,
111
+ children: A("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
124
112
  }),
125
- e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ y("span", {
113
+ e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ b("span", {
126
114
  style: {
127
- ...x,
115
+ ...S,
128
116
  color: "var(--color-status-success-text)"
129
117
  },
130
- children: D("bigconsole.fleet.children.inSync", "In sync")
118
+ children: A("bigconsole.fleet.children.inSync", "In sync")
131
119
  })
132
120
  ]
133
121
  });
134
- return /* @__PURE__ */ b("section", {
135
- "aria-label": D("bigconsole.fleet.children.title", "Children"),
122
+ return /* @__PURE__ */ x("section", {
123
+ "aria-label": A("bigconsole.fleet.children.title", "Children"),
136
124
  "data-testid": "fleet-children-panel",
137
125
  className: "flex flex-col gap-form-gap",
138
126
  children: [
139
- /* @__PURE__ */ b("div", {
127
+ /* @__PURE__ */ x("div", {
140
128
  className: "flex items-center justify-between gap-form-gap",
141
- children: [/* @__PURE__ */ b("h2", {
129
+ children: [/* @__PURE__ */ x("h2", {
142
130
  className: "flex items-center gap-2",
143
131
  style: {
144
132
  margin: 0,
@@ -146,111 +134,118 @@ var x = {
146
134
  fontSize: "var(--font-size-body)",
147
135
  fontWeight: "var(--font-weight-semibold)"
148
136
  },
149
- children: [/* @__PURE__ */ y(m, {
137
+ children: [/* @__PURE__ */ b(ee, {
150
138
  "aria-hidden": "true",
151
139
  style: {
152
140
  height: "var(--size-icon-sm)",
153
141
  width: "var(--size-icon-sm)"
154
142
  }
155
- }), D("bigconsole.fleet.children.title", "Children")]
156
- }), /* @__PURE__ */ y(g, {
143
+ }), A("bigconsole.fleet.children.title", "Children")]
144
+ }), /* @__PURE__ */ b(_, {
157
145
  variant: "ghost",
158
146
  size: "sm",
159
- onClick: T,
160
- "aria-label": D("bigconsole.fleet.children.close", "Close the Children panel"),
161
- title: D("bigconsole.fleet.children.close", "Close the Children panel"),
147
+ onClick: ne,
148
+ "aria-label": A("bigconsole.fleet.children.close", "Close the Children panel"),
149
+ title: A("bigconsole.fleet.children.close", "Close the Children panel"),
162
150
  "data-testid": "fleet-children-close",
163
- children: /* @__PURE__ */ y(h, { style: {
151
+ children: /* @__PURE__ */ b(te, { style: {
164
152
  height: "var(--size-icon-sm)",
165
153
  width: "var(--size-icon-sm)"
166
154
  } })
167
155
  })]
168
156
  }),
169
- U && /* @__PURE__ */ y("p", {
170
- role: U.tone === "error" ? "alert" : "status",
157
+ G && /* @__PURE__ */ b("p", {
158
+ role: G.tone === "error" ? "alert" : "status",
171
159
  "data-testid": "fleet-children-message",
172
160
  style: {
173
161
  margin: 0,
174
- color: U.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
162
+ color: G.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
175
163
  fontSize: "var(--font-size-body-sm)"
176
164
  },
177
- children: U.text
165
+ children: G.text
178
166
  }),
179
- j && !P && !N && /* @__PURE__ */ b("div", {
167
+ M && !I && !P && /* @__PURE__ */ x("div", {
180
168
  className: "flex items-center gap-2",
181
169
  style: { color: "var(--color-text-secondary)" },
182
- children: [/* @__PURE__ */ y(_, { style: {
170
+ children: [/* @__PURE__ */ b(v, { style: {
183
171
  height: "var(--size-icon-sm)",
184
172
  width: "var(--size-icon-sm)"
185
- } }), D("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
173
+ } }), A("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
186
174
  }),
187
- !j && M && /* @__PURE__ */ y("p", {
175
+ !M && N && /* @__PURE__ */ b("p", {
188
176
  role: "alert",
189
177
  style: {
190
178
  margin: 0,
191
179
  color: "var(--color-status-error-text)"
192
180
  },
193
- children: D("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
181
+ children: A("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
194
182
  }),
195
- !j && !M && !N && /* @__PURE__ */ b("div", {
183
+ !M && !N && F === "ACTIVE" && /* @__PURE__ */ b(l, {
184
+ dashboardId: d,
185
+ masterName: E,
186
+ onBoardChanged: D,
187
+ lock: J,
188
+ changeToken: k
189
+ }),
190
+ !M && !N && !P && /* @__PURE__ */ x("div", {
196
191
  className: "flex flex-col gap-form-gap",
197
192
  "data-testid": "fleet-children-not-master",
198
- children: [/* @__PURE__ */ y("p", {
193
+ children: [/* @__PURE__ */ b("p", {
199
194
  style: {
200
195
  margin: 0,
201
196
  color: "var(--color-text-secondary)",
202
197
  fontSize: "var(--font-size-body-sm)"
203
198
  },
204
- children: D("bigconsole.fleet.children.notMaster", "Other boards can follow this one as linked copies once it is a master. Its own widgets stay as they are.")
205
- }), /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y(p, {
199
+ children: A("bigconsole.fleet.children.notMaster", "Other boards can follow this one as linked copies once it is a master. Its own widgets stay as they are.")
200
+ }), /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(g, {
206
201
  permission: t.DASHBOARD_UPDATE,
207
202
  deniedBehavior: "hide",
208
- children: /* @__PURE__ */ b(g, {
209
- onClick: X,
210
- disabled: q,
203
+ children: /* @__PURE__ */ x(_, {
204
+ onClick: Q,
205
+ disabled: Z,
211
206
  "data-testid": "fleet-set-master",
212
- children: [q && /* @__PURE__ */ y(_, { style: {
207
+ children: [Z && /* @__PURE__ */ b(v, { style: {
213
208
  height: "var(--size-icon-sm)",
214
209
  width: "var(--size-icon-sm)"
215
- } }), D("bigconsole.fleet.children.setMaster", "Set as master")]
210
+ } }), A("bigconsole.fleet.children.setMaster", "Set as master")]
216
211
  })
217
212
  }) })]
218
213
  }),
219
- !M && N && P && /* @__PURE__ */ b(v, { children: [
220
- /* @__PURE__ */ b("p", {
214
+ !N && P && I && /* @__PURE__ */ x(y, { children: [
215
+ /* @__PURE__ */ x("p", {
221
216
  "data-testid": "fleet-children-counts",
222
217
  style: {
223
218
  margin: 0,
224
219
  color: "var(--color-text-secondary)",
225
220
  fontSize: "var(--font-size-body-sm)"
226
221
  },
227
- children: [D("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
228
- total: P.total,
229
- active: P.active,
230
- pending: P.pending,
231
- behind: P.behind
232
- }), P.hiddenCount > 0 && /* @__PURE__ */ b(v, { children: [" ", D("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: P.hiddenCount })] })]
222
+ children: [A("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
223
+ total: I.total,
224
+ active: I.active,
225
+ pending: I.pending,
226
+ behind: I.behind
227
+ }), I.hiddenCount > 0 && /* @__PURE__ */ x(y, { children: [" ", A("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: I.hiddenCount })] })]
233
228
  }),
234
- /* @__PURE__ */ b("ul", {
229
+ /* @__PURE__ */ x("ul", {
235
230
  className: "flex flex-col gap-1",
236
231
  style: {
237
232
  listStyle: "none",
238
233
  margin: 0,
239
234
  padding: 0
240
235
  },
241
- children: [P.children.length === 0 && P.total === 0 && /* @__PURE__ */ y("li", {
236
+ children: [I.children.length === 0 && I.total === 0 && /* @__PURE__ */ b("li", {
242
237
  style: {
243
238
  color: "var(--color-text-secondary)",
244
239
  fontSize: "var(--font-size-body-sm)"
245
240
  },
246
- children: D("bigconsole.fleet.children.none", "No copies yet. Create one, or link a board from the dashboards list.")
247
- }), P.children.map((e) => /* @__PURE__ */ b("li", {
241
+ children: A("bigconsole.fleet.children.none", "No copies yet. Create one, or link a board from the dashboards list.")
242
+ }), I.children.map((e) => /* @__PURE__ */ x("li", {
248
243
  "data-testid": "fleet-child",
249
244
  className: "flex items-center justify-between gap-form-gap rounded-input border px-3 py-2",
250
245
  style: { borderColor: "var(--color-border-subtle)" },
251
- children: [/* @__PURE__ */ y("button", {
246
+ children: [/* @__PURE__ */ b("button", {
252
247
  type: "button",
253
- onClick: () => E(e.dashboardId),
248
+ onClick: () => re(e.dashboardId),
254
249
  className: "min-w-0 truncate text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
255
250
  style: {
256
251
  color: "var(--color-text-primary)",
@@ -260,133 +255,133 @@ var x = {
260
255
  cursor: "pointer"
261
256
  },
262
257
  children: e.name
263
- }), te(e)]
258
+ }), de(e)]
264
259
  }, e.dashboardId))]
265
260
  }),
266
- /* @__PURE__ */ b("div", {
261
+ /* @__PURE__ */ x("div", {
267
262
  className: "flex flex-wrap items-center gap-2",
268
263
  children: [
269
- /* @__PURE__ */ y(p, {
264
+ /* @__PURE__ */ b(g, {
270
265
  permission: t.DASHBOARD_CREATE,
271
266
  deniedBehavior: "hide",
272
- children: /* @__PURE__ */ y(g, {
267
+ children: /* @__PURE__ */ b(_, {
273
268
  variant: "outline",
274
269
  onClick: () => {
275
- H(null), B(!0);
270
+ W(null), H(!0);
276
271
  },
277
- disabled: q,
272
+ disabled: Z,
278
273
  "data-testid": "fleet-create-copy",
279
- children: D("bigconsole.fleet.children.createCopy", "Create linked copy…")
274
+ children: A("bigconsole.fleet.children.createCopy", "Create linked copy…")
280
275
  })
281
276
  }),
282
- /* @__PURE__ */ y(p, {
277
+ /* @__PURE__ */ b(g, {
283
278
  permission: t.DASHBOARD_UPDATE,
284
279
  deniedBehavior: "hide",
285
- children: /* @__PURE__ */ y(g, {
280
+ children: /* @__PURE__ */ b(_, {
286
281
  onClick: () => $("DIRECT_COPIES"),
287
- disabled: q || P.total === 0 || L.phase === "preview",
282
+ disabled: Z || I.total === 0 || z.phase === "preview",
288
283
  "data-testid": "fleet-push",
289
- children: D("bigconsole.fleet.children.push", "Push to copies…")
284
+ children: A("bigconsole.fleet.children.push", "Push to copies…")
290
285
  })
291
286
  }),
292
- /* @__PURE__ */ y(p, {
287
+ /* @__PURE__ */ b(g, {
293
288
  permission: t.DASHBOARD_UPDATE,
294
289
  deniedBehavior: "hide",
295
- children: /* @__PURE__ */ y(g, {
290
+ children: /* @__PURE__ */ b(_, {
296
291
  variant: "ghost",
297
- onClick: Z,
298
- disabled: q || P.total > 0,
299
- title: P.total > 0 ? D("bigconsole.fleet.children.unsetBlocked", "Detach or remove every copy first.") : void 0,
292
+ onClick: ce,
293
+ disabled: Z || I.total > 0,
294
+ title: I.total > 0 ? A("bigconsole.fleet.children.unsetBlocked", "Detach or remove every copy first.") : void 0,
300
295
  "data-testid": "fleet-unset-master",
301
- children: D("bigconsole.fleet.children.unsetMaster", "Stop being a master")
296
+ children: A("bigconsole.fleet.children.unsetMaster", "Stop being a master")
302
297
  })
303
298
  })
304
299
  ]
305
300
  })
306
301
  ] }),
307
- L.phase === "preview" && /* @__PURE__ */ b("div", {
302
+ z.phase === "preview" && /* @__PURE__ */ x("div", {
308
303
  className: "flex flex-col gap-form-gap rounded-input border p-3",
309
304
  style: { borderColor: "var(--color-border-subtle)" },
310
305
  "data-testid": "fleet-push-preview",
311
306
  children: [
312
- /* @__PURE__ */ y("strong", {
307
+ /* @__PURE__ */ b("strong", {
313
308
  style: { color: "var(--color-text-primary)" },
314
- children: D("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
309
+ children: A("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
315
310
  }),
316
- /* @__PURE__ */ y("div", {
311
+ /* @__PURE__ */ b("div", {
317
312
  role: "radiogroup",
318
- "aria-label": D("bigconsole.fleet.push.scopeLabel", "How far to push"),
313
+ "aria-label": A("bigconsole.fleet.push.scopeLabel", "How far to push"),
319
314
  className: "flex flex-wrap gap-2",
320
- children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */ y("button", {
315
+ children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */ b("button", {
321
316
  type: "button",
322
317
  role: "radio",
323
- "aria-checked": L.scope === e,
324
- disabled: q,
325
- onClick: () => L.scope !== e && $(e),
318
+ "aria-checked": z.scope === e,
319
+ disabled: Z,
320
+ onClick: () => z.scope !== e && $(e),
326
321
  className: "rounded-input border px-3 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
327
322
  style: {
328
- borderColor: L.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
329
- backgroundColor: L.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
323
+ borderColor: z.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
324
+ backgroundColor: z.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
330
325
  color: "var(--color-text-primary)"
331
326
  },
332
327
  "data-testid": `fleet-push-scope-${e}`,
333
- children: e === "DIRECT_COPIES" ? D("bigconsole.fleet.push.scopeDirect", "Direct copies") : D("bigconsole.fleet.push.scopeAll", "Copies of copies too")
328
+ children: e === "DIRECT_COPIES" ? A("bigconsole.fleet.push.scopeDirect", "Direct copies") : A("bigconsole.fleet.push.scopeAll", "Copies of copies too")
334
329
  }, e))
335
330
  }),
336
- /* @__PURE__ */ y(s, { result: L.result }),
337
- a(L.result) && /* @__PURE__ */ y("p", {
331
+ /* @__PURE__ */ b(u, { result: z.result }),
332
+ s(z.result) && /* @__PURE__ */ b("p", {
338
333
  style: {
339
334
  margin: 0,
340
335
  color: "var(--color-text-secondary)",
341
336
  fontSize: "var(--font-size-body-sm)"
342
337
  },
343
- children: D("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
338
+ children: A("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
344
339
  }),
345
- /* @__PURE__ */ b("div", {
340
+ /* @__PURE__ */ x("div", {
346
341
  className: "flex gap-2",
347
- children: [/* @__PURE__ */ b(g, {
348
- onClick: () => ee(L.scope),
349
- disabled: q || a(L.result),
342
+ children: [/* @__PURE__ */ x(_, {
343
+ onClick: () => ue(z.scope),
344
+ disabled: Z || s(z.result),
350
345
  "data-testid": "fleet-push-confirm",
351
- children: [q && /* @__PURE__ */ y(_, { style: {
346
+ children: [Z && /* @__PURE__ */ b(v, { style: {
352
347
  height: "var(--size-icon-sm)",
353
348
  width: "var(--size-icon-sm)"
354
- } }), D("bigconsole.fleet.push.confirm", "Push now")]
355
- }), /* @__PURE__ */ y(g, {
349
+ } }), A("bigconsole.fleet.push.confirm", "Push now")]
350
+ }), /* @__PURE__ */ b(_, {
356
351
  variant: "outline",
357
- onClick: () => R({ phase: "idle" }),
358
- disabled: q,
359
- children: D("bigconsole.fleet.link.cancel", "Cancel")
352
+ onClick: () => B({ phase: "idle" }),
353
+ disabled: Z,
354
+ children: A("bigconsole.fleet.link.cancel", "Cancel")
360
355
  })]
361
356
  })
362
357
  ]
363
358
  }),
364
- L.phase === "done" && /* @__PURE__ */ b("div", {
359
+ z.phase === "done" && /* @__PURE__ */ x("div", {
365
360
  className: "flex flex-col gap-form-gap rounded-input border p-3",
366
361
  style: { borderColor: "var(--color-border-subtle)" },
367
362
  "data-testid": "fleet-push-done",
368
363
  children: [
369
- /* @__PURE__ */ y("strong", {
364
+ /* @__PURE__ */ b("strong", {
370
365
  style: { color: "var(--color-text-primary)" },
371
- children: D("bigconsole.fleet.push.doneTitle", "Pushed")
366
+ children: A("bigconsole.fleet.push.doneTitle", "Pushed")
372
367
  }),
373
- /* @__PURE__ */ y(s, { result: L.result }),
374
- /* @__PURE__ */ y("div", { children: /* @__PURE__ */ y(g, {
368
+ /* @__PURE__ */ b(u, { result: z.result }),
369
+ /* @__PURE__ */ b("div", { children: /* @__PURE__ */ b(_, {
375
370
  variant: "outline",
376
- onClick: () => R({ phase: "idle" }),
377
- children: D("bigconsole.fleet.push.done", "Done")
371
+ onClick: () => B({ phase: "idle" }),
372
+ children: A("bigconsole.fleet.push.done", "Done")
378
373
  }) })
379
374
  ]
380
375
  }),
381
- /* @__PURE__ */ y(o, {
382
- isOpen: z,
383
- masterName: w,
384
- busy: q,
385
- error: V,
386
- onClose: () => B(!1),
387
- onCreate: Q
376
+ /* @__PURE__ */ b(c, {
377
+ isOpen: V,
378
+ masterName: T,
379
+ busy: Z,
380
+ error: U,
381
+ onClose: () => H(!1),
382
+ onCreate: le
388
383
  })
389
384
  ]
390
385
  });
391
386
  });
392
- export { w as FleetChildrenPanel, w as default };
387
+ export { T as FleetChildrenPanel, T as default };
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { ActionLock } from '../../hooks/useOwnerBoundRun';
3
+ export interface FleetCopySectionProps {
4
+ dashboardId: string;
5
+ /** The board this one follows, when its name can be read. */
6
+ masterName: string | null;
7
+ /** Called after an action changed this board's widgets, so the canvas shows them without a reload. Awaited. */
8
+ onBoardChanged?: () => Promise<unknown> | void;
9
+ /** Shared with the master controls of the same panel, so one action holds the buttons of both. */
10
+ lock?: ActionLock;
11
+ /**
12
+ * Changes when something outside the panel changed this board's widgets (a widget restored or promoted from its
13
+ * menu), so the flags are read again instead of showing one that is already settled.
14
+ */
15
+ changeToken?: number;
16
+ }
17
+ export declare const FleetCopySection: FC<FleetCopySectionProps>;
18
+ export default FleetCopySection;