@burdenoff/microfe-planmagnet 2026.930.7 → 2026.930.9
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/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +126 -120
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +83 -75
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/board/BoardViewBar.d.ts +27 -0
- package/dist/planmagnet/board/BoardViewBar.d.ts.map +1 -0
- package/dist/planmagnet/board/BoardViewBar.js +684 -0
- package/dist/planmagnet/board/BoardViewBar.js.map +1 -0
- package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
- package/dist/planmagnet/board/ProjectBoard.js +440 -345
- package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
- package/dist/planmagnet/board/boardViewConfig.d.ts +144 -0
- package/dist/planmagnet/board/boardViewConfig.d.ts.map +1 -0
- package/dist/planmagnet/board/boardViewConfig.js +265 -0
- package/dist/planmagnet/board/boardViewConfig.js.map +1 -0
- package/dist/planmagnet/controls/ConfirmButton.d.ts +3 -1
- package/dist/planmagnet/controls/ConfirmButton.d.ts.map +1 -1
- package/dist/planmagnet/controls/ConfirmButton.js +2 -1
- package/dist/planmagnet/controls/ConfirmButton.js.map +1 -1
- package/dist/planmagnet/dependency/DependencyGraph.d.ts +43 -0
- package/dist/planmagnet/dependency/DependencyGraph.d.ts.map +1 -0
- package/dist/planmagnet/dependency/DependencyGraph.js +225 -0
- package/dist/planmagnet/dependency/DependencyGraph.js.map +1 -0
- package/dist/planmagnet/dependency/DependencyPanel.d.ts.map +1 -1
- package/dist/planmagnet/dependency/DependencyPanel.js +136 -90
- package/dist/planmagnet/dependency/DependencyPanel.js.map +1 -1
- package/dist/planmagnet/dependency/GanttChart.d.ts +40 -0
- package/dist/planmagnet/dependency/GanttChart.d.ts.map +1 -0
- package/dist/planmagnet/dependency/GanttChart.js +326 -0
- package/dist/planmagnet/dependency/GanttChart.js.map +1 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.d.ts +40 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.d.ts.map +1 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.js +106 -0
- package/dist/planmagnet/dependency/useProjectWorkItemsGraph.js.map +1 -0
- package/dist/planmagnet/milestones/MilestoneControls.js +1 -1
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +169 -100
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsGanttPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.js +143 -0
- package/dist/planmagnet/pages/ProjectsGanttPagePage.js.map +1 -0
- package/dist/planmagnet/utils/rowNavigation.d.ts +7 -2
- package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -1
- package/dist/planmagnet/utils/rowNavigation.js.map +1 -1
- package/dist/planmagnet/utils/statusColor.d.ts +26 -0
- package/dist/planmagnet/utils/statusColor.d.ts.map +1 -0
- package/dist/planmagnet/utils/statusColor.js +51 -0
- package/dist/planmagnet/utils/statusColor.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,15 +2,19 @@ import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/Pla
|
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
3
|
import { throwOnError as r } from "../utils/mutationResult.js";
|
|
4
4
|
import { allowedTargets as i, useProjectWorkflow as a, workflowLabel as o } from "../hooks/useProjectWorkflow.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { enumLabel as s } from "../controls/WorkItemControls.js";
|
|
6
|
+
import { useProjectMilestones as c } from "../milestones/MilestoneControls.js";
|
|
7
|
+
import { BulkActionsBar as l } from "./BulkActions.js";
|
|
8
|
+
import { useProjectSprintOptions as u } from "./boardViewConfig.js";
|
|
9
|
+
import { BoardViewBar as d } from "./BoardViewBar.js";
|
|
10
|
+
import { createContext as f, useContext as p, useState as m } from "react";
|
|
11
|
+
import { ChevronLeft as h, ChevronRight as g, LayoutGrid as _, Pencil as v, Plus as y } from "lucide-react";
|
|
12
|
+
import { gql as b } from "@apollo/client";
|
|
13
|
+
import { useApolloClient as x, useMutation as S, useQuery as C } from "@apollo/client/react";
|
|
14
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
15
|
+
import { AlertDialog as E, AlertDialogAction as D, AlertDialogCancel as O, AlertDialogContent as ee, AlertDialogDescription as k, AlertDialogFooter as A, AlertDialogHeader as j, AlertDialogTitle as M, AlertDialogTrigger as N, Badge as P, Button as F, Card as te, CardContent as I, Input as L, ResponsiveDialog as R, ResponsiveDialogContent as ne, ResponsiveDialogDescription as z, ResponsiveDialogFooter as B, ResponsiveDialogHeader as re, ResponsiveDialogTitle as ie, ResponsiveDialogTrigger as ae } from "@burdenoff/fe-libs/ui";
|
|
12
16
|
//#region src/planmagnet/board/ProjectBoard.tsx
|
|
13
|
-
var
|
|
17
|
+
var V = [
|
|
14
18
|
"BACKLOG",
|
|
15
19
|
"TODO",
|
|
16
20
|
"IN_PROGRESS",
|
|
@@ -18,10 +22,10 @@ var F = [
|
|
|
18
22
|
"TESTING",
|
|
19
23
|
"DONE",
|
|
20
24
|
"CANCELLED"
|
|
21
|
-
],
|
|
22
|
-
let e =
|
|
25
|
+
], H = f(null), U = () => {
|
|
26
|
+
let e = p(H);
|
|
23
27
|
return (t) => o(e, t);
|
|
24
|
-
},
|
|
28
|
+
}, W = 100, oe = b`
|
|
25
29
|
query ProjectBoards($workspaceId: ID!, $projectId: String) {
|
|
26
30
|
planmagnetBoards(
|
|
27
31
|
workspaceId: $workspaceId
|
|
@@ -35,31 +39,32 @@ var F = [
|
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
`,
|
|
39
|
-
query ProjectBoardColumnPage(
|
|
42
|
+
`, G = "\n id\n key\n title\n status\n type\n priority\n storyPoints\n assigneeId\n statusSince\n dueDate\n labels\n sprintId\n milestoneId\n parentId\n parent {\n id\n title\n }\n", se = b`
|
|
43
|
+
query ProjectBoardColumnPage(
|
|
44
|
+
$boardId: ID!
|
|
45
|
+
$columnId: ID!
|
|
46
|
+
$after: String
|
|
47
|
+
$filter: PlanmagnetBoardCardFilter
|
|
48
|
+
$sort: PlanmagnetBoardCardSort
|
|
49
|
+
) {
|
|
40
50
|
planmagnetBoardColumnCards(
|
|
41
51
|
boardId: $boardId
|
|
42
52
|
columnId: $columnId
|
|
43
53
|
pagination: { first: 100, after: $after }
|
|
54
|
+
filter: $filter
|
|
55
|
+
sort: $sort
|
|
44
56
|
) {
|
|
45
57
|
pageInfo {
|
|
46
58
|
hasNextPage
|
|
47
59
|
endCursor
|
|
48
60
|
}
|
|
49
61
|
items {
|
|
50
|
-
|
|
51
|
-
key
|
|
52
|
-
title
|
|
53
|
-
status
|
|
54
|
-
priority
|
|
55
|
-
storyPoints
|
|
56
|
-
assigneeId
|
|
57
|
-
statusSince
|
|
62
|
+
${G}
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
|
-
`,
|
|
62
|
-
query ProjectBoard($id: ID
|
|
66
|
+
`, K = b`
|
|
67
|
+
query ProjectBoard($id: ID!, $filter: PlanmagnetBoardCardFilter, $sort: PlanmagnetBoardCardSort) {
|
|
63
68
|
planmagnetBoard(id: $id) {
|
|
64
69
|
id
|
|
65
70
|
name
|
|
@@ -70,135 +75,183 @@ var F = [
|
|
|
70
75
|
mappedStatus
|
|
71
76
|
wipLimit
|
|
72
77
|
sortOrder
|
|
73
|
-
|
|
78
|
+
itemCount
|
|
79
|
+
cards(pagination: { first: 100 }, filter: $filter, sort: $sort) {
|
|
74
80
|
totalCount
|
|
75
81
|
pageInfo {
|
|
76
82
|
hasNextPage
|
|
77
83
|
endCursor
|
|
78
84
|
}
|
|
79
85
|
items {
|
|
80
|
-
|
|
81
|
-
key
|
|
82
|
-
title
|
|
83
|
-
status
|
|
84
|
-
priority
|
|
85
|
-
storyPoints
|
|
86
|
-
assigneeId
|
|
87
|
-
statusSince
|
|
86
|
+
${G}
|
|
88
87
|
}
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
|
-
`,
|
|
92
|
+
`, ce = b`
|
|
94
93
|
mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {
|
|
95
94
|
planmagnetMoveCard(boardId: $boardId, input: $input) {
|
|
96
95
|
id
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
|
-
`,
|
|
98
|
+
`, le = b`
|
|
100
99
|
mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {
|
|
101
100
|
planmagnetCreateBoard(input: $input) {
|
|
102
101
|
id
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
|
-
`,
|
|
104
|
+
`, q = b`
|
|
106
105
|
mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {
|
|
107
106
|
planmagnetCreateBoardColumn(input: $input) {
|
|
108
107
|
id
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
|
-
`,
|
|
110
|
+
`, J = b`
|
|
112
111
|
mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {
|
|
113
112
|
planmagnetUpdateBoardColumn(id: $id, input: $input) {
|
|
114
113
|
id
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
|
-
`,
|
|
116
|
+
`, ue = b`
|
|
118
117
|
mutation ProjectBoardDeleteColumn($id: ID!) {
|
|
119
118
|
planmagnetDeleteBoardColumn(id: $id)
|
|
120
119
|
}
|
|
121
|
-
`,
|
|
120
|
+
`, de = b`
|
|
122
121
|
mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {
|
|
123
122
|
planmagnetReorderColumns(boardId: $boardId, input: $input) {
|
|
124
123
|
id
|
|
125
124
|
}
|
|
126
125
|
}
|
|
127
|
-
`,
|
|
126
|
+
`, Y = [
|
|
128
127
|
"ProjectBoard",
|
|
129
128
|
"ProjectBoards",
|
|
130
129
|
"GetWorkItems",
|
|
131
130
|
"GetWorkItemCounts",
|
|
132
131
|
"GetDashboardData"
|
|
133
|
-
],
|
|
132
|
+
], X = [
|
|
134
133
|
"CRITICAL",
|
|
135
134
|
"HIGH",
|
|
136
135
|
"MEDIUM",
|
|
137
136
|
"LOW",
|
|
138
137
|
"NONE"
|
|
139
|
-
],
|
|
140
|
-
function
|
|
141
|
-
return e ? Math.max(0, Math.floor((t - new Date(e).getTime()) /
|
|
138
|
+
], fe = 864e5;
|
|
139
|
+
function pe(e, t) {
|
|
140
|
+
return e ? Math.max(0, Math.floor((t - new Date(e).getTime()) / fe)) : null;
|
|
142
141
|
}
|
|
143
|
-
function
|
|
142
|
+
function me(e) {
|
|
144
143
|
return e >= 14 ? "text-destructive font-medium" : e >= 7 ? "text-status-warning-text" : "text-muted-foreground";
|
|
145
144
|
}
|
|
146
145
|
function Z(e, t) {
|
|
147
|
-
|
|
146
|
+
switch (t) {
|
|
147
|
+
case "ASSIGNEE": return e.assigneeId ?? "";
|
|
148
|
+
case "PRIORITY": return e.priority || "NONE";
|
|
149
|
+
case "TYPE": return e.type || "";
|
|
150
|
+
case "EPIC": return e.parentId ?? "";
|
|
151
|
+
case "SPRINT": return e.sprintId ?? "";
|
|
152
|
+
case "MILESTONE": return e.milestoneId ?? "";
|
|
153
|
+
default: return "";
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function he(e, t, r, i, a) {
|
|
157
|
+
if (!e) return t === "ASSIGNEE" ? "Unassigned" : `(No ${ge[t] ?? "value"})`;
|
|
158
|
+
switch (t) {
|
|
159
|
+
case "ASSIGNEE": return /* @__PURE__ */ w(n, { id: e });
|
|
160
|
+
case "PRIORITY":
|
|
161
|
+
case "TYPE": return s(e);
|
|
162
|
+
case "EPIC": {
|
|
163
|
+
let t = r.find((t) => t.parentId === e)?.parent;
|
|
164
|
+
return t ? t.title : e;
|
|
165
|
+
}
|
|
166
|
+
case "SPRINT": {
|
|
167
|
+
let t = i.find((t) => t.id === e);
|
|
168
|
+
return t ? t.name : e;
|
|
169
|
+
}
|
|
170
|
+
case "MILESTONE": {
|
|
171
|
+
let t = a.find((t) => t.id === e);
|
|
172
|
+
return t ? t.name : e;
|
|
173
|
+
}
|
|
174
|
+
default: return e;
|
|
175
|
+
}
|
|
148
176
|
}
|
|
149
|
-
var
|
|
177
|
+
var ge = {
|
|
178
|
+
PRIORITY: "priority",
|
|
179
|
+
TYPE: "type",
|
|
180
|
+
EPIC: "epic",
|
|
181
|
+
SPRINT: "sprint",
|
|
182
|
+
MILESTONE: "milestone"
|
|
183
|
+
}, Q = (e, t) => e instanceof Error ? e.message : t;
|
|
150
184
|
function $({ message: e }) {
|
|
151
|
-
return /* @__PURE__ */
|
|
185
|
+
return /* @__PURE__ */ w("p", {
|
|
152
186
|
role: "alert",
|
|
153
187
|
className: "text-sm text-destructive",
|
|
154
188
|
children: e
|
|
155
189
|
});
|
|
156
190
|
}
|
|
157
|
-
function
|
|
158
|
-
let { workspaceId: i } = e(), o =
|
|
191
|
+
function _e({ projectId: t, projectName: n }) {
|
|
192
|
+
let { workspaceId: i } = e(), o = x(), [s, f] = m(null), [p, h] = m(null), [g] = m(() => Date.now()), [v, b] = m({
|
|
193
|
+
filter: void 0,
|
|
194
|
+
sort: {
|
|
195
|
+
field: "RANK",
|
|
196
|
+
direction: "ASC"
|
|
197
|
+
},
|
|
198
|
+
groupBy: "NONE",
|
|
199
|
+
visibleFields: [
|
|
200
|
+
"KEY",
|
|
201
|
+
"ASSIGNEE",
|
|
202
|
+
"STORY_POINTS"
|
|
203
|
+
],
|
|
204
|
+
filterActive: !1
|
|
205
|
+
}), E = u(i, t), D = c(t), [O, ee] = m({
|
|
159
206
|
key: null,
|
|
160
207
|
byColumn: {}
|
|
161
|
-
}), [
|
|
208
|
+
}), [k, A] = m(null), [j, M] = m(/* @__PURE__ */ new Set()), N = (e) => M((t) => {
|
|
162
209
|
let n = new Set(t);
|
|
163
210
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
164
|
-
}),
|
|
211
|
+
}), P = () => M(/* @__PURE__ */ new Set()), L = a(t), { data: R, loading: ne } = C(oe, {
|
|
165
212
|
variables: {
|
|
166
213
|
workspaceId: i,
|
|
167
214
|
projectId: t
|
|
168
215
|
},
|
|
169
216
|
skip: !i
|
|
170
|
-
}),
|
|
171
|
-
|
|
172
|
-
let { data:
|
|
173
|
-
variables: {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
217
|
+
}), z = R?.planmagnetBoards.items ?? [], B = (s && z.some((e) => e.id === s) ? s : null) ?? z.find((e) => e.isDefault)?.id ?? z[0]?.id ?? null, [re, ie] = m(B);
|
|
218
|
+
re !== B && (ie(B), M(/* @__PURE__ */ new Set()));
|
|
219
|
+
let { data: ae, previousData: V, loading: U } = C(K, {
|
|
220
|
+
variables: {
|
|
221
|
+
id: B,
|
|
222
|
+
filter: v.filter,
|
|
223
|
+
sort: v.sort
|
|
224
|
+
},
|
|
225
|
+
skip: !B
|
|
226
|
+
}), W = ae?.planmagnetBoard ?? V?.planmagnetBoard ?? null, G = O.key === W ? O.byColumn : {}, q = (e) => {
|
|
227
|
+
let t = G[e.id];
|
|
177
228
|
return {
|
|
178
229
|
items: t ? [...e.cards.items, ...t.items] : e.cards.items,
|
|
179
230
|
pageInfo: t ? t.pageInfo : e.cards.pageInfo,
|
|
180
231
|
totalCount: e.cards.totalCount
|
|
181
232
|
};
|
|
182
|
-
},
|
|
183
|
-
let t =
|
|
184
|
-
if (!(!
|
|
185
|
-
|
|
233
|
+
}, J = async (e) => {
|
|
234
|
+
let t = q(e).pageInfo.endCursor;
|
|
235
|
+
if (!(!W || !t)) {
|
|
236
|
+
h(null), A(e.id);
|
|
186
237
|
try {
|
|
187
238
|
let n = await o.query({
|
|
188
|
-
query:
|
|
239
|
+
query: se,
|
|
189
240
|
variables: {
|
|
190
|
-
boardId:
|
|
241
|
+
boardId: W.id,
|
|
191
242
|
columnId: e.id,
|
|
192
|
-
after: t
|
|
243
|
+
after: t,
|
|
244
|
+
filter: v.filter,
|
|
245
|
+
sort: v.sort
|
|
193
246
|
},
|
|
194
247
|
fetchPolicy: "network-only"
|
|
195
248
|
}), r = n.data?.planmagnetBoardColumnCards;
|
|
196
249
|
if (!r) throw Error(n.error?.message ?? "The next cards could not be loaded.");
|
|
197
|
-
let i =
|
|
198
|
-
|
|
199
|
-
key:
|
|
250
|
+
let i = G[e.id]?.items ?? [];
|
|
251
|
+
ee({
|
|
252
|
+
key: W,
|
|
200
253
|
byColumn: {
|
|
201
|
-
...
|
|
254
|
+
...G,
|
|
202
255
|
[e.id]: {
|
|
203
256
|
items: [...i, ...r.items],
|
|
204
257
|
pageInfo: r.pageInfo
|
|
@@ -206,241 +259,266 @@ function ue({ projectId: t, projectName: n }) {
|
|
|
206
259
|
}
|
|
207
260
|
});
|
|
208
261
|
} catch (e) {
|
|
209
|
-
|
|
262
|
+
h(Q(e, "The next cards could not be loaded."));
|
|
210
263
|
} finally {
|
|
211
|
-
|
|
264
|
+
A(null);
|
|
212
265
|
}
|
|
213
266
|
}
|
|
214
|
-
}, [
|
|
215
|
-
refetchQueries:
|
|
267
|
+
}, [ue, X] = S(le, {
|
|
268
|
+
refetchQueries: Y,
|
|
216
269
|
awaitRefetchQueries: !0
|
|
217
|
-
}), [
|
|
218
|
-
refetchQueries:
|
|
270
|
+
}), [fe, pe] = S(ce, {
|
|
271
|
+
refetchQueries: Y,
|
|
219
272
|
awaitRefetchQueries: !0
|
|
220
|
-
}), [
|
|
221
|
-
refetchQueries:
|
|
273
|
+
}), [me] = S(de, {
|
|
274
|
+
refetchQueries: Y,
|
|
222
275
|
awaitRefetchQueries: !0
|
|
223
|
-
}),
|
|
224
|
-
|
|
276
|
+
}), Z = async (e, t) => {
|
|
277
|
+
h(null);
|
|
225
278
|
try {
|
|
226
279
|
await r(e());
|
|
227
280
|
} catch (e) {
|
|
228
|
-
|
|
281
|
+
h(Q(e, t));
|
|
229
282
|
}
|
|
230
|
-
},
|
|
231
|
-
boardId:
|
|
283
|
+
}, he = (e, t) => Z(() => fe({ variables: {
|
|
284
|
+
boardId: B,
|
|
232
285
|
input: {
|
|
233
286
|
workItemId: e,
|
|
234
287
|
targetColumnId: t
|
|
235
288
|
}
|
|
236
|
-
} }), "The card could not be moved."),
|
|
237
|
-
if (!
|
|
238
|
-
let n =
|
|
239
|
-
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]],
|
|
240
|
-
boardId:
|
|
289
|
+
} }), "The card could not be moved."), ge = (e, t) => {
|
|
290
|
+
if (!W) return;
|
|
291
|
+
let n = W.columns.map((e) => e.id), r = e + t;
|
|
292
|
+
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]], Z(() => me({ variables: {
|
|
293
|
+
boardId: B,
|
|
241
294
|
input: { columnIds: n }
|
|
242
295
|
} }), "The columns could not be reordered.");
|
|
243
296
|
};
|
|
244
|
-
return
|
|
297
|
+
return ne && !R ? /* @__PURE__ */ w("p", {
|
|
245
298
|
className: "text-sm text-muted-foreground p-4",
|
|
246
299
|
children: "Loading board…"
|
|
247
|
-
}) :
|
|
248
|
-
value:
|
|
249
|
-
children: /* @__PURE__ */
|
|
300
|
+
}) : B ? /* @__PURE__ */ w(H.Provider, {
|
|
301
|
+
value: L,
|
|
302
|
+
children: /* @__PURE__ */ T("div", {
|
|
250
303
|
className: "space-y-3",
|
|
251
304
|
"data-testid": "project-board",
|
|
252
305
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ T("div", {
|
|
254
307
|
className: "flex flex-wrap items-center gap-3",
|
|
255
308
|
children: [
|
|
256
|
-
|
|
309
|
+
z.length > 1 && /* @__PURE__ */ w("select", {
|
|
257
310
|
"aria-label": "Board",
|
|
258
311
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
261
|
-
children:
|
|
312
|
+
value: B,
|
|
313
|
+
onChange: (e) => f(e.target.value),
|
|
314
|
+
children: z.map((e) => /* @__PURE__ */ w("option", {
|
|
262
315
|
value: e.id,
|
|
263
316
|
children: e.name
|
|
264
317
|
}, e.id))
|
|
265
318
|
}),
|
|
266
|
-
|
|
267
|
-
className: "flex items-center gap-1 text-sm",
|
|
268
|
-
children: [/* @__PURE__ */ b("span", {
|
|
269
|
-
className: "text-muted-foreground",
|
|
270
|
-
children: "Swimlanes"
|
|
271
|
-
}), /* @__PURE__ */ x("select", {
|
|
272
|
-
"aria-label": "Swimlanes",
|
|
273
|
-
"data-testid": "board-lanes",
|
|
274
|
-
className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
275
|
-
value: g,
|
|
276
|
-
onChange: (e) => ee(e.target.value),
|
|
277
|
-
children: [
|
|
278
|
-
/* @__PURE__ */ b("option", {
|
|
279
|
-
value: "none",
|
|
280
|
-
children: "None"
|
|
281
|
-
}),
|
|
282
|
-
/* @__PURE__ */ b("option", {
|
|
283
|
-
value: "assignee",
|
|
284
|
-
children: "By assignee"
|
|
285
|
-
}),
|
|
286
|
-
/* @__PURE__ */ b("option", {
|
|
287
|
-
value: "priority",
|
|
288
|
-
children: "By priority"
|
|
289
|
-
})
|
|
290
|
-
]
|
|
291
|
-
})]
|
|
292
|
-
}),
|
|
293
|
-
L && L.unplacedCount > 0 && /* @__PURE__ */ x("p", {
|
|
319
|
+
W && W.unplacedCount > 0 && /* @__PURE__ */ T("p", {
|
|
294
320
|
className: "text-xs text-muted-foreground",
|
|
295
321
|
"data-testid": "board-unplaced",
|
|
296
322
|
children: [
|
|
297
|
-
|
|
323
|
+
W.unplacedCount,
|
|
298
324
|
" work item",
|
|
299
|
-
|
|
325
|
+
W.unplacedCount === 1 ? " is" : "s are",
|
|
300
326
|
" not on this board: ",
|
|
301
|
-
|
|
327
|
+
W.unplacedCount === 1 ? "its status has" : "their status has",
|
|
302
328
|
" no column."
|
|
303
329
|
]
|
|
304
330
|
}),
|
|
305
|
-
|
|
331
|
+
W && /* @__PURE__ */ w("div", {
|
|
306
332
|
className: "ml-auto",
|
|
307
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ w(we, { boardId: W.id })
|
|
308
334
|
})
|
|
309
335
|
]
|
|
310
336
|
}),
|
|
311
|
-
|
|
312
|
-
|
|
337
|
+
/* @__PURE__ */ w(d, {
|
|
338
|
+
projectId: t,
|
|
339
|
+
boardId: B,
|
|
340
|
+
onSelectBoard: f,
|
|
341
|
+
sprintOptions: E.options,
|
|
342
|
+
milestoneOptions: D.options,
|
|
343
|
+
onStateChange: b
|
|
344
|
+
}),
|
|
345
|
+
p && /* @__PURE__ */ w($, { message: p }),
|
|
346
|
+
W && j.size > 0 && /* @__PURE__ */ w(l, {
|
|
313
347
|
projectId: t,
|
|
314
|
-
selectedIds: [...
|
|
315
|
-
workflow:
|
|
316
|
-
onDone:
|
|
348
|
+
selectedIds: [...j],
|
|
349
|
+
workflow: L,
|
|
350
|
+
onDone: P
|
|
317
351
|
}),
|
|
318
|
-
|
|
352
|
+
U && !W ? /* @__PURE__ */ w("p", {
|
|
319
353
|
className: "text-sm text-muted-foreground p-4",
|
|
320
354
|
children: "Loading board…"
|
|
321
|
-
}) :
|
|
322
|
-
board:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
355
|
+
}) : W && v.groupBy !== "NONE" ? /* @__PURE__ */ w(xe, {
|
|
356
|
+
board: W,
|
|
357
|
+
groupBy: v.groupBy,
|
|
358
|
+
visibleFields: v.visibleFields,
|
|
359
|
+
filterActive: v.filterActive,
|
|
360
|
+
sprintOptions: E.options,
|
|
361
|
+
milestoneOptions: D.options,
|
|
362
|
+
cardsOf: q,
|
|
363
|
+
now: g,
|
|
364
|
+
busy: pe.loading,
|
|
365
|
+
loadingMore: k,
|
|
366
|
+
selected: j,
|
|
367
|
+
onToggleSelect: N,
|
|
368
|
+
onLoadMore: (e) => void J(e),
|
|
369
|
+
onMove: he
|
|
370
|
+
}) : /* @__PURE__ */ T("div", {
|
|
333
371
|
className: "flex gap-3 overflow-x-auto pb-2",
|
|
334
|
-
children: [
|
|
335
|
-
boardId:
|
|
372
|
+
children: [W?.columns.map((e, t) => /* @__PURE__ */ w(Ce, {
|
|
373
|
+
boardId: W.id,
|
|
336
374
|
column: e,
|
|
337
|
-
columns:
|
|
338
|
-
cards:
|
|
375
|
+
columns: W.columns,
|
|
376
|
+
cards: q(e),
|
|
377
|
+
visibleFields: v.visibleFields,
|
|
378
|
+
filterActive: v.filterActive,
|
|
379
|
+
sprintOptions: E.options,
|
|
380
|
+
milestoneOptions: D.options,
|
|
339
381
|
isFirst: t === 0,
|
|
340
|
-
isLast: t ===
|
|
341
|
-
busy:
|
|
342
|
-
now:
|
|
343
|
-
loadingMore:
|
|
344
|
-
selected:
|
|
345
|
-
onToggleSelect:
|
|
346
|
-
onLoadMore: () => void
|
|
347
|
-
onMove:
|
|
348
|
-
onShift: (e) =>
|
|
349
|
-
}, e.id)),
|
|
382
|
+
isLast: t === W.columns.length - 1,
|
|
383
|
+
busy: pe.loading,
|
|
384
|
+
now: g,
|
|
385
|
+
loadingMore: k === e.id,
|
|
386
|
+
selected: j,
|
|
387
|
+
onToggleSelect: N,
|
|
388
|
+
onLoadMore: () => void J(e),
|
|
389
|
+
onMove: he,
|
|
390
|
+
onShift: (e) => ge(t, e)
|
|
391
|
+
}, e.id)), W && W.columns.length === 0 && /* @__PURE__ */ w("p", {
|
|
350
392
|
className: "text-sm text-muted-foreground p-4",
|
|
351
393
|
children: "This board has no columns. Add one to start placing work."
|
|
352
394
|
})]
|
|
353
395
|
})
|
|
354
396
|
]
|
|
355
397
|
})
|
|
356
|
-
}) : /* @__PURE__ */
|
|
398
|
+
}) : /* @__PURE__ */ w(te, { children: /* @__PURE__ */ T(I, {
|
|
357
399
|
className: "p-8 text-center space-y-3",
|
|
358
400
|
"data-testid": "board-empty",
|
|
359
401
|
children: [
|
|
360
|
-
/* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ w(_, { className: "h-8 w-8 mx-auto text-muted-foreground" }),
|
|
403
|
+
/* @__PURE__ */ T("p", {
|
|
362
404
|
className: "text-sm text-muted-foreground",
|
|
363
405
|
children: [n, " has no board yet."]
|
|
364
406
|
}),
|
|
365
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ T(F, {
|
|
366
408
|
size: "sm",
|
|
367
|
-
disabled:
|
|
368
|
-
onClick: () =>
|
|
409
|
+
disabled: X.loading,
|
|
410
|
+
onClick: () => Z(() => ue({ variables: { input: {
|
|
369
411
|
projectId: t,
|
|
370
412
|
name: `${n} board`,
|
|
371
413
|
type: "KANBAN",
|
|
372
414
|
isDefault: !0,
|
|
373
415
|
withDefaultColumns: !0
|
|
374
416
|
} } }), "The board could not be created."),
|
|
375
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ w(y, { className: "mr-1 h-4 w-4" }), X.loading ? "Creating…" : "Create board"]
|
|
376
418
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ w("p", {
|
|
378
420
|
className: "text-xs text-muted-foreground",
|
|
379
421
|
children: "Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing, Done."
|
|
380
422
|
}),
|
|
381
|
-
|
|
423
|
+
p && /* @__PURE__ */ w($, { message: p })
|
|
382
424
|
]
|
|
383
425
|
}) });
|
|
384
426
|
}
|
|
385
|
-
function
|
|
386
|
-
let
|
|
387
|
-
return
|
|
427
|
+
function ve({ card: e, column: r, columns: a, visibleFields: c, sprintOptions: l, milestoneOptions: u, busy: d, now: f, selected: m, onToggleSelect: h, onMove: g }) {
|
|
428
|
+
let _ = t(), v = p(H), y = pe(e.statusSince, f), b = i(v, e.status, V), x = a.filter((e) => e.id !== r.id && (!e.mappedStatus || b.includes(e.mappedStatus))), S = (e) => c.includes(e), C = e.sprintId ? l.find((t) => t.id === e.sprintId)?.name : null, E = e.milestoneId ? u.find((t) => t.id === e.milestoneId)?.name : null, D = [];
|
|
429
|
+
return S("TYPE") && D.push({
|
|
430
|
+
key: "type",
|
|
431
|
+
text: s(e.type)
|
|
432
|
+
}), S("PRIORITY") && D.push({
|
|
433
|
+
key: "priority",
|
|
434
|
+
text: s(e.priority)
|
|
435
|
+
}), S("DUE_DATE") && e.dueDate && D.push({
|
|
436
|
+
key: "due",
|
|
437
|
+
text: `Due ${new Date(e.dueDate).toLocaleDateString()}`
|
|
438
|
+
}), S("SPRINT") && C && D.push({
|
|
439
|
+
key: "sprint",
|
|
440
|
+
text: C
|
|
441
|
+
}), S("MILESTONE") && E && D.push({
|
|
442
|
+
key: "milestone",
|
|
443
|
+
text: E
|
|
444
|
+
}), S("EPIC") && e.parent && D.push({
|
|
445
|
+
key: "epic",
|
|
446
|
+
text: e.parent.title
|
|
447
|
+
}), /* @__PURE__ */ T("li", {
|
|
388
448
|
draggable: !0,
|
|
389
449
|
onDragStart: (t) => {
|
|
390
450
|
t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
|
|
391
451
|
},
|
|
392
|
-
className: `rounded-md border bg-background p-2 space-y-1 cursor-grab ${
|
|
452
|
+
className: `rounded-md border bg-background p-2 space-y-1 cursor-grab ${m ? "ring-2 ring-primary" : ""}`,
|
|
393
453
|
"data-testid": "board-card",
|
|
394
454
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ T("div", {
|
|
396
456
|
className: "flex items-start gap-1.5",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ w("input", {
|
|
398
458
|
type: "checkbox",
|
|
399
459
|
className: "mt-0.5 shrink-0",
|
|
400
460
|
"aria-label": `Select ${e.key}`,
|
|
401
461
|
"data-testid": "board-card-select",
|
|
402
|
-
checked:
|
|
462
|
+
checked: m,
|
|
403
463
|
draggable: !1,
|
|
404
464
|
onMouseDown: (e) => e.stopPropagation(),
|
|
405
465
|
onPointerDown: (e) => e.stopPropagation(),
|
|
406
466
|
onDragStart: (e) => e.stopPropagation(),
|
|
407
467
|
onClick: (e) => e.stopPropagation(),
|
|
408
|
-
onChange: () =>
|
|
409
|
-
}), /* @__PURE__ */
|
|
468
|
+
onChange: () => h(e.id)
|
|
469
|
+
}), /* @__PURE__ */ w("button", {
|
|
410
470
|
type: "button",
|
|
411
471
|
className: "text-left text-sm font-medium leading-tight hover:underline",
|
|
412
|
-
onClick: () =>
|
|
472
|
+
onClick: () => _(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
413
473
|
children: e.title
|
|
414
474
|
})]
|
|
415
475
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ T("div", {
|
|
417
477
|
className: "flex items-center justify-between text-[11px] text-muted-foreground",
|
|
418
478
|
children: [
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
|
|
479
|
+
S("KEY") && /* @__PURE__ */ w("span", { children: e.key }),
|
|
480
|
+
y !== null && /* @__PURE__ */ w("span", {
|
|
421
481
|
"data-testid": "card-age",
|
|
422
|
-
className:
|
|
423
|
-
title: `In ${o(
|
|
424
|
-
children:
|
|
482
|
+
className: me(y),
|
|
483
|
+
title: `In ${o(v, e.status)} since ${new Date(e.statusSince ?? "").toLocaleDateString()}`,
|
|
484
|
+
children: y === 0 ? "today" : `${y}d in status`
|
|
425
485
|
}),
|
|
426
|
-
/* @__PURE__ */
|
|
486
|
+
S("STORY_POINTS") && /* @__PURE__ */ T("span", { children: [e.storyPoints ?? 0, " pts"] })
|
|
427
487
|
]
|
|
428
488
|
}),
|
|
429
|
-
/* @__PURE__ */
|
|
489
|
+
D.length > 0 && /* @__PURE__ */ w("div", {
|
|
490
|
+
className: "flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[11px] text-muted-foreground",
|
|
491
|
+
children: D.map((e, t) => /* @__PURE__ */ T("span", {
|
|
492
|
+
className: "flex items-center gap-1.5",
|
|
493
|
+
children: [t > 0 && /* @__PURE__ */ w("span", {
|
|
494
|
+
"aria-hidden": "true",
|
|
495
|
+
children: "·"
|
|
496
|
+
}), e.text]
|
|
497
|
+
}, e.key))
|
|
498
|
+
}),
|
|
499
|
+
S("LABELS") && e.labels.length > 0 && /* @__PURE__ */ w("div", {
|
|
500
|
+
className: "flex flex-wrap gap-1",
|
|
501
|
+
children: e.labels.map((e) => /* @__PURE__ */ w(P, {
|
|
502
|
+
variant: "secondary",
|
|
503
|
+
className: "px-1.5 py-0 text-[10px]",
|
|
504
|
+
children: e
|
|
505
|
+
}, e))
|
|
506
|
+
}),
|
|
507
|
+
/* @__PURE__ */ T("div", {
|
|
430
508
|
className: "flex items-center justify-between gap-1 text-[11px] text-muted-foreground",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ w("span", {
|
|
432
510
|
className: "truncate",
|
|
433
|
-
children: e.assigneeId ? /* @__PURE__ */
|
|
434
|
-
}), /* @__PURE__ */
|
|
511
|
+
children: S("ASSIGNEE") && (e.assigneeId ? /* @__PURE__ */ w(n, { id: e.assigneeId }) : "Unassigned")
|
|
512
|
+
}), /* @__PURE__ */ T("select", {
|
|
435
513
|
"aria-label": `Move ${e.key} to column`,
|
|
436
514
|
className: "rounded border border-input bg-background px-1 py-0.5 text-[11px]",
|
|
437
515
|
value: "",
|
|
438
|
-
disabled:
|
|
439
|
-
onChange: (t) => t.target.value &&
|
|
440
|
-
children: [/* @__PURE__ */
|
|
516
|
+
disabled: d,
|
|
517
|
+
onChange: (t) => t.target.value && g(e.id, t.target.value),
|
|
518
|
+
children: [/* @__PURE__ */ w("option", {
|
|
441
519
|
value: "",
|
|
442
520
|
children: "Move…"
|
|
443
|
-
}),
|
|
521
|
+
}), x.map((e) => /* @__PURE__ */ w("option", {
|
|
444
522
|
value: e.id,
|
|
445
523
|
children: e.name
|
|
446
524
|
}, e.id))]
|
|
@@ -449,9 +527,9 @@ function de({ card: e, column: r, columns: a, busy: s, now: c, selected: u, onTo
|
|
|
449
527
|
]
|
|
450
528
|
});
|
|
451
529
|
}
|
|
452
|
-
function
|
|
453
|
-
let [a, o] =
|
|
454
|
-
return /* @__PURE__ */
|
|
530
|
+
function ye({ column: e, onMove: t, className: n, children: r, label: i }) {
|
|
531
|
+
let [a, o] = m(!1);
|
|
532
|
+
return /* @__PURE__ */ w("section", {
|
|
455
533
|
"aria-label": i,
|
|
456
534
|
className: `${n} ${a ? "ring-2 ring-primary" : ""}`,
|
|
457
535
|
onDragOver: (e) => {
|
|
@@ -466,11 +544,11 @@ function fe({ column: e, onMove: t, className: n, children: r, label: i }) {
|
|
|
466
544
|
children: r
|
|
467
545
|
});
|
|
468
546
|
}
|
|
469
|
-
function
|
|
547
|
+
function be({ cards: e, loading: t, onLoadMore: n }) {
|
|
470
548
|
let r = e.totalCount - e.items.length;
|
|
471
|
-
return r <= 0 || !e.pageInfo.hasNextPage ? null : /* @__PURE__ */
|
|
549
|
+
return r <= 0 || !e.pageInfo.hasNextPage ? null : /* @__PURE__ */ T("div", {
|
|
472
550
|
className: "px-2 pb-2 space-y-1",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ T("p", {
|
|
474
552
|
className: "text-xs text-muted-foreground",
|
|
475
553
|
children: [
|
|
476
554
|
"Showing ",
|
|
@@ -478,160 +556,174 @@ function pe({ cards: e, loading: t, onLoadMore: n }) {
|
|
|
478
556
|
" of ",
|
|
479
557
|
e.totalCount
|
|
480
558
|
]
|
|
481
|
-
}), /* @__PURE__ */
|
|
559
|
+
}), /* @__PURE__ */ w(F, {
|
|
482
560
|
size: "sm",
|
|
483
561
|
variant: "outline",
|
|
484
562
|
className: "w-full",
|
|
485
563
|
"data-testid": "board-column-more",
|
|
486
564
|
disabled: t,
|
|
487
565
|
onClick: n,
|
|
488
|
-
children: t ? "Loading…" : `Show ${Math.min(r,
|
|
566
|
+
children: t ? "Loading…" : `Show ${Math.min(r, W)} more`
|
|
489
567
|
})]
|
|
490
568
|
});
|
|
491
569
|
}
|
|
492
|
-
function
|
|
493
|
-
let
|
|
570
|
+
function xe({ board: e, groupBy: t, visibleFields: n, filterActive: r, sprintOptions: i, milestoneOptions: a, cardsOf: o, now: s, busy: c, loadingMore: l, selected: u, onToggleSelect: d, onLoadMore: f, onMove: p }) {
|
|
571
|
+
let m = e.columns.map((e) => ({
|
|
494
572
|
column: e,
|
|
495
|
-
cards:
|
|
496
|
-
})),
|
|
497
|
-
return /* @__PURE__ */
|
|
573
|
+
cards: o(e)
|
|
574
|
+
})), h = m.flatMap(({ cards: e }) => e.items), g = [...new Set(h.map((e) => Z(e, t)))].sort((e, n) => t === "PRIORITY" ? X.indexOf(e) - X.indexOf(n) : e === "" ? 1 : n === "" ? -1 : e.localeCompare(n));
|
|
575
|
+
return /* @__PURE__ */ T("div", {
|
|
498
576
|
className: "overflow-x-auto pb-2 space-y-3",
|
|
499
577
|
"data-testid": "board-swimlanes",
|
|
500
578
|
children: [
|
|
501
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ T("p", {
|
|
502
580
|
className: "text-xs text-muted-foreground",
|
|
503
581
|
children: [
|
|
504
582
|
"Dragging moves a card between columns. Its lane follows its",
|
|
505
583
|
" ",
|
|
506
|
-
t
|
|
584
|
+
(ge[t] ?? t.toLowerCase()).toLowerCase(),
|
|
507
585
|
"."
|
|
508
586
|
]
|
|
509
587
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ w("div", {
|
|
511
589
|
className: "flex gap-3",
|
|
512
|
-
children:
|
|
590
|
+
children: m.map(({ column: e, cards: t }) => /* @__PURE__ */ w("div", {
|
|
513
591
|
className: "min-w-[240px] w-[240px] shrink-0 px-2",
|
|
514
|
-
children: /* @__PURE__ */
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
" ",
|
|
519
|
-
/* @__PURE__ */ b("span", {
|
|
520
|
-
className: "text-xs text-muted-foreground",
|
|
521
|
-
children: e.wipLimit ? `${t.totalCount} / ${e.wipLimit}` : t.totalCount
|
|
522
|
-
})
|
|
523
|
-
]
|
|
592
|
+
children: /* @__PURE__ */ w(Se, {
|
|
593
|
+
column: e,
|
|
594
|
+
filteredCount: t.totalCount,
|
|
595
|
+
filterActive: r
|
|
524
596
|
})
|
|
525
597
|
}, e.id))
|
|
526
598
|
}),
|
|
527
|
-
|
|
599
|
+
g.length === 0 && /* @__PURE__ */ w("p", {
|
|
528
600
|
className: "text-sm text-muted-foreground p-4",
|
|
529
601
|
children: "No cards on this board yet."
|
|
530
602
|
}),
|
|
531
|
-
|
|
532
|
-
"data-testid": "board-
|
|
603
|
+
g.map((r) => /* @__PURE__ */ T("div", {
|
|
604
|
+
"data-testid": "board-swimlane",
|
|
533
605
|
className: "space-y-1",
|
|
534
|
-
children: [/* @__PURE__ */
|
|
606
|
+
children: [/* @__PURE__ */ T("p", {
|
|
535
607
|
className: "text-xs font-medium",
|
|
536
608
|
children: [
|
|
537
|
-
|
|
609
|
+
he(r, t, h, i, a),
|
|
538
610
|
" ",
|
|
539
|
-
/* @__PURE__ */
|
|
611
|
+
/* @__PURE__ */ T("span", {
|
|
540
612
|
className: "text-muted-foreground",
|
|
541
613
|
children: [
|
|
542
614
|
"(",
|
|
543
|
-
|
|
615
|
+
h.filter((e) => Z(e, t) === r).length,
|
|
544
616
|
")"
|
|
545
617
|
]
|
|
546
618
|
})
|
|
547
619
|
]
|
|
548
|
-
}), /* @__PURE__ */
|
|
620
|
+
}), /* @__PURE__ */ w("div", {
|
|
549
621
|
className: "flex gap-3",
|
|
550
|
-
children:
|
|
551
|
-
column:
|
|
552
|
-
onMove:
|
|
553
|
-
label: `${
|
|
622
|
+
children: m.map(({ column: o, cards: l }) => /* @__PURE__ */ w(ye, {
|
|
623
|
+
column: o,
|
|
624
|
+
onMove: p,
|
|
625
|
+
label: `${o.name} column`,
|
|
554
626
|
className: "min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30",
|
|
555
|
-
children: /* @__PURE__ */
|
|
627
|
+
children: /* @__PURE__ */ w("ul", {
|
|
556
628
|
className: "p-2 space-y-2 min-h-[48px]",
|
|
557
|
-
children:
|
|
629
|
+
children: l.items.filter((e) => Z(e, t) === r).map((t) => /* @__PURE__ */ w(ve, {
|
|
558
630
|
card: t,
|
|
559
|
-
column:
|
|
631
|
+
column: o,
|
|
560
632
|
columns: e.columns,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
633
|
+
visibleFields: n,
|
|
634
|
+
sprintOptions: i,
|
|
635
|
+
milestoneOptions: a,
|
|
636
|
+
busy: c,
|
|
637
|
+
now: s,
|
|
638
|
+
selected: u.has(t.id),
|
|
639
|
+
onToggleSelect: d,
|
|
640
|
+
onMove: p
|
|
566
641
|
}, t.id))
|
|
567
642
|
})
|
|
568
|
-
},
|
|
643
|
+
}, o.id))
|
|
569
644
|
})]
|
|
570
|
-
},
|
|
571
|
-
/* @__PURE__ */
|
|
645
|
+
}, r || "none")),
|
|
646
|
+
/* @__PURE__ */ w("div", {
|
|
572
647
|
className: "flex gap-3",
|
|
573
|
-
children:
|
|
648
|
+
children: m.map(({ column: e, cards: t }) => /* @__PURE__ */ w("div", {
|
|
574
649
|
className: "min-w-[240px] w-[240px] shrink-0",
|
|
575
|
-
children: /* @__PURE__ */
|
|
650
|
+
children: /* @__PURE__ */ w(be, {
|
|
576
651
|
cards: t,
|
|
577
|
-
loading:
|
|
578
|
-
onLoadMore: () =>
|
|
652
|
+
loading: l === e.id,
|
|
653
|
+
onLoadMore: () => f(e)
|
|
579
654
|
})
|
|
580
655
|
}, e.id))
|
|
581
656
|
})
|
|
582
657
|
]
|
|
583
658
|
});
|
|
584
659
|
}
|
|
585
|
-
function
|
|
586
|
-
let
|
|
587
|
-
return /* @__PURE__ */
|
|
660
|
+
function Se({ column: e, filteredCount: t, filterActive: n, testId: r }) {
|
|
661
|
+
let i = e.wipLimit != null && e.wipLimit > 0 && e.itemCount >= e.wipLimit;
|
|
662
|
+
return /* @__PURE__ */ T("h3", {
|
|
663
|
+
className: "text-sm font-medium truncate",
|
|
664
|
+
"data-testid": r,
|
|
665
|
+
children: [
|
|
666
|
+
e.name,
|
|
667
|
+
" ",
|
|
668
|
+
/* @__PURE__ */ w("span", {
|
|
669
|
+
className: `text-xs rounded-full px-1.5 ${i ? "bg-status-warning-subtle text-status-warning" : "bg-muted"}`,
|
|
670
|
+
title: e.wipLimit ? `WIP limit ${e.wipLimit}` : void 0,
|
|
671
|
+
children: e.wipLimit ? `${e.itemCount} / ${e.wipLimit}` : e.itemCount
|
|
672
|
+
}),
|
|
673
|
+
n && /* @__PURE__ */ T("span", {
|
|
674
|
+
className: "ml-1 text-xs text-muted-foreground",
|
|
675
|
+
children: ["showing ", t]
|
|
676
|
+
})
|
|
677
|
+
]
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
function Ce({ boardId: e, column: t, columns: n, cards: r, visibleFields: i, filterActive: a, sprintOptions: o, milestoneOptions: s, isFirst: c, isLast: l, busy: u, now: d, loadingMore: f, selected: p, onToggleSelect: m, onLoadMore: _, onMove: v, onShift: y }) {
|
|
681
|
+
let b = U();
|
|
682
|
+
return /* @__PURE__ */ w(ye, {
|
|
588
683
|
column: t,
|
|
589
|
-
onMove:
|
|
684
|
+
onMove: v,
|
|
590
685
|
label: `${t.name} column`,
|
|
591
686
|
className: "min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30",
|
|
592
|
-
children: /* @__PURE__ */
|
|
687
|
+
children: /* @__PURE__ */ T("div", {
|
|
593
688
|
"data-testid": `board-column-${t.name}`,
|
|
594
689
|
children: [
|
|
595
|
-
/* @__PURE__ */
|
|
690
|
+
/* @__PURE__ */ T("header", {
|
|
596
691
|
className: "p-2 border-b space-y-1",
|
|
597
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ w("div", {
|
|
598
693
|
className: "flex items-center justify-between gap-1",
|
|
599
|
-
children:
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
children: t.wipLimit ? `${g} / ${t.wipLimit}` : g
|
|
607
|
-
})]
|
|
608
|
-
}), /* @__PURE__ */ x("div", {
|
|
694
|
+
children: /* @__PURE__ */ w(Se, {
|
|
695
|
+
column: t,
|
|
696
|
+
filteredCount: r.totalCount,
|
|
697
|
+
filterActive: a,
|
|
698
|
+
testId: `board-column-count-${t.name}`
|
|
699
|
+
})
|
|
700
|
+
}), /* @__PURE__ */ T("div", {
|
|
609
701
|
className: "flex items-center justify-between gap-1",
|
|
610
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ w("span", {
|
|
611
703
|
className: "text-[11px] text-muted-foreground",
|
|
612
|
-
children: t.mappedStatus ? `Sets status: ${
|
|
613
|
-
}), /* @__PURE__ */
|
|
704
|
+
children: t.mappedStatus ? `Sets status: ${b(t.mappedStatus)}` : "No status"
|
|
705
|
+
}), /* @__PURE__ */ T("span", {
|
|
614
706
|
className: "flex",
|
|
615
707
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
708
|
+
/* @__PURE__ */ w(F, {
|
|
617
709
|
size: "icon",
|
|
618
710
|
variant: "ghost",
|
|
619
711
|
className: "h-6 w-6",
|
|
620
712
|
"aria-label": `Move ${t.name} column left`,
|
|
621
|
-
disabled:
|
|
622
|
-
onClick: () =>
|
|
623
|
-
children: /* @__PURE__ */
|
|
713
|
+
disabled: c,
|
|
714
|
+
onClick: () => y(-1),
|
|
715
|
+
children: /* @__PURE__ */ w(h, { className: "h-3.5 w-3.5" })
|
|
624
716
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ w(F, {
|
|
626
718
|
size: "icon",
|
|
627
719
|
variant: "ghost",
|
|
628
720
|
className: "h-6 w-6",
|
|
629
721
|
"aria-label": `Move ${t.name} column right`,
|
|
630
|
-
disabled:
|
|
631
|
-
onClick: () =>
|
|
632
|
-
children: /* @__PURE__ */
|
|
722
|
+
disabled: l,
|
|
723
|
+
onClick: () => y(1),
|
|
724
|
+
children: /* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" })
|
|
633
725
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ w(we, {
|
|
635
727
|
boardId: e,
|
|
636
728
|
column: t
|
|
637
729
|
})
|
|
@@ -639,156 +731,159 @@ function he({ boardId: e, column: t, columns: n, cards: r, isFirst: i, isLast: a
|
|
|
639
731
|
})]
|
|
640
732
|
})]
|
|
641
733
|
}),
|
|
642
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ T("ul", {
|
|
643
735
|
className: "p-2 space-y-2 min-h-[80px]",
|
|
644
|
-
children: [r.items.map((e) => /* @__PURE__ */
|
|
736
|
+
children: [r.items.map((e) => /* @__PURE__ */ w(ve, {
|
|
645
737
|
card: e,
|
|
646
738
|
column: t,
|
|
647
739
|
columns: n,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
740
|
+
visibleFields: i,
|
|
741
|
+
sprintOptions: o,
|
|
742
|
+
milestoneOptions: s,
|
|
743
|
+
busy: u,
|
|
744
|
+
now: d,
|
|
745
|
+
selected: p.has(e.id),
|
|
746
|
+
onToggleSelect: m,
|
|
747
|
+
onMove: v
|
|
748
|
+
}, e.id)), r.totalCount === 0 && /* @__PURE__ */ w("li", {
|
|
654
749
|
className: "text-xs text-muted-foreground text-center py-4",
|
|
655
750
|
children: "Empty"
|
|
656
751
|
})]
|
|
657
752
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ w(be, {
|
|
659
754
|
cards: r,
|
|
660
|
-
loading:
|
|
661
|
-
onLoadMore:
|
|
755
|
+
loading: f,
|
|
756
|
+
onLoadMore: _
|
|
662
757
|
})
|
|
663
758
|
]
|
|
664
759
|
})
|
|
665
760
|
});
|
|
666
761
|
}
|
|
667
|
-
function
|
|
668
|
-
let n = t !== void 0, i =
|
|
669
|
-
refetchQueries:
|
|
762
|
+
function we({ boardId: e, column: t }) {
|
|
763
|
+
let n = t !== void 0, i = U(), [a, o] = m(!1), [s, c] = m(t?.name ?? ""), [l, u] = m(t?.mappedStatus ?? ""), [d, f] = m(t?.wipLimit ? String(t.wipLimit) : ""), [p, h] = m(null), g = {
|
|
764
|
+
refetchQueries: Y,
|
|
670
765
|
awaitRefetchQueries: !0
|
|
671
|
-
}, [
|
|
672
|
-
c(t?.name ?? ""),
|
|
673
|
-
},
|
|
674
|
-
|
|
766
|
+
}, [_, b] = S(q, g), [x, C] = S(J, g), [P, te] = S(ue, g), I = b.loading || C.loading || te.loading, H = d.trim() === "" ? null : Number(d), W = H !== null && (!Number.isInteger(H) || H < 1), oe = s.trim() !== "" && !W && !I, G = () => {
|
|
767
|
+
c(t?.name ?? ""), u(t?.mappedStatus ?? ""), f(t?.wipLimit ? String(t.wipLimit) : ""), h(null);
|
|
768
|
+
}, se = async () => {
|
|
769
|
+
h(null);
|
|
675
770
|
let i = {
|
|
676
771
|
name: s.trim(),
|
|
677
772
|
mappedStatus: l || null,
|
|
678
|
-
wipLimit:
|
|
773
|
+
wipLimit: H
|
|
679
774
|
};
|
|
680
775
|
try {
|
|
681
|
-
n ? await r(
|
|
776
|
+
n ? await r(x({ variables: {
|
|
682
777
|
id: t.id,
|
|
683
778
|
input: i
|
|
684
|
-
} })) : await r(
|
|
779
|
+
} })) : await r(_({ variables: { input: {
|
|
685
780
|
boardId: e,
|
|
686
781
|
type: "CUSTOM",
|
|
687
782
|
...i
|
|
688
783
|
} } })), o(!1);
|
|
689
784
|
} catch (e) {
|
|
690
|
-
|
|
785
|
+
h(Q(e, "The column could not be saved."));
|
|
691
786
|
}
|
|
692
|
-
},
|
|
693
|
-
return /* @__PURE__ */
|
|
787
|
+
}, K = n ? `column-${t.id}` : "new-column";
|
|
788
|
+
return /* @__PURE__ */ T(R, {
|
|
694
789
|
open: a,
|
|
695
790
|
onOpenChange: (e) => {
|
|
696
|
-
o(e), e &&
|
|
791
|
+
o(e), e && G();
|
|
697
792
|
},
|
|
698
|
-
children: [/* @__PURE__ */
|
|
793
|
+
children: [/* @__PURE__ */ w(ae, {
|
|
699
794
|
asChild: !0,
|
|
700
|
-
children: n ? /* @__PURE__ */
|
|
795
|
+
children: n ? /* @__PURE__ */ w(F, {
|
|
701
796
|
size: "icon",
|
|
702
797
|
variant: "ghost",
|
|
703
798
|
className: "h-6 w-6",
|
|
704
799
|
"aria-label": `Edit ${t.name} column`,
|
|
705
|
-
children: /* @__PURE__ */
|
|
706
|
-
}) : /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ w(v, { className: "h-3.5 w-3.5" })
|
|
801
|
+
}) : /* @__PURE__ */ T(F, {
|
|
707
802
|
size: "sm",
|
|
708
803
|
variant: "outline",
|
|
709
|
-
children: [/* @__PURE__ */
|
|
804
|
+
children: [/* @__PURE__ */ w(y, { className: "mr-1 h-4 w-4" }), "Add column"]
|
|
710
805
|
})
|
|
711
|
-
}), /* @__PURE__ */
|
|
806
|
+
}), /* @__PURE__ */ T(ne, {
|
|
712
807
|
className: "max-w-md",
|
|
713
808
|
children: [
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
-
/* @__PURE__ */
|
|
809
|
+
/* @__PURE__ */ T(re, { children: [/* @__PURE__ */ w(ie, { children: n ? `Edit ${t.name}` : "Add column" }), /* @__PURE__ */ w(z, { children: "Moving a card into a column that sets a status changes the work item's status." })] }),
|
|
810
|
+
/* @__PURE__ */ T("div", {
|
|
716
811
|
className: "space-y-3",
|
|
717
812
|
children: [
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
htmlFor: `${
|
|
813
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
814
|
+
htmlFor: `${K}-name`,
|
|
720
815
|
className: "text-sm font-medium",
|
|
721
816
|
children: "Name"
|
|
722
|
-
}), /* @__PURE__ */
|
|
723
|
-
id: `${
|
|
817
|
+
}), /* @__PURE__ */ w(L, {
|
|
818
|
+
id: `${K}-name`,
|
|
724
819
|
className: "mt-1",
|
|
725
820
|
value: s,
|
|
726
821
|
onChange: (e) => c(e.target.value)
|
|
727
822
|
})] }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
htmlFor: `${
|
|
823
|
+
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("label", {
|
|
824
|
+
htmlFor: `${K}-status`,
|
|
730
825
|
className: "text-sm font-medium",
|
|
731
826
|
children: "Sets status"
|
|
732
|
-
}), /* @__PURE__ */
|
|
733
|
-
id: `${
|
|
827
|
+
}), /* @__PURE__ */ T("select", {
|
|
828
|
+
id: `${K}-status`,
|
|
734
829
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
735
830
|
value: l,
|
|
736
|
-
onChange: (e) =>
|
|
737
|
-
children: [/* @__PURE__ */
|
|
831
|
+
onChange: (e) => u(e.target.value),
|
|
832
|
+
children: [/* @__PURE__ */ w("option", {
|
|
738
833
|
value: "",
|
|
739
834
|
children: "No status (cards keep theirs)"
|
|
740
|
-
}),
|
|
835
|
+
}), V.map((e) => /* @__PURE__ */ w("option", {
|
|
741
836
|
value: e,
|
|
742
837
|
children: i(e)
|
|
743
838
|
}, e))]
|
|
744
839
|
})] }),
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
-
htmlFor: `${
|
|
840
|
+
/* @__PURE__ */ T("div", { children: [
|
|
841
|
+
/* @__PURE__ */ w("label", {
|
|
842
|
+
htmlFor: `${K}-wip`,
|
|
748
843
|
className: "text-sm font-medium",
|
|
749
844
|
children: "WIP limit (blank for none)"
|
|
750
845
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
-
id: `${
|
|
846
|
+
/* @__PURE__ */ w(L, {
|
|
847
|
+
id: `${K}-wip`,
|
|
753
848
|
type: "number",
|
|
754
849
|
min: 1,
|
|
755
850
|
className: "mt-1",
|
|
756
|
-
value:
|
|
757
|
-
onChange: (e) =>
|
|
851
|
+
value: d,
|
|
852
|
+
onChange: (e) => f(e.target.value)
|
|
758
853
|
}),
|
|
759
|
-
|
|
854
|
+
W && /* @__PURE__ */ w($, { message: "The WIP limit must be a whole number, 1 or more." })
|
|
760
855
|
] })
|
|
761
856
|
]
|
|
762
857
|
}),
|
|
763
|
-
|
|
764
|
-
/* @__PURE__ */
|
|
858
|
+
p && /* @__PURE__ */ w($, { message: p }),
|
|
859
|
+
/* @__PURE__ */ T(B, {
|
|
765
860
|
className: "gap-2",
|
|
766
|
-
children: [n && /* @__PURE__ */
|
|
861
|
+
children: [n && /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w(N, {
|
|
767
862
|
asChild: !0,
|
|
768
|
-
children: /* @__PURE__ */
|
|
863
|
+
children: /* @__PURE__ */ w(F, {
|
|
769
864
|
variant: "outline",
|
|
770
|
-
disabled:
|
|
865
|
+
disabled: I,
|
|
771
866
|
children: "Delete column"
|
|
772
867
|
})
|
|
773
|
-
}), /* @__PURE__ */
|
|
868
|
+
}), /* @__PURE__ */ T(ee, { children: [/* @__PURE__ */ T(j, { children: [/* @__PURE__ */ T(M, { children: [
|
|
774
869
|
"Delete ",
|
|
775
870
|
t.name,
|
|
776
871
|
"?"
|
|
777
|
-
] }), /* @__PURE__ */
|
|
872
|
+
] }), /* @__PURE__ */ w(k, { children: "Its cards are not deleted: each goes back to the column for its status, or off the board if no column sets that status." })] }), /* @__PURE__ */ T(A, { children: [/* @__PURE__ */ w(O, { children: "Keep it" }), /* @__PURE__ */ w(D, {
|
|
778
873
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
779
874
|
onClick: async () => {
|
|
780
875
|
try {
|
|
781
|
-
await r(
|
|
876
|
+
await r(P({ variables: { id: t.id } })), o(!1);
|
|
782
877
|
} catch (e) {
|
|
783
|
-
|
|
878
|
+
h(Q(e, "The column could not be deleted."));
|
|
784
879
|
}
|
|
785
880
|
},
|
|
786
881
|
children: "Delete column"
|
|
787
|
-
})] })] })] }), /* @__PURE__ */
|
|
788
|
-
onClick:
|
|
789
|
-
disabled: !
|
|
790
|
-
"data-testid": `${
|
|
791
|
-
children:
|
|
882
|
+
})] })] })] }), /* @__PURE__ */ w(F, {
|
|
883
|
+
onClick: se,
|
|
884
|
+
disabled: !oe,
|
|
885
|
+
"data-testid": `${K}-save`,
|
|
886
|
+
children: I ? "Saving…" : n ? "Save" : "Add column"
|
|
792
887
|
})]
|
|
793
888
|
})
|
|
794
889
|
]
|
|
@@ -796,6 +891,6 @@ function ge({ boardId: e, column: t }) {
|
|
|
796
891
|
});
|
|
797
892
|
}
|
|
798
893
|
//#endregion
|
|
799
|
-
export {
|
|
894
|
+
export { _e as ProjectBoard };
|
|
800
895
|
|
|
801
896
|
//# sourceMappingURL=ProjectBoard.js.map
|