@burdenoff/microfe-bigconsole 2026.1124.8 → 2026.1124.10
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/dashboard/DashboardGalleryCard.d.ts +3 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +14 -9
- package/dist/bigconsole/components/fleet/FleetCardActions.d.ts +4 -0
- package/dist/bigconsole/components/fleet/FleetCardActions.js +49 -35
- package/dist/bigconsole/components/fleet/FleetChildrenPanel.js +270 -186
- package/dist/bigconsole/hooks/useBoardDragLink.d.ts +41 -0
- package/dist/bigconsole/hooks/useBoardDragLink.js +62 -0
- package/dist/bigconsole/pages/DashboardsPage.js +497 -403
- package/dist/bigconsole/utils/fleetDetachCopies.d.ts +26 -0
- package/dist/bigconsole/utils/fleetDetachCopies.js +28 -0
- package/dist/bigconsole/utils/fleetDrag.d.ts +56 -0
- package/dist/bigconsole/utils/fleetDrag.js +26 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { LucideIcon } from 'lucide-react';
|
|
3
3
|
import { DashboardListStatus } from '../../hooks/useDashboardOperations';
|
|
4
|
+
import { BoardDnd } from '../../hooks/useBoardDragLink';
|
|
4
5
|
import { FleetBadgeProps } from '../fleet/FleetBadge';
|
|
5
6
|
export interface DashboardCardAction {
|
|
6
7
|
id: string;
|
|
@@ -29,6 +30,8 @@ export interface DashboardGalleryCardProps {
|
|
|
29
30
|
moreLabel: string;
|
|
30
31
|
actions: readonly DashboardCardAction[];
|
|
31
32
|
onOpen: (dashboardId: string) => void;
|
|
33
|
+
/** Dragging this board onto another links it (BOFF-15410). Absent where the board cannot be moved or linked. */
|
|
34
|
+
dnd?: BoardDnd;
|
|
32
35
|
}
|
|
33
36
|
export declare const DashboardGalleryCard: FC<DashboardGalleryCardProps>;
|
|
34
37
|
export default DashboardGalleryCard;
|
|
@@ -6,13 +6,17 @@ import { Eye as i, LayoutDashboard as a, MoreHorizontal as o } from "lucide-reac
|
|
|
6
6
|
import { Button as s, DropdownMenu as c, DropdownMenuContent as l, DropdownMenuItem as u, DropdownMenuSeparator as d, DropdownMenuTrigger as f } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
8
|
// src/bigconsole/components/dashboard/DashboardGalleryCard.tsx
|
|
9
|
-
var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description: g, statusLabel: _, meta: v, fleetBadge: y, openLabel: b, moreLabel: x, actions: S, onOpen: C }) {
|
|
10
|
-
let
|
|
9
|
+
var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description: g, statusLabel: _, meta: v, fleetBadge: y, openLabel: b, moreLabel: x, actions: S, onOpen: C, dnd: w }) {
|
|
10
|
+
let T = () => C(r.id), E = S.filter((e) => !e.danger), D = S.filter((e) => e.danger);
|
|
11
11
|
return /* @__PURE__ */ m("div", {
|
|
12
12
|
...e(r.id),
|
|
13
13
|
"data-testid": "dashboard-card",
|
|
14
|
-
onClick:
|
|
15
|
-
|
|
14
|
+
onClick: T,
|
|
15
|
+
...w?.drag,
|
|
16
|
+
...w?.drop,
|
|
17
|
+
"data-dragging": w?.dragging ? "true" : void 0,
|
|
18
|
+
"data-drop-target": w?.target ? "true" : void 0,
|
|
19
|
+
className: `${w?.dragging ? "opacity-60 " : ""}${w?.target ? "ring-2 ring-[var(--color-action-primary-bg)] " : ""}group flex min-h-40 cursor-pointer flex-col gap-2.5 rounded-card border border-[var(--color-border-subtle)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)] motion-safe:transition-[box-shadow,border-color] hover:border-[var(--color-border-hover)] hover:shadow-[var(--shadow-elevation-2)]`,
|
|
16
20
|
children: [
|
|
17
21
|
/* @__PURE__ */ m("div", {
|
|
18
22
|
className: "flex items-start gap-3",
|
|
@@ -26,9 +30,10 @@ var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description:
|
|
|
26
30
|
className: "m-0 min-w-0 flex-1 pt-0.5 text-base font-semibold leading-snug text-text-primary",
|
|
27
31
|
children: /* @__PURE__ */ p("button", {
|
|
28
32
|
type: "button",
|
|
33
|
+
"data-drag-through": "",
|
|
29
34
|
className: "line-clamp-2 max-w-full text-start hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
30
35
|
onClick: (e) => {
|
|
31
|
-
e.stopPropagation(),
|
|
36
|
+
e.stopPropagation(), T();
|
|
32
37
|
},
|
|
33
38
|
children: r.name
|
|
34
39
|
})
|
|
@@ -56,7 +61,7 @@ var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description:
|
|
|
56
61
|
align: "end",
|
|
57
62
|
className: "min-w-52",
|
|
58
63
|
children: [
|
|
59
|
-
|
|
64
|
+
E.map((e) => /* @__PURE__ */ m(u, {
|
|
60
65
|
disabled: e.disabled,
|
|
61
66
|
onSelect: e.onSelect,
|
|
62
67
|
"data-testid": e.testId,
|
|
@@ -65,8 +70,8 @@ var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description:
|
|
|
65
70
|
"aria-hidden": "true"
|
|
66
71
|
}), e.label]
|
|
67
72
|
}, e.id)),
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
D.length > 0 && E.length > 0 && /* @__PURE__ */ p(d, {}),
|
|
74
|
+
D.map((e) => /* @__PURE__ */ m(u, {
|
|
70
75
|
disabled: e.disabled,
|
|
71
76
|
onSelect: e.onSelect,
|
|
72
77
|
"data-testid": e.testId,
|
|
@@ -108,7 +113,7 @@ var h = (e) => e.stopPropagation(), g = r(function({ dashboard: r, description:
|
|
|
108
113
|
size: "sm",
|
|
109
114
|
className: "ms-auto",
|
|
110
115
|
onClick: (e) => {
|
|
111
|
-
e.stopPropagation(),
|
|
116
|
+
e.stopPropagation(), T();
|
|
112
117
|
},
|
|
113
118
|
children: [/* @__PURE__ */ p(i, {
|
|
114
119
|
className: "size-4",
|
|
@@ -12,6 +12,10 @@ export interface FleetCardActionsProps {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
onAccept?: (event: MouseEvent) => void;
|
|
14
14
|
onDecline?: (event: MouseEvent) => void;
|
|
15
|
+
/** The board is already a master: "Set as master" is not offered. */
|
|
16
|
+
isMaster?: boolean;
|
|
17
|
+
/** Makes the board a master, so other boards can follow it. Offered for a board that follows nothing. */
|
|
18
|
+
onSetMaster?: (event: MouseEvent) => void;
|
|
15
19
|
}
|
|
16
20
|
export declare const FleetCardActions: FC<FleetCardActionsProps>;
|
|
17
21
|
export default FleetCardActions;
|
|
@@ -2,52 +2,52 @@ import { BIGCONSOLE_PERMISSIONS as e } from "../../../constants/permissions.js";
|
|
|
2
2
|
import { useTr as t } from "../../../shared/hooks/useTr.js";
|
|
3
3
|
import { memo as n } from "react";
|
|
4
4
|
import { PermissionButton as r } from "@burdenoff/fe-libs/shared/components";
|
|
5
|
-
import { Check as i, Link2 as a,
|
|
6
|
-
import { Button as
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { Check as i, Link2 as a, Network as o, Unlink as s, X as c } from "lucide-react";
|
|
6
|
+
import { Button as l } from "@burdenoff/fe-libs/ui";
|
|
7
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
// src/bigconsole/components/fleet/FleetCardActions.tsx
|
|
9
|
-
var
|
|
9
|
+
var p = {
|
|
10
10
|
height: "var(--size-controlHeight-md)",
|
|
11
11
|
width: "var(--size-controlHeight-md)",
|
|
12
12
|
padding: 0,
|
|
13
13
|
borderRadius: "var(--radius-button)"
|
|
14
|
-
},
|
|
15
|
-
let
|
|
16
|
-
if (!
|
|
17
|
-
if (
|
|
18
|
-
let t =
|
|
19
|
-
return /* @__PURE__ */
|
|
14
|
+
}, m = n(function({ linked: n, onLink: m, onDetach: h, awaitingAnswer: g = !1, ready: _ = !0, disabled: v = !1, onAccept: y, onDecline: b, isMaster: x = !1, onSetMaster: S }) {
|
|
15
|
+
let C = t();
|
|
16
|
+
if (!_) return null;
|
|
17
|
+
if (g) {
|
|
18
|
+
let t = C("bigconsole.fleet.action.accept", "Accept link request"), n = C("bigconsole.fleet.action.decline", "Decline link request");
|
|
19
|
+
return /* @__PURE__ */ d(r, {
|
|
20
20
|
permission: e.DASHBOARD_UPDATE,
|
|
21
21
|
deniedBehavior: "hide",
|
|
22
|
-
children: /* @__PURE__ */
|
|
22
|
+
children: /* @__PURE__ */ f("span", {
|
|
23
23
|
style: {
|
|
24
24
|
display: "inline-flex",
|
|
25
25
|
alignItems: "center",
|
|
26
26
|
gap: "var(--space-controlGap)"
|
|
27
27
|
},
|
|
28
|
-
children: [/* @__PURE__ */ l
|
|
28
|
+
children: [/* @__PURE__ */ d(l, {
|
|
29
29
|
variant: "ghost",
|
|
30
30
|
size: "sm",
|
|
31
|
-
onClick:
|
|
32
|
-
disabled:
|
|
31
|
+
onClick: y,
|
|
32
|
+
disabled: v,
|
|
33
33
|
"aria-label": t,
|
|
34
34
|
title: t,
|
|
35
35
|
"data-testid": "fleet-accept",
|
|
36
|
-
style:
|
|
37
|
-
children: /* @__PURE__ */
|
|
36
|
+
style: p,
|
|
37
|
+
children: /* @__PURE__ */ d(i, { style: {
|
|
38
38
|
height: "var(--size-icon-sm)",
|
|
39
39
|
width: "var(--size-icon-sm)"
|
|
40
40
|
} })
|
|
41
|
-
}), /* @__PURE__ */ l
|
|
41
|
+
}), /* @__PURE__ */ d(l, {
|
|
42
42
|
variant: "ghost",
|
|
43
43
|
size: "sm",
|
|
44
|
-
onClick:
|
|
45
|
-
disabled:
|
|
44
|
+
onClick: b,
|
|
45
|
+
disabled: v,
|
|
46
46
|
"aria-label": n,
|
|
47
47
|
title: n,
|
|
48
48
|
"data-testid": "fleet-decline",
|
|
49
|
-
style:
|
|
50
|
-
children: /* @__PURE__ */
|
|
49
|
+
style: p,
|
|
50
|
+
children: /* @__PURE__ */ d(c, { style: {
|
|
51
51
|
height: "var(--size-icon-sm)",
|
|
52
52
|
width: "var(--size-icon-sm)"
|
|
53
53
|
} })
|
|
@@ -55,24 +55,38 @@ var d = {
|
|
|
55
55
|
})
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
let
|
|
59
|
-
|
|
58
|
+
let w = n ? C("bigconsole.fleet.action.detach", "Detach from master") : C("bigconsole.fleet.action.link", "Link to master…"), T = C("bigconsole.fleet.action.setMaster", "Set as master"), E = {
|
|
59
|
+
height: "var(--size-icon-sm)",
|
|
60
|
+
width: "var(--size-icon-sm)"
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ f(u, { children: [!n && !x && S && /* @__PURE__ */ d(r, {
|
|
60
63
|
permission: e.DASHBOARD_UPDATE,
|
|
61
64
|
deniedBehavior: "hide",
|
|
62
|
-
children: /* @__PURE__ */ l
|
|
65
|
+
children: /* @__PURE__ */ d(l, {
|
|
63
66
|
variant: "ghost",
|
|
64
67
|
size: "sm",
|
|
65
|
-
onClick:
|
|
66
|
-
disabled:
|
|
67
|
-
"aria-label":
|
|
68
|
-
title:
|
|
68
|
+
onClick: S,
|
|
69
|
+
disabled: v,
|
|
70
|
+
"aria-label": T,
|
|
71
|
+
title: T,
|
|
72
|
+
"data-testid": "fleet-set-master-card",
|
|
73
|
+
style: p,
|
|
74
|
+
children: /* @__PURE__ */ d(o, { style: E })
|
|
75
|
+
})
|
|
76
|
+
}), /* @__PURE__ */ d(r, {
|
|
77
|
+
permission: e.DASHBOARD_UPDATE,
|
|
78
|
+
deniedBehavior: "hide",
|
|
79
|
+
children: /* @__PURE__ */ d(l, {
|
|
80
|
+
variant: "ghost",
|
|
81
|
+
size: "sm",
|
|
82
|
+
onClick: n ? h : m,
|
|
83
|
+
disabled: v,
|
|
84
|
+
"aria-label": w,
|
|
85
|
+
title: w,
|
|
69
86
|
"data-testid": n ? "fleet-detach" : "fleet-link",
|
|
70
|
-
style:
|
|
71
|
-
children:
|
|
72
|
-
height: "var(--size-icon-sm)",
|
|
73
|
-
width: "var(--size-icon-sm)"
|
|
74
|
-
} })
|
|
87
|
+
style: p,
|
|
88
|
+
children: d(n ? s : a, { style: E })
|
|
75
89
|
})
|
|
76
|
-
});
|
|
90
|
+
})] });
|
|
77
91
|
});
|
|
78
|
-
export {
|
|
92
|
+
export { m as FleetCardActions, m as default };
|