@burdenoff/microfe-planmagnet 2026.925.7 → 2026.925.8

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 (26) hide show
  1. package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
  2. package/dist/planmagnet/board/ProjectBoard.js +159 -158
  3. package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
  4. package/dist/planmagnet/create/CreateDialogs.d.ts.map +1 -1
  5. package/dist/planmagnet/create/CreateDialogs.js +118 -117
  6. package/dist/planmagnet/create/CreateDialogs.js.map +1 -1
  7. package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.d.ts.map +1 -1
  8. package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.js.map +1 -1
  9. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
  10. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +322 -280
  11. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
  12. package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
  13. package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
  14. package/dist/planmagnet/pages/TasksEditTaskPagePage.d.ts.map +1 -1
  15. package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
  16. package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
  17. package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +147 -126
  18. package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
  19. package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
  20. package/dist/planmagnet/sprints/SprintControls.js +202 -201
  21. package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
  22. package/dist/planmagnet/utils/mutationResult.d.ts +16 -0
  23. package/dist/planmagnet/utils/mutationResult.d.ts.map +1 -0
  24. package/dist/planmagnet/utils/mutationResult.js +10 -0
  25. package/dist/planmagnet/utils/mutationResult.js.map +1 -0
  26. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectBoard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"names":[],"mappings":"AAuLA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAW,GACZ,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,2CAiKA"}
