@burdenoff/microfe-bigconsole 2026.1124.2 → 2026.1124.4

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