@burdenoff/microfe-bigconsole 2026.1124.3 → 2026.1124.5
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/builder/inspector/AppearanceSection.js +12 -6
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +2 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +34 -34
- 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.js +194 -170
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +489 -474
- package/dist/bigconsole/components/widgets/chart/ChartConfig.d.ts +1 -0
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +111 -107
- package/dist/bigconsole/components/widgets/chart/ChartFieldMappings.d.ts +8 -0
- package/dist/bigconsole/components/widgets/chart/ChartFieldMappings.js +85 -0
- package/dist/bigconsole/components/widgets/chart/chartMappingFields.d.ts +9 -0
- package/dist/bigconsole/components/widgets/chart/chartMappingFields.js +30 -0
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.d.ts +2 -0
- package/dist/bigconsole/components/widgets/chart/charts/funnelData.js +11 -13
- 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/utils/fleetBindings.d.ts +49 -0
- package/dist/bigconsole/utils/fleetBindings.js +52 -0
- package/dist/bigconsole/utils/widgetBinding.js +57 -44
- package/dist/generated/wspace-operations.d.ts +109 -0
- package/dist/generated/wspace-operations.js +634 -131
- 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,107 +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
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}, [
|
|
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({
|
|
41
45
|
tone: "ok",
|
|
42
|
-
text:
|
|
43
|
-
}), (e) =>
|
|
46
|
+
text: j("bigconsole.fleet.children.nowMaster", "This board is now a master.")
|
|
47
|
+
}), (e) => J({
|
|
44
48
|
tone: "error",
|
|
45
|
-
text:
|
|
49
|
+
text: T(e, j("bigconsole.fleet.error.setMaster", "The board could not be made a master."))
|
|
46
50
|
}))), [
|
|
47
51
|
R,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
+
u,
|
|
53
|
+
Z,
|
|
54
|
+
j
|
|
55
|
+
]), pe = d(() => (J(null), Z(() => R.unsetAsMaster(u), () => J({
|
|
52
56
|
tone: "ok",
|
|
53
|
-
text:
|
|
54
|
-
}), (e) =>
|
|
57
|
+
text: j("bigconsole.fleet.children.noLongerMaster", "This board is no longer a master.")
|
|
58
|
+
}), (e) => J({
|
|
55
59
|
tone: "error",
|
|
56
|
-
text:
|
|
60
|
+
text: T(e, j("bigconsole.fleet.error.unsetMaster", "The board could not stop being a master."))
|
|
57
61
|
}))), [
|
|
58
62
|
R,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
]),
|
|
63
|
-
|
|
63
|
+
u,
|
|
64
|
+
Z,
|
|
65
|
+
j
|
|
66
|
+
]), me = d((e) => (K(null), Z(() => R.createLinkedCopy(u, e), () => {
|
|
67
|
+
U(!1), J({
|
|
64
68
|
tone: "ok",
|
|
65
|
-
text:
|
|
69
|
+
text: j("bigconsole.fleet.children.created", "\"{{name}}\" is now a linked copy.", { name: e })
|
|
66
70
|
});
|
|
67
|
-
}, (e) =>
|
|
71
|
+
}, (e) => K(T(e, j("bigconsole.fleet.error.create", "The linked copy could not be created."))))), [
|
|
68
72
|
R,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]), $ =
|
|
73
|
+
u,
|
|
74
|
+
Z,
|
|
75
|
+
j
|
|
76
|
+
]), $ = d((e) => (J(null), Z(() => R.previewPush(u, e), (t) => V({
|
|
73
77
|
phase: "preview",
|
|
74
78
|
scope: e,
|
|
75
79
|
result: t
|
|
76
|
-
}), (e) =>
|
|
80
|
+
}), (e) => J({
|
|
77
81
|
tone: "error",
|
|
78
|
-
text:
|
|
82
|
+
text: T(e, j("bigconsole.fleet.error.preview", "The preview could not be made."))
|
|
79
83
|
}))), [
|
|
80
84
|
R,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
]),
|
|
85
|
+
u,
|
|
86
|
+
Z,
|
|
87
|
+
j
|
|
88
|
+
]), he = d((e) => (J(null), Z(() => R.push(u, e), (e) => V({
|
|
85
89
|
phase: "done",
|
|
86
90
|
result: e
|
|
87
|
-
}), (e) =>
|
|
91
|
+
}), (e) => J({
|
|
88
92
|
tone: "error",
|
|
89
|
-
text:
|
|
93
|
+
text: T(e, j("bigconsole.fleet.error.push", "The push could not be made."))
|
|
90
94
|
}))), [
|
|
91
95
|
R,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
]),
|
|
96
|
+
u,
|
|
97
|
+
Z,
|
|
98
|
+
j
|
|
99
|
+
]), ge = (e) => /* @__PURE__ */ S("span", {
|
|
96
100
|
className: "flex flex-wrap items-center gap-1",
|
|
97
101
|
children: [
|
|
98
|
-
e.status === "PENDING" && /* @__PURE__ */
|
|
102
|
+
e.status === "PENDING" && /* @__PURE__ */ x("span", {
|
|
99
103
|
"data-testid": "fleet-child-pending",
|
|
100
|
-
style:
|
|
101
|
-
children:
|
|
104
|
+
style: w,
|
|
105
|
+
children: j("bigconsole.fleet.badge.pending", "Waiting for the owner's OK")
|
|
102
106
|
}),
|
|
103
|
-
e.behindMaster && /* @__PURE__ */
|
|
107
|
+
e.behindMaster && /* @__PURE__ */ x("span", {
|
|
104
108
|
"data-testid": "fleet-child-behind",
|
|
105
|
-
style:
|
|
106
|
-
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")
|
|
107
111
|
}),
|
|
108
|
-
e.openFlagCount > 0 && /* @__PURE__ */
|
|
112
|
+
e.openFlagCount > 0 && /* @__PURE__ */ x("span", {
|
|
109
113
|
"data-testid": "fleet-child-flags",
|
|
110
|
-
style:
|
|
111
|
-
children:
|
|
114
|
+
style: w,
|
|
115
|
+
children: j("bigconsole.fleet.children.flags", "{{count}} open flags", { count: e.openFlagCount })
|
|
112
116
|
}),
|
|
113
|
-
e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */
|
|
117
|
+
e.status === "ACTIVE" && !e.behindMaster && e.openFlagCount === 0 && /* @__PURE__ */ x("span", {
|
|
114
118
|
style: {
|
|
115
|
-
...
|
|
119
|
+
...C,
|
|
116
120
|
color: "var(--color-status-success-text)"
|
|
117
121
|
},
|
|
118
|
-
children:
|
|
122
|
+
children: j("bigconsole.fleet.children.inSync", "In sync")
|
|
119
123
|
})
|
|
120
124
|
]
|
|
121
125
|
});
|
|
122
|
-
return /* @__PURE__ */
|
|
123
|
-
"aria-label":
|
|
126
|
+
return /* @__PURE__ */ S("section", {
|
|
127
|
+
"aria-label": j("bigconsole.fleet.children.title", "Children"),
|
|
124
128
|
"data-testid": "fleet-children-panel",
|
|
125
129
|
className: "flex flex-col gap-form-gap",
|
|
126
130
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ S("div", {
|
|
128
132
|
className: "flex items-center justify-between gap-form-gap",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
133
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
130
134
|
className: "flex items-center gap-2",
|
|
131
135
|
style: {
|
|
132
136
|
margin: 0,
|
|
@@ -134,118 +138,118 @@ var S = {
|
|
|
134
138
|
fontSize: "var(--font-size-body)",
|
|
135
139
|
fontWeight: "var(--font-weight-semibold)"
|
|
136
140
|
},
|
|
137
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ x(g, {
|
|
138
142
|
"aria-hidden": "true",
|
|
139
143
|
style: {
|
|
140
144
|
height: "var(--size-icon-sm)",
|
|
141
145
|
width: "var(--size-icon-sm)"
|
|
142
146
|
}
|
|
143
|
-
}),
|
|
144
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), j("bigconsole.fleet.children.title", "Children")]
|
|
148
|
+
}), /* @__PURE__ */ x(v, {
|
|
145
149
|
variant: "ghost",
|
|
146
150
|
size: "sm",
|
|
147
|
-
onClick:
|
|
148
|
-
"aria-label":
|
|
149
|
-
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"),
|
|
150
154
|
"data-testid": "fleet-children-close",
|
|
151
|
-
children: /* @__PURE__ */
|
|
155
|
+
children: /* @__PURE__ */ x(_, { style: {
|
|
152
156
|
height: "var(--size-icon-sm)",
|
|
153
157
|
width: "var(--size-icon-sm)"
|
|
154
158
|
} })
|
|
155
159
|
})]
|
|
156
160
|
}),
|
|
157
|
-
|
|
158
|
-
role:
|
|
161
|
+
q && /* @__PURE__ */ x("p", {
|
|
162
|
+
role: q.tone === "error" ? "alert" : "status",
|
|
159
163
|
"data-testid": "fleet-children-message",
|
|
160
164
|
style: {
|
|
161
165
|
margin: 0,
|
|
162
|
-
color:
|
|
166
|
+
color: q.tone === "error" ? "var(--color-status-error-text)" : "var(--color-text-primary)",
|
|
163
167
|
fontSize: "var(--font-size-body-sm)"
|
|
164
168
|
},
|
|
165
|
-
children:
|
|
169
|
+
children: q.text
|
|
166
170
|
}),
|
|
167
|
-
M && !I && !P && /* @__PURE__ */
|
|
171
|
+
M && !I && !P && /* @__PURE__ */ S("div", {
|
|
168
172
|
className: "flex items-center gap-2",
|
|
169
173
|
style: { color: "var(--color-text-secondary)" },
|
|
170
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ x(y, { style: {
|
|
171
175
|
height: "var(--size-icon-sm)",
|
|
172
176
|
width: "var(--size-icon-sm)"
|
|
173
|
-
} }),
|
|
177
|
+
} }), j("bigconsole.fleet.children.loading", "Loading the copies of this board…")]
|
|
174
178
|
}),
|
|
175
|
-
!M && N && /* @__PURE__ */
|
|
179
|
+
!M && N && /* @__PURE__ */ x("p", {
|
|
176
180
|
role: "alert",
|
|
177
181
|
style: {
|
|
178
182
|
margin: 0,
|
|
179
183
|
color: "var(--color-status-error-text)"
|
|
180
184
|
},
|
|
181
|
-
children:
|
|
185
|
+
children: j("bigconsole.fleet.children.loadError", "The copies of this board could not be loaded.")
|
|
182
186
|
}),
|
|
183
|
-
!M && !N && F === "ACTIVE" && /* @__PURE__ */
|
|
184
|
-
dashboardId:
|
|
185
|
-
masterName:
|
|
186
|
-
onBoardChanged:
|
|
187
|
-
lock:
|
|
188
|
-
changeToken:
|
|
187
|
+
!M && !N && F === "ACTIVE" && /* @__PURE__ */ x(c, {
|
|
188
|
+
dashboardId: u,
|
|
189
|
+
masterName: re,
|
|
190
|
+
onBoardChanged: ie,
|
|
191
|
+
lock: Y,
|
|
192
|
+
changeToken: O
|
|
189
193
|
}),
|
|
190
|
-
!M && !N && !P && /* @__PURE__ */
|
|
194
|
+
!M && !N && !P && /* @__PURE__ */ S("div", {
|
|
191
195
|
className: "flex flex-col gap-form-gap",
|
|
192
196
|
"data-testid": "fleet-children-not-master",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ x("p", {
|
|
194
198
|
style: {
|
|
195
199
|
margin: 0,
|
|
196
200
|
color: "var(--color-text-secondary)",
|
|
197
201
|
fontSize: "var(--font-size-body-sm)"
|
|
198
202
|
},
|
|
199
|
-
children:
|
|
200
|
-
}), /* @__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, {
|
|
201
205
|
permission: t.DASHBOARD_UPDATE,
|
|
202
206
|
deniedBehavior: "hide",
|
|
203
|
-
children: /* @__PURE__ */
|
|
204
|
-
onClick:
|
|
205
|
-
disabled:
|
|
207
|
+
children: /* @__PURE__ */ S(v, {
|
|
208
|
+
onClick: fe,
|
|
209
|
+
disabled: Q,
|
|
206
210
|
"data-testid": "fleet-set-master",
|
|
207
|
-
children: [
|
|
211
|
+
children: [Q && /* @__PURE__ */ x(y, { style: {
|
|
208
212
|
height: "var(--size-icon-sm)",
|
|
209
213
|
width: "var(--size-icon-sm)"
|
|
210
|
-
} }),
|
|
214
|
+
} }), j("bigconsole.fleet.children.setMaster", "Set as master")]
|
|
211
215
|
})
|
|
212
216
|
}) })]
|
|
213
217
|
}),
|
|
214
|
-
!N && P && I && /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
218
|
+
!N && P && I && /* @__PURE__ */ S(b, { children: [
|
|
219
|
+
/* @__PURE__ */ S("p", {
|
|
216
220
|
"data-testid": "fleet-children-counts",
|
|
217
221
|
style: {
|
|
218
222
|
margin: 0,
|
|
219
223
|
color: "var(--color-text-secondary)",
|
|
220
224
|
fontSize: "var(--font-size-body-sm)"
|
|
221
225
|
},
|
|
222
|
-
children: [
|
|
226
|
+
children: [j("bigconsole.fleet.children.counts", "{{total}} copies: {{active}} active, {{pending}} waiting for an owner, {{behind}} behind the master.", {
|
|
223
227
|
total: I.total,
|
|
224
228
|
active: I.active,
|
|
225
229
|
pending: I.pending,
|
|
226
230
|
behind: I.behind
|
|
227
|
-
}), I.hiddenCount > 0 && /* @__PURE__ */
|
|
231
|
+
}), I.hiddenCount > 0 && /* @__PURE__ */ S(b, { children: [" ", j("bigconsole.fleet.children.hidden", "{{count}} you cannot open are not listed.", { count: I.hiddenCount })] })]
|
|
228
232
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ S("ul", {
|
|
230
234
|
className: "flex flex-col gap-1",
|
|
231
235
|
style: {
|
|
232
236
|
listStyle: "none",
|
|
233
237
|
margin: 0,
|
|
234
238
|
padding: 0
|
|
235
239
|
},
|
|
236
|
-
children: [I.children.length === 0 && I.total === 0 && /* @__PURE__ */
|
|
240
|
+
children: [I.children.length === 0 && I.total === 0 && /* @__PURE__ */ x("li", {
|
|
237
241
|
style: {
|
|
238
242
|
color: "var(--color-text-secondary)",
|
|
239
243
|
fontSize: "var(--font-size-body-sm)"
|
|
240
244
|
},
|
|
241
|
-
children:
|
|
242
|
-
}), I.children.map((e) => /* @__PURE__ */
|
|
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", {
|
|
243
247
|
"data-testid": "fleet-child",
|
|
244
248
|
className: "flex items-center justify-between gap-form-gap rounded-input border px-3 py-2",
|
|
245
249
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
246
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ x("button", {
|
|
247
251
|
type: "button",
|
|
248
|
-
onClick: () =>
|
|
252
|
+
onClick: () => A(e.dashboardId),
|
|
249
253
|
className: "min-w-0 truncate text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
250
254
|
style: {
|
|
251
255
|
color: "var(--color-text-primary)",
|
|
@@ -255,133 +259,153 @@ var S = {
|
|
|
255
259
|
cursor: "pointer"
|
|
256
260
|
},
|
|
257
261
|
children: e.name
|
|
258
|
-
}),
|
|
262
|
+
}), ge(e)]
|
|
259
263
|
}, e.dashboardId))]
|
|
260
264
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ S("div", {
|
|
262
266
|
className: "flex flex-wrap items-center gap-2",
|
|
263
267
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ x(h, {
|
|
265
269
|
permission: t.DASHBOARD_CREATE,
|
|
266
270
|
deniedBehavior: "hide",
|
|
267
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ x(v, {
|
|
268
272
|
variant: "outline",
|
|
269
273
|
onClick: () => {
|
|
270
|
-
|
|
274
|
+
K(null), U(!0);
|
|
271
275
|
},
|
|
272
|
-
disabled:
|
|
276
|
+
disabled: Q,
|
|
273
277
|
"data-testid": "fleet-create-copy",
|
|
274
|
-
children:
|
|
278
|
+
children: j("bigconsole.fleet.children.createCopy", "Create linked copy…")
|
|
275
279
|
})
|
|
276
280
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ x(h, {
|
|
278
282
|
permission: t.DASHBOARD_UPDATE,
|
|
279
283
|
deniedBehavior: "hide",
|
|
280
|
-
children: /* @__PURE__ */
|
|
284
|
+
children: /* @__PURE__ */ x(v, {
|
|
281
285
|
onClick: () => $("DIRECT_COPIES"),
|
|
282
|
-
disabled:
|
|
286
|
+
disabled: Q || I.total === 0 || B.phase === "preview",
|
|
283
287
|
"data-testid": "fleet-push",
|
|
284
|
-
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…")
|
|
285
300
|
})
|
|
286
301
|
}),
|
|
287
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ x(h, {
|
|
288
303
|
permission: t.DASHBOARD_UPDATE,
|
|
289
304
|
deniedBehavior: "hide",
|
|
290
|
-
children: /* @__PURE__ */
|
|
305
|
+
children: /* @__PURE__ */ x(v, {
|
|
291
306
|
variant: "ghost",
|
|
292
|
-
onClick:
|
|
293
|
-
disabled:
|
|
294
|
-
title: I.total > 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,
|
|
295
310
|
"data-testid": "fleet-unset-master",
|
|
296
|
-
children:
|
|
311
|
+
children: j("bigconsole.fleet.children.unsetMaster", "Stop being a master")
|
|
297
312
|
})
|
|
298
313
|
})
|
|
299
314
|
]
|
|
300
315
|
})
|
|
301
316
|
] }),
|
|
302
|
-
|
|
317
|
+
B.phase === "preview" && /* @__PURE__ */ S("div", {
|
|
303
318
|
className: "flex flex-col gap-form-gap rounded-input border p-3",
|
|
304
319
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
305
320
|
"data-testid": "fleet-push-preview",
|
|
306
321
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ x("strong", {
|
|
308
323
|
style: { color: "var(--color-text-primary)" },
|
|
309
|
-
children:
|
|
324
|
+
children: j("bigconsole.fleet.push.previewTitle", "Preview: nothing has been changed yet")
|
|
310
325
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ x("div", {
|
|
312
327
|
role: "radiogroup",
|
|
313
|
-
"aria-label":
|
|
328
|
+
"aria-label": j("bigconsole.fleet.push.scopeLabel", "How far to push"),
|
|
314
329
|
className: "flex flex-wrap gap-2",
|
|
315
|
-
children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */
|
|
330
|
+
children: ["DIRECT_COPIES", "ALL_UNDER"].map((e) => /* @__PURE__ */ x("button", {
|
|
316
331
|
type: "button",
|
|
317
332
|
role: "radio",
|
|
318
|
-
"aria-checked":
|
|
319
|
-
disabled:
|
|
320
|
-
onClick: () =>
|
|
333
|
+
"aria-checked": B.scope === e,
|
|
334
|
+
disabled: Q,
|
|
335
|
+
onClick: () => B.scope !== e && $(e),
|
|
321
336
|
className: "rounded-input border px-3 py-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
322
337
|
style: {
|
|
323
|
-
borderColor:
|
|
324
|
-
backgroundColor:
|
|
338
|
+
borderColor: B.scope === e ? "var(--color-action-primary-bg)" : "var(--color-border-subtle)",
|
|
339
|
+
backgroundColor: B.scope === e ? "var(--color-bg-accentSubtle)" : void 0,
|
|
325
340
|
color: "var(--color-text-primary)"
|
|
326
341
|
},
|
|
327
342
|
"data-testid": `fleet-push-scope-${e}`,
|
|
328
|
-
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")
|
|
329
344
|
}, e))
|
|
330
345
|
}),
|
|
331
|
-
/* @__PURE__ */
|
|
332
|
-
|
|
346
|
+
/* @__PURE__ */ x(l, { result: B.result }),
|
|
347
|
+
a(B.result) && /* @__PURE__ */ x("p", {
|
|
333
348
|
style: {
|
|
334
349
|
margin: 0,
|
|
335
350
|
color: "var(--color-text-secondary)",
|
|
336
351
|
fontSize: "var(--font-size-body-sm)"
|
|
337
352
|
},
|
|
338
|
-
children:
|
|
353
|
+
children: j("bigconsole.fleet.push.nothing", "Nothing to push: every copy already has what this board has.")
|
|
339
354
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ S("div", {
|
|
341
356
|
className: "flex gap-2",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
-
onClick: () =>
|
|
344
|
-
disabled:
|
|
357
|
+
children: [/* @__PURE__ */ S(v, {
|
|
358
|
+
onClick: () => he(B.scope),
|
|
359
|
+
disabled: Q || a(B.result),
|
|
345
360
|
"data-testid": "fleet-push-confirm",
|
|
346
|
-
children: [
|
|
361
|
+
children: [Q && /* @__PURE__ */ x(y, { style: {
|
|
347
362
|
height: "var(--size-icon-sm)",
|
|
348
363
|
width: "var(--size-icon-sm)"
|
|
349
|
-
} }),
|
|
350
|
-
}), /* @__PURE__ */
|
|
364
|
+
} }), j("bigconsole.fleet.push.confirm", "Push now")]
|
|
365
|
+
}), /* @__PURE__ */ x(v, {
|
|
351
366
|
variant: "outline",
|
|
352
|
-
onClick: () =>
|
|
353
|
-
disabled:
|
|
354
|
-
children:
|
|
367
|
+
onClick: () => V({ phase: "idle" }),
|
|
368
|
+
disabled: Q,
|
|
369
|
+
children: j("bigconsole.fleet.link.cancel", "Cancel")
|
|
355
370
|
})]
|
|
356
371
|
})
|
|
357
372
|
]
|
|
358
373
|
}),
|
|
359
|
-
|
|
374
|
+
B.phase === "done" && /* @__PURE__ */ S("div", {
|
|
360
375
|
className: "flex flex-col gap-form-gap rounded-input border p-3",
|
|
361
376
|
style: { borderColor: "var(--color-border-subtle)" },
|
|
362
377
|
"data-testid": "fleet-push-done",
|
|
363
378
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ x("strong", {
|
|
365
380
|
style: { color: "var(--color-text-primary)" },
|
|
366
|
-
children:
|
|
381
|
+
children: j("bigconsole.fleet.push.doneTitle", "Pushed")
|
|
367
382
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ x(l, { result: B.result }),
|
|
384
|
+
/* @__PURE__ */ x("div", { children: /* @__PURE__ */ x(v, {
|
|
370
385
|
variant: "outline",
|
|
371
|
-
onClick: () =>
|
|
372
|
-
children:
|
|
386
|
+
onClick: () => V({ phase: "idle" }),
|
|
387
|
+
children: j("bigconsole.fleet.push.done", "Done")
|
|
373
388
|
}) })
|
|
374
389
|
]
|
|
375
390
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
isOpen:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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, {
|
|
401
|
+
isOpen: H,
|
|
402
|
+
masterName: E,
|
|
403
|
+
busy: Q,
|
|
404
|
+
error: ce,
|
|
405
|
+
onClose: () => U(!1),
|
|
406
|
+
onCreate: me
|
|
383
407
|
})
|
|
384
408
|
]
|
|
385
409
|
});
|
|
386
410
|
});
|
|
387
|
-
export {
|
|
411
|
+
export { E as FleetChildrenPanel, E as default };
|