1
+ {"version":3,"file":"ProjectBoard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"names":[],"mappings":"AAwLA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAW,GACZ,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,2CAiKA"}
@@ -1,13 +1,14 @@
1
1
  import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
2
  import { PersonName as n } from "../people/People.js";
3
- import { useState as r } from "react";
4
- import { ChevronLeft as i, ChevronRight as a, LayoutGrid as o, Pencil as s, Plus as c } from "lucide-react";
5
- import { gql as l } from "@apollo/client";
6
- import { useMutation as u, useQuery as d } from "@apollo/client/react";
7
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
- import { AlertDialog as m, AlertDialogAction as h, AlertDialogCancel as g, AlertDialogContent as _, AlertDialogDescription as v, AlertDialogFooter as y, AlertDialogHeader as b, AlertDialogTitle as x, AlertDialogTrigger as S, Button as C, Card as w, CardContent as T, Input as E, ResponsiveDialog as D, ResponsiveDialogContent as O, ResponsiveDialogDescription as k, ResponsiveDialogFooter as A, ResponsiveDialogHeader as j, ResponsiveDialogTitle as M, ResponsiveDialogTrigger as N } from "@burdenoff/fe-libs/ui";
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 { useMutation as d, useQuery as f } from "@apollo/client/react";
8
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
9
+ import { AlertDialog as h, AlertDialogAction as g, AlertDialogCancel as _, AlertDialogContent as v, AlertDialogDescription as y, AlertDialogFooter as b, AlertDialogHeader as x, AlertDialogTitle as S, AlertDialogTrigger as C, Button as w, Card as T, CardContent as E, Input as D, ResponsiveDialog as O, ResponsiveDialogContent as k, ResponsiveDialogDescription as A, ResponsiveDialogFooter as j, ResponsiveDialogHeader as M, ResponsiveDialogTitle as N, ResponsiveDialogTrigger as ee } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/planmagnet/board/ProjectBoard.tsx
10
- var ee = [
11
+ var te = [
11
12
  "BACKLOG",
12
13
  "TODO",
13
14
  "IN_PROGRESS",
@@ -15,7 +16,7 @@ var ee = [
15
16
  "TESTING",
16
17
  "DONE",
17
18
  "CANCELLED"
18
- ], P = (e) => e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "), F = 100, I = l`
19
+ ], P = (e) => e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "), F = 100, I = u`
19
20
  query ProjectBoards($workspaceId: ID!, $projectId: String) {
20
21
  planmagnetBoards(
21
22
  workspaceId: $workspaceId
@@ -29,7 +30,7 @@ var ee = [
29
30
  }
30
31
  }
31
32
  }
32
- `, L = l`
33
+ `, L = u`
33
34
  query ProjectBoard($id: ID!) {
34
35
  planmagnetBoard(id: $id) {
35
36
  id
@@ -56,35 +57,35 @@ var ee = [
56
57
  }
57
58
  }
58
59
  }
59
- `, R = l`
60
+ `, R = u`
60
61
  mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {
61
62
  planmagnetMoveCard(boardId: $boardId, input: $input) {
62
63
  id
63
64
  }
64
65
  }
65
- `, z = l`
66
+ `, z = u`
66
67
  mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {
67
68
  planmagnetCreateBoard(input: $input) {
68
69
  id
69
70
  }
70
71
  }
71
- `, B = l`
72
+ `, B = u`
72
73
  mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {
73
74
  planmagnetCreateBoardColumn(input: $input) {
74
75
  id
75
76
  }
76
77
  }
77
- `, V = l`
78
+ `, V = u`
78
79
  mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {
79
80
  planmagnetUpdateBoardColumn(id: $id, input: $input) {
80
81
  id
81
82
  }
82
83
  }
83
- `, H = l`
84
+ `, H = u`
84
85
  mutation ProjectBoardDeleteColumn($id: ID!) {
85
86
  planmagnetDeleteBoardColumn(id: $id)
86
87
  }
87
- `, U = l`
88
+ `, U = u`
88
89
  mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {
89
90
  planmagnetReorderColumns(boardId: $boardId, input: $input) {
90
91
  id
@@ -98,145 +99,145 @@ var ee = [
98
99
  "GetDashboardData"
99
100
  ], G = (e, t) => e instanceof Error ? e.message : t;
100
101
  function K({ message: e }) {
101
- return /* @__PURE__ */ f("p", {
102
+ return /* @__PURE__ */ p("p", {
102
103
  role: "alert",
103
104
  className: "text-sm text-destructive",
104
105
  children: e
105
106
  });
106
107
  }
107
108
  function q({ projectId: t, projectName: n }) {
108
- let { workspaceId: i } = e(), [a, s] = r(null), [l, m] = r(null), { data: h, loading: g } = d(I, {
109
+ let { workspaceId: a } = e(), [o, c] = i(null), [u, h] = i(null), { data: g, loading: _ } = f(I, {
109
110
  variables: {
110
- workspaceId: i,
111
+ workspaceId: a,
111
112
  projectId: t
112
113
  },
113
- skip: !i
114
- }), _ = h?.planmagnetBoards.items ?? [], v = (a && _.some((e) => e.id === a) ? a : null) ?? _.find((e) => e.isDefault)?.id ?? _[0]?.id ?? null, { data: y, loading: b } = d(L, {
115
- variables: { id: v },
116
- skip: !v
117
- }), x = y?.planmagnetBoard ?? null, [S, E] = u(z, {
114
+ skip: !a
115
+ }), v = g?.planmagnetBoards.items ?? [], y = (o && v.some((e) => e.id === o) ? o : null) ?? v.find((e) => e.isDefault)?.id ?? v[0]?.id ?? null, { data: b, loading: x } = f(L, {
116
+ variables: { id: y },
117
+ skip: !y
118
+ }), S = b?.planmagnetBoard ?? null, [C, D] = d(z, {
118
119
  refetchQueries: W,
119
120
  awaitRefetchQueries: !0
120
- }), [D, O] = u(R, {
121
+ }), [O, k] = d(R, {
121
122
  refetchQueries: W,
122
123
  awaitRefetchQueries: !0
123
- }), [k] = u(U, {
124
+ }), [A] = d(U, {
124
125
  refetchQueries: W,
125
126
  awaitRefetchQueries: !0
126
- }), A = async (e, t) => {
127
- m(null);
127
+ }), j = async (e, t) => {
128
+ h(null);
128
129
  try {
129
- await e();
130
+ await r(e());
130
131
  } catch (e) {
131
- m(G(e, t));
132
+ h(G(e, t));
132
133
  }
133
- }, j = (e, t) => A(() => D({ variables: {
134
- boardId: v,
134
+ }, M = (e, t) => j(() => O({ variables: {
135
+ boardId: y,
135
136
  input: {
136
137
  workItemId: e,
137
138
  targetColumnId: t
138
139
  }
139
- } }), "The card could not be moved."), M = (e, t) => {
140
- if (!x) return;
141
- let n = x.columns.map((e) => e.id), r = e + t;
142
- if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]], A(() => k({ variables: {
143
- boardId: v,
140
+ } }), "The card could not be moved."), N = (e, t) => {
141
+ if (!S) return;
142
+ let n = S.columns.map((e) => e.id), r = e + t;
143
+ if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]], j(() => A({ variables: {
144
+ boardId: y,
144
145
  input: { columnIds: n }
145
146
  } }), "The columns could not be reordered.");
146
147
  };
147
- return g && !h ? /* @__PURE__ */ f("p", {
148
+ return _ && !g ? /* @__PURE__ */ p("p", {
148
149
  className: "text-sm text-muted-foreground p-4",
149
150
  children: "Loading board…"
150
- }) : v ? /* @__PURE__ */ p("div", {
151
+ }) : y ? /* @__PURE__ */ m("div", {
151
152
  className: "space-y-3",
152
153
  "data-testid": "project-board",
153
154
  children: [
154
- /* @__PURE__ */ p("div", {
155
+ /* @__PURE__ */ m("div", {
155
156
  className: "flex flex-wrap items-center gap-3",
156
157
  children: [
157
- _.length > 1 && /* @__PURE__ */ f("select", {
158
+ v.length > 1 && /* @__PURE__ */ p("select", {
158
159
  "aria-label": "Board",
159
160
  className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
160
- value: v,
161
- onChange: (e) => s(e.target.value),
162
- children: _.map((e) => /* @__PURE__ */ f("option", {
161
+ value: y,
162
+ onChange: (e) => c(e.target.value),
163
+ children: v.map((e) => /* @__PURE__ */ p("option", {
163
164
  value: e.id,
164
165
  children: e.name
165
166
  }, e.id))
166
167
  }),
167
- x && x.unplacedCount > 0 && /* @__PURE__ */ p("p", {
168
+ S && S.unplacedCount > 0 && /* @__PURE__ */ m("p", {
168
169
  className: "text-xs text-muted-foreground",
169
170
  "data-testid": "board-unplaced",
170
171
  children: [
171
- x.unplacedCount,
172
+ S.unplacedCount,
172
173
  " work item",
173
- x.unplacedCount === 1 ? " is" : "s are",
174
+ S.unplacedCount === 1 ? " is" : "s are",
174
175
  " not on this board: ",
175
- x.unplacedCount === 1 ? "its status has" : "their status has",
176
+ S.unplacedCount === 1 ? "its status has" : "their status has",
176
177
  " no column."
177
178
  ]
178
179
  }),
179
- x && /* @__PURE__ */ f("div", {
180
+ S && /* @__PURE__ */ p("div", {
180
181
  className: "ml-auto",
181
- children: /* @__PURE__ */ f(Y, { boardId: x.id })
182
+ children: /* @__PURE__ */ p(Y, { boardId: S.id })
182
183
  })
183
184
  ]
184
185
  }),
185
- l && /* @__PURE__ */ f(K, { message: l }),
186
- b && !x ? /* @__PURE__ */ f("p", {
186
+ u && /* @__PURE__ */ p(K, { message: u }),
187
+ x && !S ? /* @__PURE__ */ p("p", {
187
188
  className: "text-sm text-muted-foreground p-4",
188
189
  children: "Loading board…"
189
- }) : /* @__PURE__ */ p("div", {
190
+ }) : /* @__PURE__ */ m("div", {
190
191
  className: "flex gap-3 overflow-x-auto pb-2",
191
- children: [x?.columns.map((e, t) => /* @__PURE__ */ f(J, {
192
- boardId: x.id,
192
+ children: [S?.columns.map((e, t) => /* @__PURE__ */ p(J, {
193
+ boardId: S.id,
193
194
  column: e,
194
- columns: x.columns,
195
+ columns: S.columns,
195
196
  isFirst: t === 0,
196
- isLast: t === x.columns.length - 1,
197
- busy: O.loading,
198
- onMove: j,
199
- onShift: (e) => M(t, e)
200
- }, e.id)), x && x.columns.length === 0 && /* @__PURE__ */ f("p", {
197
+ isLast: t === S.columns.length - 1,
198
+ busy: k.loading,
199
+ onMove: M,
200
+ onShift: (e) => N(t, e)
201
+ }, e.id)), S && S.columns.length === 0 && /* @__PURE__ */ p("p", {
201
202
  className: "text-sm text-muted-foreground p-4",
202
203
  children: "This board has no columns. Add one to start placing work."
203
204
  })]
204
205
  })
205
206
  ]
206
- }) : /* @__PURE__ */ f(w, { children: /* @__PURE__ */ p(T, {
207
+ }) : /* @__PURE__ */ p(T, { children: /* @__PURE__ */ m(E, {
207
208
  className: "p-8 text-center space-y-3",
208
209
  "data-testid": "board-empty",
209
210
  children: [
210
- /* @__PURE__ */ f(o, { className: "h-8 w-8 mx-auto text-muted-foreground" }),
211
- /* @__PURE__ */ p("p", {
211
+ /* @__PURE__ */ p(s, { className: "h-8 w-8 mx-auto text-muted-foreground" }),
212
+ /* @__PURE__ */ m("p", {
212
213
  className: "text-sm text-muted-foreground",
213
214
  children: [n, " has no board yet."]
214
215
  }),
215
- /* @__PURE__ */ p(C, {
216
+ /* @__PURE__ */ m(w, {
216
217
  size: "sm",
217
- disabled: E.loading,
218
- onClick: () => A(() => S({ variables: { input: {
218
+ disabled: D.loading,
219
+ onClick: () => j(() => C({ variables: { input: {
219
220
  projectId: t,
220
221
  name: `${n} board`,
221
222
  type: "KANBAN",
222
223
  isDefault: !0,
223
224
  withDefaultColumns: !0
224
225
  } } }), "The board could not be created."),
225
- children: [/* @__PURE__ */ f(c, { className: "mr-1 h-4 w-4" }), E.loading ? "Creating…" : "Create board"]
226
+ children: [/* @__PURE__ */ p(l, { className: "mr-1 h-4 w-4" }), D.loading ? "Creating…" : "Create board"]
226
227
  }),
227
- /* @__PURE__ */ f("p", {
228
+ /* @__PURE__ */ p("p", {
228
229
  className: "text-xs text-muted-foreground",
229
230
  children: "Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing, Done."
230
231
  }),
231
- l && /* @__PURE__ */ f(K, { message: l })
232
+ u && /* @__PURE__ */ p(K, { message: u })
232
233
  ]
233
234
  }) });
234
235
  }
235
- function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u, onMove: d, onShift: m }) {
236
- let h = t(), [g, _] = r(!1), v = o.cards.totalCount, y = o.wipLimit != null && o.wipLimit > 0 && v >= o.wipLimit, b = v - o.cards.items.length;
237
- return /* @__PURE__ */ p("section", {
238
- "aria-label": `${o.name} column`,
239
- "data-testid": `board-column-${o.name}`,
236
+ function J({ boardId: e, column: r, columns: s, isFirst: c, isLast: l, busy: u, onMove: d, onShift: f }) {
237
+ let h = t(), [g, _] = i(!1), v = r.cards.totalCount, y = r.wipLimit != null && r.wipLimit > 0 && v >= r.wipLimit, b = v - r.cards.items.length;
238
+ return /* @__PURE__ */ m("section", {
239
+ "aria-label": `${r.name} column`,
240
+ "data-testid": `board-column-${r.name}`,
240
241
  className: `min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30 ${g ? "ring-2 ring-primary" : ""}`,
241
242
  onDragOver: (e) => {
242
243
  e.preventDefault(), _(!0);
@@ -245,59 +246,59 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
245
246
  onDrop: (e) => {
246
247
  e.preventDefault(), _(!1);
247
248
  let t = e.dataTransfer.getData("text/plain");
248
- t && d(t, o.id);
249
+ t && d(t, r.id);
249
250
  },
250
251
  children: [
251
- /* @__PURE__ */ p("header", {
252
+ /* @__PURE__ */ m("header", {
252
253
  className: "p-2 border-b space-y-1",
253
- children: [/* @__PURE__ */ p("div", {
254
+ children: [/* @__PURE__ */ m("div", {
254
255
  className: "flex items-center justify-between gap-1",
255
- children: [/* @__PURE__ */ f("h3", {
256
+ children: [/* @__PURE__ */ p("h3", {
256
257
  className: "text-sm font-medium truncate",
257
- children: o.name
258
- }), /* @__PURE__ */ f("span", {
259
- "data-testid": `board-column-count-${o.name}`,
258
+ children: r.name
259
+ }), /* @__PURE__ */ p("span", {
260
+ "data-testid": `board-column-count-${r.name}`,
260
261
  className: `text-xs rounded-full px-1.5 ${y ? "bg-status-warning-subtle text-status-warning" : "bg-muted"}`,
261
- title: o.wipLimit ? `WIP limit ${o.wipLimit}` : void 0,
262
- children: o.wipLimit ? `${v} / ${o.wipLimit}` : v
262
+ title: r.wipLimit ? `WIP limit ${r.wipLimit}` : void 0,
263
+ children: r.wipLimit ? `${v} / ${r.wipLimit}` : v
263
264
  })]
264
- }), /* @__PURE__ */ p("div", {
265
+ }), /* @__PURE__ */ m("div", {
265
266
  className: "flex items-center justify-between gap-1",
266
- children: [/* @__PURE__ */ f("span", {
267
+ children: [/* @__PURE__ */ p("span", {
267
268
  className: "text-[11px] text-muted-foreground",
268
- children: o.mappedStatus ? `Sets status: ${P(o.mappedStatus)}` : "No status"
269
- }), /* @__PURE__ */ p("span", {
269
+ children: r.mappedStatus ? `Sets status: ${P(r.mappedStatus)}` : "No status"
270
+ }), /* @__PURE__ */ m("span", {
270
271
  className: "flex",
271
272
  children: [
272
- /* @__PURE__ */ f(C, {
273
+ /* @__PURE__ */ p(w, {
273
274
  size: "icon",
274
275
  variant: "ghost",
275
276
  className: "h-6 w-6",
276
- "aria-label": `Move ${o.name} column left`,
277
+ "aria-label": `Move ${r.name} column left`,
277
278
  disabled: c,
278
- onClick: () => m(-1),
279
- children: /* @__PURE__ */ f(i, { className: "h-3.5 w-3.5" })
279
+ onClick: () => f(-1),
280
+ children: /* @__PURE__ */ p(a, { className: "h-3.5 w-3.5" })
280
281
  }),
281
- /* @__PURE__ */ f(C, {
282
+ /* @__PURE__ */ p(w, {
282
283
  size: "icon",
283
284
  variant: "ghost",
284
285
  className: "h-6 w-6",
285
- "aria-label": `Move ${o.name} column right`,
286
+ "aria-label": `Move ${r.name} column right`,
286
287
  disabled: l,
287
- onClick: () => m(1),
288
- children: /* @__PURE__ */ f(a, { className: "h-3.5 w-3.5" })
288
+ onClick: () => f(1),
289
+ children: /* @__PURE__ */ p(o, { className: "h-3.5 w-3.5" })
289
290
  }),
290
- /* @__PURE__ */ f(Y, {
291
+ /* @__PURE__ */ p(Y, {
291
292
  boardId: e,
292
- column: o
293
+ column: r
293
294
  })
294
295
  ]
295
296
  })]
296
297
  })]
297
298
  }),
298
- /* @__PURE__ */ p("ul", {
299
+ /* @__PURE__ */ m("ul", {
299
300
  className: "p-2 space-y-2 min-h-[80px]",
300
- children: [o.cards.items.map((e) => /* @__PURE__ */ p("li", {
301
+ children: [r.cards.items.map((e) => /* @__PURE__ */ m("li", {
301
302
  draggable: !0,
302
303
  onDragStart: (t) => {
303
304
  t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
@@ -305,43 +306,43 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
305
306
  className: "rounded-md border bg-background p-2 space-y-1 cursor-grab",
306
307
  "data-testid": "board-card",
307
308
  children: [
308
- /* @__PURE__ */ f("button", {
309
+ /* @__PURE__ */ p("button", {
309
310
  type: "button",
310
311
  className: "text-left text-sm font-medium leading-tight hover:underline",
311
312
  onClick: () => h(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
312
313
  children: e.title
313
314
  }),
314
- /* @__PURE__ */ p("div", {
315
+ /* @__PURE__ */ m("div", {
315
316
  className: "flex items-center justify-between text-[11px] text-muted-foreground",
316
- children: [/* @__PURE__ */ f("span", { children: e.key }), /* @__PURE__ */ p("span", { children: [e.storyPoints ?? 0, " pts"] })]
317
+ children: [/* @__PURE__ */ p("span", { children: e.key }), /* @__PURE__ */ m("span", { children: [e.storyPoints ?? 0, " pts"] })]
317
318
  }),
318
- /* @__PURE__ */ p("div", {
319
+ /* @__PURE__ */ m("div", {
319
320
  className: "flex items-center justify-between gap-1 text-[11px] text-muted-foreground",
320
- children: [/* @__PURE__ */ f("span", {
321
+ children: [/* @__PURE__ */ p("span", {
321
322
  className: "truncate",
322
- children: e.assigneeId ? /* @__PURE__ */ f(n, { id: e.assigneeId }) : "Unassigned"
323
- }), /* @__PURE__ */ p("select", {
323
+ children: e.assigneeId ? /* @__PURE__ */ p(n, { id: e.assigneeId }) : "Unassigned"
324
+ }), /* @__PURE__ */ m("select", {
324
325
  "aria-label": `Move ${e.key} to column`,
325
326
  className: "rounded border border-input bg-background px-1 py-0.5 text-[11px]",
326
327
  value: "",
327
328
  disabled: u,
328
329
  onChange: (t) => t.target.value && d(e.id, t.target.value),
329
- children: [/* @__PURE__ */ f("option", {
330
+ children: [/* @__PURE__ */ p("option", {
330
331
  value: "",
331
332
  children: "Move…"
332
- }), s.filter((e) => e.id !== o.id).map((e) => /* @__PURE__ */ f("option", {
333
+ }), s.filter((e) => e.id !== r.id).map((e) => /* @__PURE__ */ p("option", {
333
334
  value: e.id,
334
335
  children: e.name
335
336
  }, e.id))]
336
337
  })]
337
338
  })
338
339
  ]
339
- }, e.id)), v === 0 && /* @__PURE__ */ f("li", {
340
+ }, e.id)), v === 0 && /* @__PURE__ */ p("li", {
340
341
  className: "text-xs text-muted-foreground text-center py-4",
341
342
  children: "Empty"
342
343
  })]
343
344
  }),
344
- b > 0 && /* @__PURE__ */ p("p", {
345
+ b > 0 && /* @__PURE__ */ m("p", {
345
346
  className: "px-2 pb-2 text-xs text-muted-foreground",
346
347
  children: [
347
348
  "+",
@@ -355,128 +356,128 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
355
356
  });
356
357
  }
357
358
  function Y({ boardId: e, column: t }) {
358
- let n = t !== void 0, [i, a] = r(!1), [o, l] = r(t?.name ?? ""), [d, w] = r(t?.mappedStatus ?? ""), [T, F] = r(t?.wipLimit ? String(t.wipLimit) : ""), [I, L] = r(null), R = {
359
+ let n = t !== void 0, [a, o] = i(!1), [s, u] = i(t?.name ?? ""), [f, T] = i(t?.mappedStatus ?? ""), [E, F] = i(t?.wipLimit ? String(t.wipLimit) : ""), [I, L] = i(null), R = {
359
360
  refetchQueries: W,
360
361
  awaitRefetchQueries: !0
361
- }, [z, U] = u(B, R), [q, J] = u(V, R), [Y, te] = u(H, R), X = U.loading || J.loading || te.loading, Z = T.trim() === "" ? null : Number(T), Q = Z !== null && (!Number.isInteger(Z) || Z < 1), ne = o.trim() !== "" && !Q && !X, re = () => {
362
- l(t?.name ?? ""), w(t?.mappedStatus ?? ""), F(t?.wipLimit ? String(t.wipLimit) : ""), L(null);
363
- }, ie = async () => {
362
+ }, [z, U] = d(B, R), [q, J] = d(V, R), [Y, ne] = d(H, R), X = U.loading || J.loading || ne.loading, Z = E.trim() === "" ? null : Number(E), Q = Z !== null && (!Number.isInteger(Z) || Z < 1), re = s.trim() !== "" && !Q && !X, ie = () => {
363
+ u(t?.name ?? ""), T(t?.mappedStatus ?? ""), F(t?.wipLimit ? String(t.wipLimit) : ""), L(null);
364
+ }, ae = async () => {
364
365
  L(null);
365
- let r = {
366
- name: o.trim(),
367
- mappedStatus: d || null,
366
+ let i = {
367
+ name: s.trim(),
368
+ mappedStatus: f || null,
368
369
  wipLimit: Z
369
370
  };
370
371
  try {
371
- n ? await q({ variables: {
372
+ n ? await r(q({ variables: {
372
373
  id: t.id,
373
- input: r
374
- } }) : await z({ variables: { input: {
374
+ input: i
375
+ } })) : await r(z({ variables: { input: {
375
376
  boardId: e,
376
377
  type: "CUSTOM",
377
- ...r
378
- } } }), a(!1);
378
+ ...i
379
+ } } })), o(!1);
379
380
  } catch (e) {
380
381
  L(G(e, "The column could not be saved."));
381
382
  }
382
383
  }, $ = n ? `column-${t.id}` : "new-column";
383
- return /* @__PURE__ */ p(D, {
384
- open: i,
384
+ return /* @__PURE__ */ m(O, {
385
+ open: a,
385
386
  onOpenChange: (e) => {
386
- a(e), e && re();
387
+ o(e), e && ie();
387
388
  },
388
- children: [/* @__PURE__ */ f(N, {
389
+ children: [/* @__PURE__ */ p(ee, {
389
390
  asChild: !0,
390
- children: n ? /* @__PURE__ */ f(C, {
391
+ children: n ? /* @__PURE__ */ p(w, {
391
392
  size: "icon",
392
393
  variant: "ghost",
393
394
  className: "h-6 w-6",
394
395
  "aria-label": `Edit ${t.name} column`,
395
- children: /* @__PURE__ */ f(s, { className: "h-3.5 w-3.5" })
396
- }) : /* @__PURE__ */ p(C, {
396
+ children: /* @__PURE__ */ p(c, { className: "h-3.5 w-3.5" })
397
+ }) : /* @__PURE__ */ m(w, {
397
398
  size: "sm",
398
399
  variant: "outline",
399
- children: [/* @__PURE__ */ f(c, { className: "mr-1 h-4 w-4" }), "Add column"]
400
+ children: [/* @__PURE__ */ p(l, { className: "mr-1 h-4 w-4" }), "Add column"]
400
401
  })
401
- }), /* @__PURE__ */ p(O, {
402
+ }), /* @__PURE__ */ m(k, {
402
403
  className: "max-w-md",
403
404
  children: [
404
- /* @__PURE__ */ p(j, { children: [/* @__PURE__ */ f(M, { children: n ? `Edit ${t.name}` : "Add column" }), /* @__PURE__ */ f(k, { children: "Moving a card into a column that sets a status changes the work item's status." })] }),
405
- /* @__PURE__ */ p("div", {
405
+ /* @__PURE__ */ m(M, { children: [/* @__PURE__ */ p(N, { children: n ? `Edit ${t.name}` : "Add column" }), /* @__PURE__ */ p(A, { children: "Moving a card into a column that sets a status changes the work item's status." })] }),
406
+ /* @__PURE__ */ m("div", {
406
407
  className: "space-y-3",
407
408
  children: [
408
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
409
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
409
410
  htmlFor: `${$}-name`,
410
411
  className: "text-sm font-medium",
411
412
  children: "Name"
412
- }), /* @__PURE__ */ f(E, {
413
+ }), /* @__PURE__ */ p(D, {
413
414
  id: `${$}-name`,
414
415
  className: "mt-1",
415
- value: o,
416
- onChange: (e) => l(e.target.value)
416
+ value: s,
417
+ onChange: (e) => u(e.target.value)
417
418
  })] }),
418
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
419
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
419
420
  htmlFor: `${$}-status`,
420
421
  className: "text-sm font-medium",
421
422
  children: "Sets status"
422
- }), /* @__PURE__ */ p("select", {
423
+ }), /* @__PURE__ */ m("select", {
423
424
  id: `${$}-status`,
424
425
  className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
425
- value: d,
426
- onChange: (e) => w(e.target.value),
427
- children: [/* @__PURE__ */ f("option", {
426
+ value: f,
427
+ onChange: (e) => T(e.target.value),
428
+ children: [/* @__PURE__ */ p("option", {
428
429
  value: "",
429
430
  children: "No status (cards keep theirs)"
430
- }), ee.map((e) => /* @__PURE__ */ f("option", {
431
+ }), te.map((e) => /* @__PURE__ */ p("option", {
431
432
  value: e,
432
433
  children: P(e)
433
434
  }, e))]
434
435
  })] }),
435
- /* @__PURE__ */ p("div", { children: [
436
- /* @__PURE__ */ f("label", {
436
+ /* @__PURE__ */ m("div", { children: [
437
+ /* @__PURE__ */ p("label", {
437
438
  htmlFor: `${$}-wip`,
438
439
  className: "text-sm font-medium",
439
440
  children: "WIP limit (blank for none)"
440
441
  }),
441
- /* @__PURE__ */ f(E, {
442
+ /* @__PURE__ */ p(D, {
442
443
  id: `${$}-wip`,
443
444
  type: "number",
444
445
  min: 1,
445
446
  className: "mt-1",
446
- value: T,
447
+ value: E,
447
448
  onChange: (e) => F(e.target.value)
448
449
  }),
449
- Q && /* @__PURE__ */ f(K, { message: "The WIP limit must be a whole number, 1 or more." })
450
+ Q && /* @__PURE__ */ p(K, { message: "The WIP limit must be a whole number, 1 or more." })
450
451
  ] })
451
452
  ]
452
453
  }),
453
- I && /* @__PURE__ */ f(K, { message: I }),
454
- /* @__PURE__ */ p(A, {
454
+ I && /* @__PURE__ */ p(K, { message: I }),
455
+ /* @__PURE__ */ m(j, {
455
456
  className: "gap-2",
456
- children: [n && /* @__PURE__ */ p(m, { children: [/* @__PURE__ */ f(S, {
457
+ children: [n && /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(C, {
457
458
  asChild: !0,
458
- children: /* @__PURE__ */ f(C, {
459
+ children: /* @__PURE__ */ p(w, {
459
460
  variant: "outline",
460
461
  disabled: X,
461
462
  children: "Delete column"
462
463
  })
463
- }), /* @__PURE__ */ p(_, { children: [/* @__PURE__ */ p(b, { children: [/* @__PURE__ */ p(x, { children: [
464
+ }), /* @__PURE__ */ m(v, { children: [/* @__PURE__ */ m(x, { children: [/* @__PURE__ */ m(S, { children: [
464
465
  "Delete ",
465
466
  t.name,
466
467
  "?"
467
- ] }), /* @__PURE__ */ f(v, { 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__ */ p(y, { children: [/* @__PURE__ */ f(g, { children: "Keep it" }), /* @__PURE__ */ f(h, {
468
+ ] }), /* @__PURE__ */ p(y, { 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__ */ m(b, { children: [/* @__PURE__ */ p(_, { children: "Keep it" }), /* @__PURE__ */ p(g, {
468
469
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
469
470
  onClick: async () => {
470
471
  try {
471
- await Y({ variables: { id: t.id } }), a(!1);
472
+ await r(Y({ variables: { id: t.id } })), o(!1);
472
473
  } catch (e) {
473
474
  L(G(e, "The column could not be deleted."));
474
475
  }
475
476
  },
476
477
  children: "Delete column"
477
- })] })] })] }), /* @__PURE__ */ f(C, {
478
- onClick: ie,
479
- disabled: !ne,
478
+ })] })] })] }), /* @__PURE__ */ p(w, {
479
+ onClick: ae,
480
+ disabled: !re,
480
481
  "data-testid": `${$}-save`,
481
482
  children: X ? "Saving…" : n ? "Save" : "Add column"
482
483
  })]