@burdenoff/microfe-planmagnet 2026.927.6 → 2026.928.2

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