@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.
- package/dist/bigconsole/components/fleet/FleetBindingsDialog.d.ts +19 -0
- package/dist/bigconsole/components/fleet/FleetBindingsDialog.js +287 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.d.ts +8 -0
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +185 -156
- package/dist/bigconsole/components/fleet/FleetCopySection.d.ts +5 -0
- package/dist/bigconsole/components/fleet/FleetCopySection.js +115 -118
- package/dist/bigconsole/components/fleet/FleetWidgetActions.d.ts +36 -0
- package/dist/bigconsole/components/fleet/FleetWidgetActions.js +82 -0
- package/dist/bigconsole/components/widgets/WidgetMenu.js +146 -96
- package/dist/bigconsole/hooks/useFleetBindingActions.d.ts +23 -0
- package/dist/bigconsole/hooks/useFleetBindingActions.js +50 -0
- package/dist/bigconsole/hooks/useFleetBindings.d.ts +19 -0
- package/dist/bigconsole/hooks/useFleetBindings.js +140 -0
- package/dist/bigconsole/hooks/useFleetConfirm.d.ts +7 -0
- package/dist/bigconsole/hooks/useFleetConfirm.js +17 -0
- package/dist/bigconsole/hooks/useFleetWidgetActions.d.ts +10 -0
- package/dist/bigconsole/hooks/useFleetWidgetActions.js +41 -0
- package/dist/bigconsole/hooks/useOwnerBoundRun.d.ts +13 -18
- package/dist/bigconsole/hooks/useOwnerBoundRun.js +45 -30
- package/dist/bigconsole/hooks/useWidgetOperations.js +2 -0
- package/dist/bigconsole/pages/DashboardViewPage.js +303 -291
- package/dist/bigconsole/types/index.d.ts +4 -0
- package/dist/bigconsole/utils/fleetBindings.d.ts +49 -0
- package/dist/bigconsole/utils/fleetBindings.js +52 -0
- package/dist/bigconsole/utils/fleetNotices.d.ts +12 -0
- package/dist/bigconsole/utils/fleetNotices.js +5 -0
- package/dist/bigconsole/utils/fleetWidgetMenu.d.ts +20 -0
- package/dist/bigconsole/utils/fleetWidgetMenu.js +13 -0
- package/dist/generated/wspace-operations.d.ts +163 -0
- package/dist/generated/wspace-operations.js +935 -122
- package/dist/generated/wspace-types.d.ts +395 -9
- package/dist/generated/wspace-types.js +12 -10
- 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
|
|
6
|
-
import { useActionLock as
|
|
7
|
-
import { useFleetMasterActions as
|
|
8
|
-
import { pushIsEmpty as
|
|
9
|
-
import { CreateLinkedCopyDialog as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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
|
|
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
|
-
},
|
|
30
|
-
...
|
|
30
|
+
}, w = {
|
|
31
|
+
...C,
|
|
31
32
|
backgroundColor: "var(--color-status-warning-bgSubtle)",
|
|
32
33
|
color: "var(--color-status-warning-text)"
|
|
33
|
-
},
|
|
34
|
-
let
|
|
35
|
-
|
|
36
|
-
|
|
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:
|
|
39
|
-
}), (e) =>
|
|
46
|
+
text: j("bigconsole.fleet.children.nowMaster", "This board is now a master.")
|
|
47
|
+
}), (e) => J({
|
|
40
48
|
tone: "error",
|
|
41
|
-
text:
|
|
49
|
+
text: T(e, j("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
|
|
42
50
|
}))), [
|
|
43
|
-
|
|
44
|
-
|
|
51
|
+
R,
|
|
52
|
+
u,
|
|
45
53
|
Z,
|
|
46
|
-
|
|
47
|
-
]),
|
|
54
|
+
j
|
|
55
|
+
]), pe = d(() => (J(null), Z(() => R.unsetAsMaster(u), () => J({
|
|
48
56
|
tone: "ok",
|
|
49
|
-
text:
|
|
50
|
-
}), (e) =>
|
|
57
|
+
text: j("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
|
|
58
|
+
}), (e) => J({
|
|
51
59
|
tone: "error",
|
|
52
|
-
text:
|
|
60
|
+
text: T(e, j("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
|
|
53
61
|
}))), [
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
R,
|
|
63
|
+
u,
|
|
56
64
|
Z,
|
|
57
|
-
|
|
58
|
-
]),
|
|
59
|
-
U(!1),
|
|
65
|
+
j
|
|
66
|
+
]), me = d((e) => (K(null), Z(() => R.createLinkedCopy(u, e), () => {
|
|
67
|
+
U(!1), J({
|
|
60
68
|
tone: "ok",
|
|
61
|
-
text:
|
|
69
|
+
text: j("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
|
|
62
70
|
});
|
|
63
|
-
}, (e) =>
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
|
|
68
|
-
]), $ =
|
|
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) =>
|
|
80
|
+
}), (e) => J({
|
|
73
81
|
tone: "error",
|
|
74
|
-
text:
|
|
82
|
+
text: T(e, j("bigconsole.fleet.error.preview", "The preview could not be made."))
|
|
75
83
|
}))), [
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
R,
|
|
85
|
+
u,
|
|
78
86
|
Z,
|
|
79
|
-
|
|
80
|
-
]),
|
|
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) =>
|
|
91
|
+
}), (e) => J({
|
|
84
92
|
tone: "error",
|
|
85
|
-
text:
|
|
93
|
+
text: T(e, j("bigconsole.fleet.error.push", "The push could not be made."))
|
|
86
94
|
}))), [
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
R,
|
|
96
|
+
u,
|
|
89
97
|
Z,
|
|
90
|
-
|
|
91
|
-
]),
|
|
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__ */
|
|
102
|
+
e.status === "PENDING" && /* @__PURE__ */ x("span", {
|
|
95
103
|
"data-testid": "fleet-child-pending",
|
|
96
|
-
style:
|
|
97
|
-
children:
|
|
104
|
+
style: w,
|
|
105
|
+
children: j("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
|
|
98
106
|
}),
|
|
99
|
-
e.behindMaster && /* @__PURE__ */
|
|
107
|
+
e.behindMaster && /* @__PURE__ */ x("span", {
|
|
100
108
|
"data-testid": "fleet-child-behind",
|
|
101
|
-
style:
|
|
102
|
-
children: e.missingWidgetCount ?
|
|
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__ */
|
|
112
|
+
e.openFlagCount > 0 && /* @__PURE__ */ x("span", {
|
|
105
113
|
"data-testid": "fleet-child-flags",
|
|
106
|
-
style:
|
|
107
|
-
children:
|
|
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__ */
|
|
117
|
+
e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ x("span", {
|
|
110
118
|
style: {
|
|
111
|
-
...
|
|
119
|
+
...C,
|
|
112
120
|
color: "var(--color-status-success-text)"
|
|
113
121
|
},
|
|
114
|
-
children:
|
|
122
|
+
children: j("bigconsole.fleet.children.inSync", "In sync")
|
|
115
123
|
})
|
|
116
124
|
]
|
|
117
125
|
});
|
|
118
|
-
return /* @__PURE__ */
|
|
119
|
-
"aria-label":
|
|
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__ */
|
|
131
|
+
/* @__PURE__ */ S("div", {
|
|
124
132
|
className: "flex items-center justify-between gap-form-gap",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
}),
|
|
140
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), j("bigconsole.fleet.children.title", "Children")]
|
|
148
|
+
}), /* @__PURE__ */ x(v, {
|
|
141
149
|
variant: "ghost",
|
|
142
150
|
size: "sm",
|
|
143
|
-
onClick:
|
|
144
|
-
"aria-label":
|
|
145
|
-
title:
|
|
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__ */
|
|
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
|
-
|
|
154
|
-
role:
|
|
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:
|
|
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:
|
|
169
|
+
children: q.text
|
|
162
170
|
}),
|
|
163
|
-
|
|
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__ */
|
|
174
|
+
children: [/* @__PURE__ */ x(y, { style: {
|
|
167
175
|
height: "var(--size-icon-sm)",
|
|
168
176
|
width: "var(--size-icon-sm)"
|
|
169
|
-
} }),
|
|
177
|
+
} }), j("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
|
|
170
178
|
}),
|
|
171
|
-
!
|
|
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:
|
|
185
|
+
children: j("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
|
|
178
186
|
}),
|
|
179
|
-
!
|
|
180
|
-
dashboardId:
|
|
181
|
-
masterName:
|
|
182
|
-
onBoardChanged:
|
|
183
|
-
lock:
|
|
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
|
-
!
|
|
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__ */
|
|
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:
|
|
195
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
199
|
-
onClick:
|
|
207
|
+
children: /* @__PURE__ */ S(v, {
|
|
208
|
+
onClick: fe,
|
|
200
209
|
disabled: Q,
|
|
201
210
|
"data-testid": "fleet-set-master",
|
|
202
|
-
children: [Q && /* @__PURE__ */
|
|
211
|
+
children: [Q && /* @__PURE__ */ x(y, { style: {
|
|
203
212
|
height: "var(--size-icon-sm)",
|
|
204
213
|
width: "var(--size-icon-sm)"
|
|
205
|
-
} }),
|
|
214
|
+
} }), j("bigconsole.fleet.children.setMaster", "Set as master")]
|
|
206
215
|
})
|
|
207
216
|
}) })]
|
|
208
217
|
}),
|
|
209
|
-
!
|
|
210
|
-
/* @__PURE__ */
|
|
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: [
|
|
218
|
-
total:
|
|
219
|
-
active:
|
|
220
|
-
pending:
|
|
221
|
-
behind:
|
|
222
|
-
}),
|
|
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__ */
|
|
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: [
|
|
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:
|
|
237
|
-
}),
|
|
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__ */
|
|
250
|
+
children: [/* @__PURE__ */ x("button", {
|
|
242
251
|
type: "button",
|
|
243
|
-
onClick: () =>
|
|
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
|
-
}),
|
|
262
|
+
}), ge(e)]
|
|
254
263
|
}, e.dashboardId))]
|
|
255
264
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ S("div", {
|
|
257
266
|
className: "flex flex-wrap items-center gap-2",
|
|
258
267
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ x(h, {
|
|
260
269
|
permission: t.DASHBOARD_CREATE,
|
|
261
270
|
deniedBehavior: "hide",
|
|
262
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ x(v, {
|
|
263
272
|
variant: "outline",
|
|
264
273
|
onClick: () => {
|
|
265
|
-
|
|
274
|
+
K(null), U(!0);
|
|
266
275
|
},
|
|
267
276
|
disabled: Q,
|
|
268
277
|
"data-testid": "fleet-create-copy",
|
|
269
|
-
children:
|
|
278
|
+
children: j("bigconsole.fleet.children.createCopy", "Create linked copy…")
|
|
270
279
|
})
|
|
271
280
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ x(h, {
|
|
273
282
|
permission: t.DASHBOARD_UPDATE,
|
|
274
283
|
deniedBehavior: "hide",
|
|
275
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ x(v, {
|
|
276
285
|
onClick: () => $("DIRECT_COPIES"),
|
|
277
|
-
disabled: Q ||
|
|
286
|
+
disabled: Q || I.total === 0 || B.phase === "preview",
|
|
278
287
|
"data-testid": "fleet-push",
|
|
279
|
-
children:
|
|
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__ */
|
|
302
|
+
/* @__PURE__ */ x(h, {
|
|
283
303
|
permission: t.DASHBOARD_UPDATE,
|
|
284
304
|
deniedBehavior: "hide",
|
|
285
|
-
children: /* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ x(v, {
|
|
286
306
|
variant: "ghost",
|
|
287
|
-
onClick:
|
|
288
|
-
disabled: Q ||
|
|
289
|
-
title:
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
322
|
+
/* @__PURE__ */ x("strong", {
|
|
303
323
|
style: { color: "var(--color-text-primary)" },
|
|
304
|
-
children:
|
|
324
|
+
children: j("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
|
|
305
325
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ x("div", {
|
|
307
327
|
role: "radiogroup",
|
|
308
|
-
"aria-label":
|
|
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__ */
|
|
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" ?
|
|
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__ */
|
|
327
|
-
|
|
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:
|
|
353
|
+
children: j("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
|
|
334
354
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ S("div", {
|
|
336
356
|
className: "flex gap-2",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
338
|
-
onClick: () =>
|
|
339
|
-
disabled: Q ||
|
|
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__ */
|
|
361
|
+
children: [Q && /* @__PURE__ */ x(y, { style: {
|
|
342
362
|
height: "var(--size-icon-sm)",
|
|
343
363
|
width: "var(--size-icon-sm)"
|
|
344
|
-
} }),
|
|
345
|
-
}), /* @__PURE__ */
|
|
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:
|
|
369
|
+
children: j("bigconsole.fleet.link.cancel", "Cancel")
|
|
350
370
|
})]
|
|
351
371
|
})
|
|
352
372
|
]
|
|
353
373
|
}),
|
|
354
|
-
B.phase === "done" && /* @__PURE__ */
|
|
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__ */
|
|
379
|
+
/* @__PURE__ */ x("strong", {
|
|
360
380
|
style: { color: "var(--color-text-primary)" },
|
|
361
|
-
children:
|
|
381
|
+
children: j("bigconsole.fleet.push.doneTitle", "Pushed")
|
|
362
382
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
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:
|
|
387
|
+
children: j("bigconsole.fleet.push.done", "Done")
|
|
368
388
|
}) })
|
|
369
389
|
]
|
|
370
390
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
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:
|
|
402
|
+
masterName: E,
|
|
374
403
|
busy: Q,
|
|
375
|
-
error:
|
|
404
|
+
error: ce,
|
|
376
405
|
onClose: () => U(!1),
|
|
377
|
-
onCreate:
|
|
406
|
+
onCreate: me
|
|
378
407
|
})
|
|
379
408
|
]
|
|
380
409
|
});
|
|
381
410
|
});
|
|
382
|
-
export {
|
|
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;
|