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