@burdenoff/microfe-healthybowl 2026.704.3 → 2026.704.5

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.
@@ -17,28 +17,28 @@ import { cva as h } from "../../../class-variance-authority/dist/index.js";
17
17
  import { createContext as g, useCallback as _, useContext as v, useEffect as y, useMemo as b, useState as x } from "react";
18
18
  import { CalendarDays as S, CalendarRange as C, ChevronDown as w, ChevronLeft as T, ChevronRight as E, ChevronUp as D, Circle as O, CircleCheckBig as k, CircleDashed as A, CircleDot as j, CircleDotDashed as M, CircleX as N, Flag as P, LayoutGrid as F, Link2 as I, List as L, Plus as R, Search as z, Trash2 as B, User as V } from "lucide-react";
19
19
  import { jsx as H, jsxs as U } from "react/jsx-runtime";
20
- import { Card as ee, CardContent as te } from "@burdenoff/fe-libs/ui";
21
- import { gql as W } from "@apollo/client";
22
- import { useApolloClient as ne, useMutation as re, useQuery as G } from "@apollo/client/react";
20
+ import { Card as W, CardContent as ee } from "@burdenoff/fe-libs/ui";
21
+ import { gql as G } from "@apollo/client";
22
+ import { useApolloClient as te, useMutation as ne, useQuery as K } from "@apollo/client/react";
23
23
  import "@apollo/client/core";
24
24
  import "@apollo/client/link/context";
25
25
  import "@apollo/client/link/error";
26
26
  //#region node_modules/@burdenoff/planmagnet-fe-sdk/dist/index.js
27
- var ie = {
27
+ var re = {
28
28
  apiGatewayUrl: "",
29
29
  workspaceId: ""
30
30
  };
31
31
  new Proxy({}, { get(e, t) {
32
- return ie[t];
32
+ return re[t];
33
33
  } });
34
- function ae() {
35
- return { ...ie };
34
+ function ie() {
35
+ return { ...re };
36
36
  }
37
- var oe = g(null);
38
- function K() {
39
- return v(oe);
37
+ var ae = g(null);
38
+ function q() {
39
+ return v(ae);
40
40
  }
41
- var se = W`
41
+ var oe = G`
42
42
  fragment WorkItemSummaryFields on WorkItem {
43
43
  id
44
44
  key
@@ -52,7 +52,7 @@ var se = W`
52
52
  dueDate
53
53
  labels
54
54
  }
55
- `, q = W`
55
+ `, se = G`
56
56
  fragment WorkItemFields on WorkItem {
57
57
  id
58
58
  workspaceId
@@ -81,7 +81,7 @@ var se = W`
81
81
  updatedBy
82
82
  deletedAt
83
83
  }
84
- `, ce = W`
84
+ `, ce = G`
85
85
  fragment ProjectSummaryFields on Project {
86
86
  id
87
87
  name
@@ -93,7 +93,7 @@ var se = W`
93
93
  endDate
94
94
  tags
95
95
  }
96
- `, le = W`
96
+ `, le = G`
97
97
  query ListWorkItems(
98
98
  $workspaceId: ID!
99
99
  $filter: PlanmagnetWorkItemFilter
@@ -117,16 +117,16 @@ var se = W`
117
117
  totalCount
118
118
  }
119
119
  }
120
- ${se}
121
- `, ue = W`
120
+ ${oe}
121
+ `, ue = G`
122
122
  query GetWorkItem($id: ID!) {
123
123
  planmagnetWorkItem(id: $id) {
124
124
  ...WorkItemFields
125
125
  }
126
126
  }
127
- ${q}
127
+ ${se}
128
128
  `;
129
- W`
129
+ G`
130
130
  query GetProjects(
131
131
  $workspaceId: ID!
132
132
  $filter: PlanmagnetProjectFilter
@@ -152,30 +152,30 @@ W`
152
152
  }
153
153
  ${ce}
154
154
  `;
155
- var de = W`
155
+ var de = G`
156
156
  mutation CreateWorkItem($input: PlanmagnetCreateWorkItemInput!) {
157
157
  planmagnetCreateWorkItem(input: $input) {
158
158
  ...WorkItemFields
159
159
  }
160
160
  }
161
- ${q}
162
- `, fe = W`
161
+ ${se}
162
+ `, fe = G`
163
163
  mutation UpdateWorkItem($id: ID!, $input: PlanmagnetUpdateWorkItemInput!) {
164
164
  planmagnetUpdateWorkItem(id: $id, input: $input) {
165
165
  ...WorkItemFields
166
166
  }
167
167
  }
168
- ${q}
168
+ ${se}
169
169
  `;
170
- W`
170
+ G`
171
171
  mutation MoveWorkItem($id: ID!, $input: PlanmagnetMoveWorkItemInput!) {
172
172
  planmagnetMoveWorkItem(id: $id, input: $input) {
173
173
  ...WorkItemFields
174
174
  }
175
175
  }
176
- ${q}
176
+ ${se}
177
177
  `;
178
- var pe = W`
178
+ var pe = G`
179
179
  fragment WorkItemLinkFields on WorkItemLink {
180
180
  id
181
181
  workspaceId
@@ -192,7 +192,7 @@ var pe = W`
192
192
  createdAt
193
193
  updatedAt
194
194
  }
195
- `, me = W`
195
+ `, me = G`
196
196
  query ListWorkItemLinks(
197
197
  $workspaceId: ID!
198
198
  $filter: PlanmagnetWorkItemLinkFilter
@@ -218,19 +218,19 @@ var pe = W`
218
218
  }
219
219
  ${pe}
220
220
  `;
221
- W`
221
+ G`
222
222
  mutation CreateWorkItemLink($input: PlanmagnetCreateWorkItemLinkInput!) {
223
223
  planmagnetLinkWorkItem(input: $input) {
224
224
  ...WorkItemLinkFields
225
225
  }
226
226
  }
227
227
  ${pe}
228
- `, W`
228
+ `, G`
229
229
  mutation UnlinkWorkItem($id: ID!) {
230
230
  planmagnetUnlinkWorkItem(id: $id)
231
231
  }
232
232
  `;
233
- var he = W`
233
+ var he = G`
234
234
  query ListMilestones(
235
235
  $workspaceId: ID!
236
236
  $filter: PlanmagnetMilestoneFilter
@@ -254,7 +254,7 @@ var he = W`
254
254
  totalCount
255
255
  }
256
256
  }
257
- ${W`
257
+ ${G`
258
258
  fragment MilestoneFields on Milestone {
259
259
  id
260
260
  projectId
@@ -268,7 +268,7 @@ var he = W`
268
268
  updatedAt
269
269
  }
270
270
  `}
271
- `, ge = W`
271
+ `, ge = G`
272
272
  mutation DeleteWorkItem($id: ID!) {
273
273
  planmagnetDeleteWorkItem(id: $id)
274
274
  }
@@ -283,16 +283,25 @@ function ve(e) {
283
283
  return o(t) ? t : null;
284
284
  }
285
285
  function ye(e) {
286
+ if (!e) return;
287
+ let t = /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00.000Z` : e, n = new Date(t);
288
+ return Number.isNaN(n.getTime()) ? void 0 : n.toISOString();
289
+ }
290
+ function be(e) {
286
291
  let t = ve(e);
287
292
  if (!t) return null;
288
293
  let n = /* @__PURE__ */ new Date();
289
294
  return d(t, t.getFullYear() === n.getFullYear() ? "MMM d" : "MMM d yyyy");
290
295
  }
291
- function be(e, t) {
296
+ function xe(e) {
297
+ let t = ve(e);
298
+ return t ? d(t, "MMM d, yyyy") : null;
299
+ }
300
+ function Se(e, t) {
292
301
  let n = ve(e);
293
302
  return !n || t && _e.has(t) ? !1 : i(n).getTime() < i(/* @__PURE__ */ new Date()).getTime();
294
303
  }
295
- var xe = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
304
+ var Ce = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
296
305
  variants: { variant: {
297
306
  default: "bg-primary/10 text-primary",
298
307
  muted: "bg-muted text-muted-foreground",
@@ -302,29 +311,29 @@ var xe = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-m
302
311
  } },
303
312
  defaultVariants: { variant: "default" }
304
313
  });
305
- function Se({ className: e, variant: t, ...n }) {
314
+ function we({ className: e, variant: t, ...n }) {
306
315
  return /* @__PURE__ */ H("span", {
307
- className: J(xe({ variant: t }), e),
316
+ className: J(Ce({ variant: t }), e),
308
317
  ...n
309
318
  });
310
319
  }
311
- var Ce = [
320
+ var Te = [
312
321
  "bg-primary/15 text-primary",
313
322
  "bg-secondary text-secondary-foreground",
314
323
  "bg-accent text-accent-foreground",
315
324
  "bg-muted text-muted-foreground",
316
325
  "bg-destructive/15 text-destructive"
317
- ], we = {
326
+ ], Ee = {
318
327
  sm: "h-5 w-5 text-[9px]",
319
328
  md: "h-6 w-6 text-[10px]",
320
329
  lg: "h-8 w-8 text-xs"
321
330
  };
322
- function Te(e) {
331
+ function De(e) {
323
332
  let t = 0;
324
333
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
325
- return t % Ce.length;
334
+ return t % Te.length;
326
335
  }
327
- function Ee(e, t) {
336
+ function Oe(e, t) {
328
337
  let n = (e ?? "").trim();
329
338
  if (n) {
330
339
  let e = n.split(/\s+/);
@@ -332,9 +341,9 @@ function Ee(e, t) {
332
341
  }
333
342
  return (t ?? "").replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase() || "?";
334
343
  }
335
- function De({ id: e, name: t, size: n = "md", className: r }) {
344
+ function ke({ id: e, name: t, size: n = "md", className: r }) {
336
345
  if (!e && !t) return /* @__PURE__ */ H("span", {
337
- className: J("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", we[n], r),
346
+ className: J("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", Ee[n], r),
338
347
  title: "Unassigned",
339
348
  "aria-label": "Unassigned",
340
349
  children: /* @__PURE__ */ H(V, {
@@ -342,15 +351,15 @@ function De({ id: e, name: t, size: n = "md", className: r }) {
342
351
  "aria-hidden": "true"
343
352
  })
344
353
  });
345
- let i = Ce[Te(t || e || "")];
354
+ let i = Te[De(t || e || "")];
346
355
  return /* @__PURE__ */ H("span", {
347
- className: J("inline-flex items-center justify-center rounded-full font-medium", we[n], i, r),
356
+ className: J("inline-flex items-center justify-center rounded-full font-medium", Ee[n], i, r),
348
357
  title: t ?? e ?? void 0,
349
358
  "aria-label": t ?? e ?? void 0,
350
- children: Ee(t, e)
359
+ children: Oe(t, e)
351
360
  });
352
361
  }
353
- var Oe = [
362
+ var Ae = [
354
363
  {
355
364
  status: "BACKLOG",
356
365
  label: "Backlog"
@@ -374,20 +383,24 @@ var Oe = [
374
383
  {
375
384
  status: "DONE",
376
385
  label: "Done"
386
+ },
387
+ {
388
+ status: "CANCELLED",
389
+ label: "Cancelled"
377
390
  }
378
- ], ke = [
391
+ ], je = [
379
392
  "NONE",
380
393
  "LOW",
381
394
  "MEDIUM",
382
395
  "HIGH",
383
396
  "CRITICAL"
384
- ], Ae = [
397
+ ], Me = [
385
398
  "TASK",
386
399
  "STORY",
387
400
  "BUG",
388
401
  "EPIC",
389
402
  "SUB_TASK"
390
- ], je = [
403
+ ], Ne = [
391
404
  "BACKLOG",
392
405
  "TODO",
393
406
  "IN_PROGRESS",
@@ -396,16 +409,16 @@ var Oe = [
396
409
  "DONE",
397
410
  "CANCELLED"
398
411
  ];
399
- function Me(e) {
412
+ function Pe(e) {
400
413
  return e.toLowerCase().replace(/_/g, " ");
401
414
  }
402
- function Ne({ link: e, renderIcon: t, className: n }) {
403
- let r = e.displayNameSnapshot || Me(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ H(I, {
415
+ function Fe({ link: e, renderIcon: t, className: n }) {
416
+ let r = e.displayNameSnapshot || Pe(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ H(I, {
404
417
  className: "h-3 w-3 shrink-0",
405
418
  "aria-hidden": "true"
406
419
  }), a = /* @__PURE__ */ U("span", {
407
420
  className: J("inline-flex max-w-full items-center gap-1 rounded-full border border-primary/20 bg-primary/5 px-1.5 py-0.5 text-[10px] font-medium text-primary", n),
408
- title: `${Me(e.relationType)} \xB7 ${Me(e.entityType)}`,
421
+ title: `${Pe(e.relationType)} \xB7 ${Pe(e.entityType)}`,
409
422
  children: [i, /* @__PURE__ */ H("span", {
410
423
  className: "truncate",
411
424
  children: r
@@ -418,7 +431,7 @@ function Ne({ link: e, renderIcon: t, className: n }) {
418
431
  children: a
419
432
  }) : a;
420
433
  }
421
- var Pe = {
434
+ var Ie = {
422
435
  board: "Board",
423
436
  list: "List",
424
437
  timeline: "Timeline",
@@ -430,6 +443,9 @@ var Pe = {
430
443
  noTasks: "No tasks",
431
444
  noTasksFound: "No tasks found.",
432
445
  dropHere: "Drop here",
446
+ moveConfirmTitle: "Move task?",
447
+ moveConfirmPrompt: "Move \"{task}\" to {status}?",
448
+ moveConfirm: "Move",
433
449
  unassigned: "Unassigned",
434
450
  assigned: "Assigned",
435
451
  overdue: "{n} overdue",
@@ -465,6 +481,9 @@ var Pe = {
465
481
  storyPointsLabel: "Story points",
466
482
  labelsLabel: "Labels",
467
483
  labelsPlaceholder: "comma, separated, labels",
484
+ linkedRecordsLabel: "Linked records",
485
+ createdLabel: "Created",
486
+ updatedLabel: "Updated",
468
487
  create: "Create task",
469
488
  creating: "Creating…",
470
489
  cancel: "Cancel",
@@ -507,29 +526,29 @@ var Pe = {
507
526
  EPIC: "Epic",
508
527
  SUB_TASK: "Sub Task"
509
528
  }
510
- }, Fe = g(Pe), Ie = Fe.Provider;
529
+ }, Le = g(Ie), Re = Le.Provider;
511
530
  function Y() {
512
- return v(Fe);
531
+ return v(Le);
513
532
  }
514
- function Le(e) {
533
+ function ze(e) {
515
534
  return e ? {
516
- ...Pe,
535
+ ...Ie,
517
536
  ...e,
518
537
  status: {
519
- ...Pe.status,
538
+ ...Ie.status,
520
539
  ...e.status
521
540
  },
522
541
  priority: {
523
- ...Pe.priority,
542
+ ...Ie.priority,
524
543
  ...e.priority
525
544
  },
526
545
  type: {
527
- ...Pe.type,
546
+ ...Ie.type,
528
547
  ...e.type
529
548
  }
530
- } : Pe;
549
+ } : Ie;
531
550
  }
532
- var Re = {
551
+ var Be = {
533
552
  BACKLOG: {
534
553
  icon: A,
535
554
  tone: "text-muted-foreground/60"
@@ -559,21 +578,21 @@ var Re = {
559
578
  tone: "text-destructive/70"
560
579
  }
561
580
  };
562
- function ze({ status: e, className: t }) {
563
- let n = Re[e] ?? Re.TODO, r = n.icon;
581
+ function Ve({ status: e, className: t }) {
582
+ let n = Be[e] ?? Be.TODO, r = n.icon;
564
583
  return /* @__PURE__ */ H(r, {
565
584
  className: J("h-3.5 w-3.5 shrink-0", n.tone, t),
566
585
  "aria-hidden": "true"
567
586
  });
568
587
  }
569
- function Be({ status: e, className: t }) {
588
+ function He({ status: e, className: t }) {
570
589
  let n = Y();
571
590
  return /* @__PURE__ */ U("span", {
572
591
  className: J("inline-flex items-center gap-1.5 rounded-md border border-border bg-muted/40 px-2 py-0.5 text-xs font-medium capitalize text-foreground", t),
573
- children: [/* @__PURE__ */ H(ze, { status: e }), n.status[e]]
592
+ children: [/* @__PURE__ */ H(Ve, { status: e }), n.status[e]]
574
593
  });
575
594
  }
576
- var Ve = {
595
+ var Ue = {
577
596
  NONE: {
578
597
  level: 0,
579
598
  tone: "text-muted-foreground/50"
@@ -594,42 +613,42 @@ var Ve = {
594
613
  level: 3,
595
614
  tone: "text-destructive"
596
615
  }
597
- }, He = [
616
+ }, We = [
598
617
  "h-1.5",
599
618
  "h-2.5",
600
619
  "h-3.5"
601
620
  ];
602
- function Ue({ priority: e, showLabel: t = !1, className: n }) {
603
- let r = Y(), i = Ve[e] ?? Ve.NONE;
621
+ function Ge({ priority: e, showLabel: t = !1, className: n }) {
622
+ let r = Y(), i = Ue[e] ?? Ue.NONE;
604
623
  return /* @__PURE__ */ U("span", {
605
624
  className: J("inline-flex items-center gap-1.5", i.tone, n),
606
625
  title: `${r.priorityLabel}: ${r.priority[e]}`,
607
626
  children: [/* @__PURE__ */ H("span", {
608
627
  className: "flex items-end gap-0.5",
609
628
  "aria-hidden": "true",
610
- children: He.map((e, t) => /* @__PURE__ */ H("span", { className: J("w-1 rounded-[1px]", e, t < i.level ? "bg-current" : "bg-current/25") }, e))
629
+ children: We.map((e, t) => /* @__PURE__ */ H("span", { className: J("w-1 rounded-[1px]", e, t < i.level ? "bg-current" : "bg-current/25") }, e))
611
630
  }), t && /* @__PURE__ */ H("span", {
612
631
  className: "text-xs font-medium capitalize",
613
632
  children: r.priority[e]
614
633
  })]
615
634
  });
616
635
  }
617
- var We = {
636
+ var Ke = {
618
637
  TASK: "secondary",
619
638
  STORY: "default",
620
639
  BUG: "destructive",
621
640
  EPIC: "accent",
622
641
  SUB_TASK: "muted"
623
642
  };
624
- function Ge({ type: e, className: t }) {
643
+ function qe({ type: e, className: t }) {
625
644
  let n = Y();
626
- return /* @__PURE__ */ H(Se, {
627
- variant: We[e],
645
+ return /* @__PURE__ */ H(we, {
646
+ variant: Ke[e],
628
647
  className: t,
629
648
  children: n.type[e]
630
649
  });
631
650
  }
632
- function Ke({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
651
+ function Je({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
633
652
  if (y(() => {
634
653
  if (!e) return;
635
654
  let n = (e) => {
@@ -657,21 +676,21 @@ function Ke({ open: e, onClose: t, children: n, ariaLabel: r, className: i, vari
657
676
  })
658
677
  });
659
678
  }
660
- function qe(e) {
661
- return /* @__PURE__ */ H(Ke, {
679
+ function Ye(e) {
680
+ return /* @__PURE__ */ H(Je, {
662
681
  variant: "modal",
663
682
  ...e
664
683
  });
665
684
  }
666
- function Je(e) {
667
- return /* @__PURE__ */ H(Ke, {
685
+ function Xe(e) {
686
+ return /* @__PURE__ */ H(Je, {
668
687
  variant: "drawer",
669
688
  ...e
670
689
  });
671
690
  }
672
- var Ye = /* @__PURE__ */ new Set();
673
- function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i, onDragEnd: a, dragging: o, resolveAssignee: s, links: c, renderLinkIcon: l, className: u }) {
674
- let d = Y(), f = be(e.dueDate, e.status), p = ye(e.dueDate), m = e.assigneeId ? s?.(e.assigneeId) : null, h = !t.has("key") || !t.has("type"), g = !t.has("links") && (c?.length ?? 0) > 0, _ = !t.has("labels") && (e.labels?.length ?? 0) > 0, v = !t.has("priority"), y = !t.has("storyPoints") && e.storyPoints != null, b = v || y, x = !t.has("assignee"), C = !t.has("dueDate") && !!p, w = x || C, T = !!n;
691
+ var Ze = /* @__PURE__ */ new Set();
692
+ function Qe({ task: e, hidden: t = Ze, onClick: n, draggable: r, onDragStart: i, onDragEnd: a, dragging: o, resolveAssignee: s, links: c, renderLinkIcon: l, className: u }) {
693
+ let d = Y(), f = Se(e.dueDate, e.status), p = be(e.dueDate), m = e.assigneeId ? s?.(e.assigneeId) : null, h = !t.has("key") || !t.has("type"), g = !t.has("links") && (c?.length ?? 0) > 0, _ = !t.has("labels") && (e.labels?.length ?? 0) > 0, v = !t.has("priority"), y = !t.has("storyPoints") && e.storyPoints != null, b = v || y, x = !t.has("assignee"), C = !t.has("dueDate") && !!p, w = x || C, T = !!n;
675
694
  return /* @__PURE__ */ U("div", {
676
695
  role: T ? "button" : void 0,
677
696
  tabIndex: T ? 0 : void 0,
@@ -689,7 +708,7 @@ function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i,
689
708
  children: [t.has("key") ? /* @__PURE__ */ H("span", {}) : /* @__PURE__ */ H("span", {
690
709
  className: "font-mono text-[10px] uppercase tracking-wide text-muted-foreground",
691
710
  children: e.key
692
- }), !t.has("type") && /* @__PURE__ */ H(Ge, { type: e.type })]
711
+ }), !t.has("type") && /* @__PURE__ */ H(qe, { type: e.type })]
693
712
  }),
694
713
  /* @__PURE__ */ H("p", {
695
714
  className: "line-clamp-2 text-sm font-medium leading-snug text-foreground",
@@ -697,7 +716,7 @@ function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i,
697
716
  }),
698
717
  g && /* @__PURE__ */ U("div", {
699
718
  className: "mt-1.5 flex flex-wrap gap-1",
700
- children: [c.slice(0, 3).map((e) => /* @__PURE__ */ H(Ne, {
719
+ children: [c.slice(0, 3).map((e) => /* @__PURE__ */ H(Fe, {
701
720
  link: e,
702
721
  renderIcon: l
703
722
  }, e.id)), c.length > 3 && /* @__PURE__ */ U("span", {
@@ -717,7 +736,7 @@ function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i,
717
736
  }),
718
737
  b && /* @__PURE__ */ U("div", {
719
738
  className: "mt-2 flex items-center justify-between",
720
- children: [v ? /* @__PURE__ */ H(Ue, {
739
+ children: [v ? /* @__PURE__ */ H(Ge, {
721
740
  priority: e.priority,
722
741
  showLabel: !0
723
742
  }) : /* @__PURE__ */ H("span", {}), y && /* @__PURE__ */ H("span", {
@@ -730,7 +749,7 @@ function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i,
730
749
  className: "mt-2 flex items-center justify-between gap-2",
731
750
  children: [x ? /* @__PURE__ */ U("span", {
732
751
  className: "flex min-w-0 items-center gap-1.5",
733
- children: [/* @__PURE__ */ H(De, {
752
+ children: [/* @__PURE__ */ H(ke, {
734
753
  id: e.assigneeId,
735
754
  name: m?.name,
736
755
  size: "sm"
@@ -750,8 +769,8 @@ function Xe({ task: e, hidden: t = Ye, onClick: n, draggable: r, onDragStart: i,
750
769
  ]
751
770
  });
752
771
  }
753
- function Ze(e, t, n = 500) {
754
- let { data: r, loading: i } = G(me, {
772
+ function $e(e, t, n = 500) {
773
+ let { data: r, loading: i } = K(me, {
755
774
  variables: {
756
775
  workspaceId: e,
757
776
  ...t ? { filter: { sourceProduct: t } } : {},
@@ -771,101 +790,104 @@ function Ze(e, t, n = 500) {
771
790
  loading: i
772
791
  };
773
792
  }
774
- function Qe({ projectId: e, columns: t = Oe, readonly: n, hideHeader: r, priority: i = "ALL", type: a = "ALL", search: o = "", assigneeId: s, hiddenFields: c, resolveAssignee: l, linkSourceProduct: u, renderLinkIcon: d, onTaskClick: f, className: p, workspaceId: m }) {
775
- let h = K(), g = m ?? h?.workspaceId, v = ne(), y = Y(), S = b(() => new Set(c ?? []), [c]), { linksByItem: C } = Ze(g, u), [w, T] = x(null), [E, D] = x(null), [O, k] = x(null), [A] = re(fe), { data: j, loading: M, error: N } = G(le, {
793
+ function et({ projectId: e, columns: t = Ae, readonly: n, confirmMove: r = !0, hideHeader: i, priority: a = "ALL", type: o = "ALL", search: s = "", assigneeId: c, hiddenFields: l, resolveAssignee: u, linkSourceProduct: d, renderLinkIcon: f, onTaskClick: p, className: m, workspaceId: h }) {
794
+ let g = q(), v = h ?? g?.workspaceId, y = te(), S = Y(), C = b(() => new Set(l ?? []), [l]), { linksByItem: w } = $e(v, d), [T, E] = x(null), [D, O] = x(null), [k, A] = x(null), [j, M] = x(null), [N] = ne(fe), { data: P, loading: F, error: I } = K(le, {
776
795
  variables: {
777
- workspaceId: g,
796
+ workspaceId: v,
778
797
  ...e ? { filter: { projectId: e } } : {},
779
798
  pagination: { first: 200 }
780
799
  },
781
- skip: !g
782
- }), P = _((e, t) => {
800
+ skip: !v
801
+ }), L = _((e, t) => {
783
802
  let n = e.status;
784
803
  if (n === t) return;
785
- let r = v.cache.identify({
804
+ let r = y.cache.identify({
786
805
  __typename: "WorkItem",
787
806
  id: e.id
788
807
  });
789
- r && (k(null), v.cache.modify({
808
+ r && (A(null), y.cache.modify({
790
809
  id: r,
791
810
  fields: { status: () => t }
792
- }), A({ variables: {
811
+ }), N({ variables: {
793
812
  id: e.id,
794
813
  input: { status: t }
795
814
  } }).catch(() => {
796
- v.cache.modify({
815
+ y.cache.modify({
797
816
  id: r,
798
817
  fields: { status: () => n }
799
- }), k(y.moveFailed);
818
+ }), A(S.moveFailed);
800
819
  }));
801
820
  }, [
802
- v,
803
- A,
804
- y
821
+ y,
822
+ N,
823
+ S
805
824
  ]);
806
- if (!g) return /* @__PURE__ */ H("div", {
807
- className: J("p-6 text-sm text-destructive", p),
825
+ if (!v) return /* @__PURE__ */ H("div", {
826
+ className: J("p-6 text-sm text-destructive", m),
808
827
  children: "TaskBoard: no workspaceId provided (prop or PlanMagnetProvider)."
809
828
  });
810
- if (M && !j) return /* @__PURE__ */ H("div", {
811
- className: J("flex items-center justify-center p-12", p),
829
+ if (F && !P) return /* @__PURE__ */ H("div", {
830
+ className: J("flex items-center justify-center p-12", m),
812
831
  children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
813
832
  });
814
- if (N && !j) return /* @__PURE__ */ U("div", {
815
- className: J("p-6 text-sm text-destructive", p),
833
+ if (I && !P) return /* @__PURE__ */ U("div", {
834
+ className: J("p-6 text-sm text-destructive", m),
816
835
  children: [
817
- y.errorLoading,
836
+ S.errorLoading,
818
837
  ": ",
819
- N.message
838
+ I.message
820
839
  ]
821
840
  });
822
- let F = j?.planmagnetWorkItems?.items ?? [], I = o.trim().toLowerCase(), L = F.filter((e) => !(i !== "ALL" && e.priority !== i || a !== "ALL" && e.type !== a || s && e.assigneeId !== s || I && ![
841
+ let R = P?.planmagnetWorkItems?.items ?? [], z = s.trim().toLowerCase(), B = R.filter((e) => !(a !== "ALL" && e.priority !== a || o !== "ALL" && e.type !== o || c && e.assigneeId !== c || z && ![
823
842
  e.title,
824
843
  e.key,
825
844
  ...e.labels ?? []
826
- ].join(" ").toLowerCase().includes(I))), R = !n, z = (e) => (t) => {
827
- !R || !w || (t.preventDefault(), E !== e && D(e));
828
- }, B = (e) => (t) => {
829
- if (!R) return;
845
+ ].join(" ").toLowerCase().includes(z))), V = !n, W = (e) => (t) => {
846
+ !V || !T || (t.preventDefault(), D !== e && O(e));
847
+ }, ee = (e) => (t) => {
848
+ if (!V) return;
830
849
  t.preventDefault();
831
- let n = F.find((e) => e.id === w);
832
- D(null), T(null), n && P(n, e);
850
+ let n = R.find((e) => e.id === T);
851
+ O(null), E(null), !(!n || n.status === e) && (r ? M({
852
+ task: n,
853
+ toStatus: e
854
+ }) : L(n, e));
833
855
  };
834
856
  return /* @__PURE__ */ U("div", {
835
- className: J("space-y-3", p),
857
+ className: J("space-y-3", m),
836
858
  children: [
837
- !r && /* @__PURE__ */ U("div", {
859
+ !i && /* @__PURE__ */ U("div", {
838
860
  className: "flex items-baseline justify-between",
839
861
  children: [/* @__PURE__ */ H("h2", {
840
862
  className: "text-lg font-semibold text-foreground",
841
- children: y.board
863
+ children: S.board
842
864
  }), /* @__PURE__ */ U("span", {
843
865
  className: "text-sm text-muted-foreground",
844
866
  children: [
845
- L.length,
867
+ B.length,
846
868
  " ",
847
- L.length === 1 ? y.tasksSingular : y.tasksPlural
869
+ B.length === 1 ? S.tasksSingular : S.tasksPlural
848
870
  ]
849
871
  })]
850
872
  }),
851
- O && /* @__PURE__ */ H("div", {
873
+ k && /* @__PURE__ */ H("div", {
852
874
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-1.5 text-xs text-destructive",
853
- children: O
875
+ children: k
854
876
  }),
855
877
  /* @__PURE__ */ H("div", {
856
878
  className: "flex gap-3 overflow-x-auto pb-2",
857
879
  children: t.map((e) => {
858
- let t = L.filter((t) => t.status === e.status), n = E === e.status;
880
+ let t = B.filter((t) => t.status === e.status), n = D === e.status;
859
881
  return /* @__PURE__ */ U("div", {
860
- onDragOver: z(e.status),
861
- onDragLeave: () => E === e.status && D(null),
862
- onDrop: B(e.status),
882
+ onDragOver: W(e.status),
883
+ onDragLeave: () => D === e.status && O(null),
884
+ onDrop: ee(e.status),
863
885
  className: J("flex w-72 shrink-0 flex-col rounded-lg border transition-colors", n ? "border-primary/50 bg-primary/5" : "border-transparent bg-muted/40"),
864
886
  children: [/* @__PURE__ */ U("div", {
865
887
  className: "flex items-center justify-between gap-2 px-3 py-2",
866
888
  children: [/* @__PURE__ */ U("span", {
867
889
  className: "flex items-center gap-2 text-sm font-medium text-foreground",
868
- children: [/* @__PURE__ */ H(ze, { status: e.status }), y.status[e.status]]
890
+ children: [/* @__PURE__ */ H(Ve, { status: e.status }), S.status[e.status]]
869
891
  }), /* @__PURE__ */ H("span", {
870
892
  className: "rounded-full bg-muted px-1.5 text-xs font-medium text-muted-foreground",
871
893
  children: t.length
@@ -874,33 +896,68 @@ function Qe({ projectId: e, columns: t = Oe, readonly: n, hideHeader: r, priorit
874
896
  className: "flex flex-col gap-2 px-2 pb-2",
875
897
  children: t.length === 0 ? /* @__PURE__ */ H("div", {
876
898
  className: "rounded-md border border-dashed border-border/70 px-3 py-6 text-center text-xs text-muted-foreground",
877
- children: n ? y.dropHere : y.noTasks
878
- }) : t.map((e) => /* @__PURE__ */ H(Xe, {
899
+ children: n ? S.dropHere : S.noTasks
900
+ }) : t.map((e) => /* @__PURE__ */ H(Qe, {
879
901
  task: e,
880
- hidden: S,
881
- onClick: f,
882
- draggable: R,
883
- dragging: w === e.id,
884
- resolveAssignee: l,
885
- links: C.get(e.id),
886
- renderLinkIcon: d,
902
+ hidden: C,
903
+ onClick: p,
904
+ draggable: V,
905
+ dragging: T === e.id,
906
+ resolveAssignee: u,
907
+ links: w.get(e.id),
908
+ renderLinkIcon: f,
887
909
  onDragStart: (e, t) => {
888
- T(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id);
910
+ E(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id);
889
911
  },
890
912
  onDragEnd: () => {
891
- T(null), D(null);
913
+ E(null), O(null);
892
914
  }
893
915
  }, e.id))
894
916
  })]
895
917
  }, e.status);
896
918
  })
919
+ }),
920
+ /* @__PURE__ */ H(Ye, {
921
+ open: j != null,
922
+ onClose: () => M(null),
923
+ ariaLabel: S.moveConfirmTitle,
924
+ className: "max-w-sm",
925
+ children: j && /* @__PURE__ */ U("div", {
926
+ className: "space-y-4 p-6",
927
+ children: [
928
+ /* @__PURE__ */ H("h3", {
929
+ className: "text-base font-semibold text-foreground",
930
+ children: S.moveConfirmTitle
931
+ }),
932
+ /* @__PURE__ */ H("p", {
933
+ className: "text-sm text-muted-foreground",
934
+ children: S.moveConfirmPrompt.replace("{task}", j.task.title).replace("{status}", S.status[j.toStatus])
935
+ }),
936
+ /* @__PURE__ */ U("div", {
937
+ className: "flex items-center justify-end gap-2",
938
+ children: [/* @__PURE__ */ H("button", {
939
+ type: "button",
940
+ onClick: () => M(null),
941
+ className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
942
+ children: S.cancel
943
+ }), /* @__PURE__ */ H("button", {
944
+ type: "button",
945
+ onClick: () => {
946
+ L(j.task, j.toStatus), M(null);
947
+ },
948
+ className: "rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:brightness-110",
949
+ children: S.moveConfirm
950
+ })]
951
+ })
952
+ ]
953
+ })
897
954
  })
898
955
  ]
899
956
  });
900
957
  }
901
- var $e = "TASK", et = "BACKLOG", tt = "NONE", X = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", Z = "text-sm font-medium text-foreground";
902
- function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues: r, hideHeader: i, submitLabel: a, onCreated: o, onError: s, onCancel: c, className: l, workspaceId: u }) {
903
- let d = K(), f = u ?? d?.workspaceId, p = e ?? r?.projectId, m = Y(), h = b(() => new Set(n ?? []), [n]), [g, _] = x(r?.title ?? ""), [v, y] = x(r?.description ?? ""), [S, C] = x(r?.type ?? $e), [w, T] = x(r?.status ?? et), [E, D] = x(r?.priority ?? tt), [O, k] = x(r?.assigneeId ?? ""), [A, j] = x(r?.dueDate ?? ""), [M, N] = x((r?.labels ?? []).join(", ")), [P, F] = x(r?.storyPoints == null ? "" : String(r.storyPoints)), [I, { loading: L, error: R }] = re(de), z = !!(f && p && g.trim()), B = async (e) => {
958
+ var tt = "TASK", nt = "BACKLOG", rt = "NONE", X = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", Z = "text-sm font-medium text-foreground";
959
+ function it({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues: r, hideHeader: i, submitLabel: a, onCreated: o, onError: s, onCancel: c, className: l, workspaceId: u }) {
960
+ let d = q(), f = u ?? d?.workspaceId, p = e ?? r?.projectId, m = Y(), h = b(() => new Set(n ?? []), [n]), [g, _] = x(r?.title ?? ""), [v, y] = x(r?.description ?? ""), [S, C] = x(r?.type ?? tt), [w, T] = x(r?.status ?? nt), [E, D] = x(r?.priority ?? rt), [O, k] = x(r?.assigneeId ?? ""), [A, j] = x(r?.dueDate ?? ""), [M, N] = x((r?.labels ?? []).join(", ")), [P, F] = x(r?.storyPoints == null ? "" : String(r.storyPoints)), [I, { loading: L, error: R }] = ne(de), z = !!(f && p && g.trim()), B = async (e) => {
904
961
  if (e.preventDefault(), !z || !p) return;
905
962
  let t = M.split(",").map((e) => e.trim()).filter(Boolean), n = P.trim() ? Number(P) : void 0, r = {
906
963
  projectId: p,
@@ -910,14 +967,14 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
910
967
  ...h.has("priority") ? {} : { priority: E },
911
968
  ...h.has("description") || !v.trim() ? {} : { description: v.trim() },
912
969
  ...h.has("assignee") || !O.trim() ? {} : { assigneeId: O.trim() },
913
- ...h.has("dueDate") || !A.trim() ? {} : { dueDate: A },
970
+ ...h.has("dueDate") || !A.trim() ? {} : { dueDate: ye(A) },
914
971
  ...h.has("labels") || t.length === 0 ? {} : { labels: t },
915
972
  ...h.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
916
973
  };
917
974
  try {
918
975
  let e = (await I({ variables: { input: r } })).data?.planmagnetCreateWorkItem;
919
976
  if (e) {
920
- let t = ae();
977
+ let t = ie();
921
978
  try {
922
979
  await t.onTaskSaved?.({
923
980
  id: e.id,
@@ -934,11 +991,11 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
934
991
  }
935
992
  };
936
993
  function V() {
937
- _(""), y(""), C($e), T(et), D(tt), k(""), j(""), N(""), F("");
994
+ _(""), y(""), C(tt), T(nt), D(rt), k(""), j(""), N(""), F("");
938
995
  }
939
- return f ? /* @__PURE__ */ H(ee, {
996
+ return f ? /* @__PURE__ */ H(W, {
940
997
  className: J("shadow-sm", l),
941
- children: /* @__PURE__ */ H(te, {
998
+ children: /* @__PURE__ */ H(ee, {
942
999
  className: "p-6",
943
1000
  children: /* @__PURE__ */ U("form", {
944
1001
  onSubmit: B,
@@ -998,7 +1055,7 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
998
1055
  className: J(X, "capitalize"),
999
1056
  value: S,
1000
1057
  onChange: (e) => C(e.target.value),
1001
- children: Ae.map((e) => /* @__PURE__ */ H("option", {
1058
+ children: Me.map((e) => /* @__PURE__ */ H("option", {
1002
1059
  value: e,
1003
1060
  children: m.type[e]
1004
1061
  }, e))
@@ -1015,7 +1072,7 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1015
1072
  className: J(X, "capitalize"),
1016
1073
  value: w,
1017
1074
  onChange: (e) => T(e.target.value),
1018
- children: je.map((e) => /* @__PURE__ */ H("option", {
1075
+ children: Ne.map((e) => /* @__PURE__ */ H("option", {
1019
1076
  value: e,
1020
1077
  children: m.status[e]
1021
1078
  }, e))
@@ -1032,7 +1089,7 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1032
1089
  className: J(X, "capitalize"),
1033
1090
  value: E,
1034
1091
  onChange: (e) => D(e.target.value),
1035
- children: ke.map((e) => /* @__PURE__ */ H("option", {
1092
+ children: je.map((e) => /* @__PURE__ */ H("option", {
1036
1093
  value: e,
1037
1094
  children: m.priority[e]
1038
1095
  }, e))
@@ -1140,20 +1197,20 @@ function nt({ projectId: e, assigneeOptions: t, hiddenFields: n, defaultValues:
1140
1197
  children: "CreateTask: no workspaceId provided (prop or PlanMagnetProvider)."
1141
1198
  });
1142
1199
  }
1143
- var rt = [
1200
+ var at = [
1144
1201
  "title",
1145
1202
  "status",
1146
1203
  "priority",
1147
1204
  "assignee",
1148
1205
  "dueDate",
1149
1206
  "storyPoints"
1150
- ], it = {
1207
+ ], ot = {
1151
1208
  CRITICAL: 0,
1152
1209
  HIGH: 1,
1153
1210
  MEDIUM: 2,
1154
1211
  LOW: 3,
1155
1212
  NONE: 4
1156
- }, at = {
1213
+ }, st = {
1157
1214
  BACKLOG: 0,
1158
1215
  TODO: 1,
1159
1216
  IN_PROGRESS: 2,
@@ -1162,7 +1219,7 @@ var rt = [
1162
1219
  DONE: 5,
1163
1220
  CANCELLED: 6
1164
1221
  };
1165
- function ot(e, t) {
1222
+ function ct(e, t) {
1166
1223
  switch (e) {
1167
1224
  case "key": return t.colKey;
1168
1225
  case "title": return t.colTask;
@@ -1177,7 +1234,7 @@ function ot(e, t) {
1177
1234
  default: return e;
1178
1235
  }
1179
1236
  }
1180
- var st = {
1237
+ var lt = {
1181
1238
  title: "title",
1182
1239
  type: "type",
1183
1240
  status: "status",
@@ -1185,8 +1242,8 @@ var st = {
1185
1242
  dueDate: "dueDate",
1186
1243
  storyPoints: "storyPoints"
1187
1244
  };
1188
- function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, search: a, columns: o = rt, sortBy: s, sortDir: c = "asc", hideHeader: l, onSelect: u, resolveAssignee: d, linkSourceProduct: f, renderLinkIcon: p, limit: m = 200, className: h, workspaceId: g }) {
1189
- let _ = K(), v = g ?? _?.workspaceId, { linksByItem: y } = Ze(v, f), S = Y(), [C, T] = x({
1245
+ function ut({ projectId: e, status: t, type: n, priority: r, assigneeId: i, search: a, columns: o = at, sortBy: s, sortDir: c = "asc", hideHeader: l, onSelect: u, resolveAssignee: d, linkSourceProduct: f, renderLinkIcon: p, limit: m = 200, className: h, workspaceId: g }) {
1246
+ let _ = q(), v = g ?? _?.workspaceId, { linksByItem: y } = $e(v, f), S = Y(), [C, T] = x({
1190
1247
  by: s ?? null,
1191
1248
  dir: c
1192
1249
  }), E = b(() => {
@@ -1199,7 +1256,7 @@ function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1199
1256
  r,
1200
1257
  i,
1201
1258
  a
1202
- ]), { data: O, loading: k, error: A } = G(le, {
1259
+ ]), { data: O, loading: k, error: A } = K(le, {
1203
1260
  variables: {
1204
1261
  workspaceId: v,
1205
1262
  ...Object.keys(E).length ? { filter: E } : {},
@@ -1210,9 +1267,9 @@ function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1210
1267
  let e = O?.planmagnetWorkItems?.items ?? [];
1211
1268
  if (!C.by) return e;
1212
1269
  let t = C.dir === "desc" ? -1 : 1, n = C.by;
1213
- return [...e].sort((e, r) => t * ut(e, r, n));
1270
+ return [...e].sort((e, r) => t * ft(e, r, n));
1214
1271
  }, [O, C]), M = (e) => {
1215
- let t = st[e];
1272
+ let t = lt[e];
1216
1273
  t && T((e) => e.by === t ? {
1217
1274
  by: t,
1218
1275
  dir: e.dir === "asc" ? "desc" : "asc"
@@ -1253,13 +1310,13 @@ function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1253
1310
  children: [/* @__PURE__ */ H("thead", { children: /* @__PURE__ */ H("tr", {
1254
1311
  className: "border-b border-border bg-muted/50 text-left",
1255
1312
  children: o.map((e) => {
1256
- let t = !!st[e], n = C.by === st[e];
1313
+ let t = !!lt[e], n = C.by === lt[e];
1257
1314
  return /* @__PURE__ */ H("th", {
1258
1315
  onClick: t ? () => M(e) : void 0,
1259
1316
  className: J("px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", t && "cursor-pointer select-none hover:text-foreground"),
1260
1317
  children: /* @__PURE__ */ U("span", {
1261
1318
  className: "inline-flex items-center gap-1",
1262
- children: [ot(e, S), n && (C.dir === "asc" ? /* @__PURE__ */ H(D, {
1319
+ children: [ct(e, S), n && (C.dir === "asc" ? /* @__PURE__ */ H(D, {
1263
1320
  className: "h-3 w-3",
1264
1321
  "aria-hidden": "true"
1265
1322
  }) : /* @__PURE__ */ H(w, {
@@ -1278,7 +1335,7 @@ function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1278
1335
  className: J("border-b border-border last:border-0", u && "cursor-pointer hover:bg-muted/40"),
1279
1336
  children: o.map((t) => /* @__PURE__ */ H("td", {
1280
1337
  className: "px-3 py-2 align-middle text-foreground",
1281
- children: lt(t, e, {
1338
+ children: dt(t, e, {
1282
1339
  resolveAssignee: d,
1283
1340
  links: y.get(e.id),
1284
1341
  renderLinkIcon: p,
@@ -1293,7 +1350,7 @@ function ct({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1293
1350
  children: "TaskList: no workspaceId provided (prop or PlanMagnetProvider)."
1294
1351
  });
1295
1352
  }
1296
- function lt(e, t, n) {
1353
+ function dt(e, t, n) {
1297
1354
  let { resolveAssignee: r, links: i, renderLinkIcon: a, unassigned: o } = n;
1298
1355
  switch (e) {
1299
1356
  case "key": return /* @__PURE__ */ H("span", {
@@ -1310,9 +1367,9 @@ function lt(e, t, n) {
1310
1367
  children: t.key
1311
1368
  })]
1312
1369
  });
1313
- case "type": return /* @__PURE__ */ H(Ge, { type: t.type });
1314
- case "status": return /* @__PURE__ */ H(Be, { status: t.status });
1315
- case "priority": return /* @__PURE__ */ H(Ue, {
1370
+ case "type": return /* @__PURE__ */ H(qe, { type: t.type });
1371
+ case "status": return /* @__PURE__ */ H(He, { status: t.status });
1372
+ case "priority": return /* @__PURE__ */ H(Ge, {
1316
1373
  priority: t.priority,
1317
1374
  showLabel: !0
1318
1375
  });
@@ -1320,7 +1377,7 @@ function lt(e, t, n) {
1320
1377
  let e = t.assigneeId ? r?.(t.assigneeId) : null;
1321
1378
  return /* @__PURE__ */ U("span", {
1322
1379
  className: "flex items-center gap-1.5",
1323
- children: [/* @__PURE__ */ H(De, {
1380
+ children: [/* @__PURE__ */ H(ke, {
1324
1381
  id: t.assigneeId,
1325
1382
  name: e?.name,
1326
1383
  size: "sm"
@@ -1331,9 +1388,9 @@ function lt(e, t, n) {
1331
1388
  });
1332
1389
  }
1333
1390
  case "dueDate": {
1334
- let e = ye(t.dueDate);
1391
+ let e = be(t.dueDate);
1335
1392
  return e ? /* @__PURE__ */ H("span", {
1336
- className: J("text-xs", be(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1393
+ className: J("text-xs", Se(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1337
1394
  children: e
1338
1395
  }) : /* @__PURE__ */ H("span", {
1339
1396
  className: "text-muted-foreground",
@@ -1352,7 +1409,7 @@ function lt(e, t, n) {
1352
1409
  children: "—"
1353
1410
  }) : /* @__PURE__ */ U("div", {
1354
1411
  className: "flex flex-wrap gap-1",
1355
- children: [i.slice(0, 2).map((e) => /* @__PURE__ */ H(Ne, {
1412
+ children: [i.slice(0, 2).map((e) => /* @__PURE__ */ H(Fe, {
1356
1413
  link: e,
1357
1414
  renderIcon: a
1358
1415
  }, e.id)), i.length > 2 && /* @__PURE__ */ U("span", {
@@ -1370,10 +1427,10 @@ function lt(e, t, n) {
1370
1427
  default: return null;
1371
1428
  }
1372
1429
  }
1373
- function ut(e, t, n) {
1430
+ function ft(e, t, n) {
1374
1431
  switch (n) {
1375
- case "priority": return it[e.priority] - it[t.priority];
1376
- case "status": return at[e.status] - at[t.status];
1432
+ case "priority": return ot[e.priority] - ot[t.priority];
1433
+ case "status": return st[e.status] - st[t.status];
1377
1434
  case "title": return e.title.localeCompare(t.title);
1378
1435
  case "type": return e.type.localeCompare(t.type);
1379
1436
  case "dueDate": return (e.dueDate ?? "").localeCompare(t.dueDate ?? "");
@@ -1381,8 +1438,8 @@ function ut(e, t, n) {
1381
1438
  default: return 0;
1382
1439
  }
1383
1440
  }
1384
- function dt(e, t = {}) {
1385
- let { projectId: n, enabled: r = !0, limit: i = 100 } = t, { data: a, loading: o } = G(he, {
1441
+ function pt(e, t = {}) {
1442
+ let { projectId: n, enabled: r = !0, limit: i = 100 } = t, { data: a, loading: o } = K(he, {
1386
1443
  variables: {
1387
1444
  workspaceId: e,
1388
1445
  ...n ? { filter: { projectId: n } } : {},
@@ -1406,15 +1463,15 @@ function dt(e, t = {}) {
1406
1463
  loading: o
1407
1464
  };
1408
1465
  }
1409
- var ft = { weekStartsOn: 1 };
1410
- function pt(e) {
1466
+ var mt = { weekStartsOn: 1 };
1467
+ function ht(e) {
1411
1468
  return d(e, "yyyy-MM-dd");
1412
1469
  }
1413
- function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = "", assigneeId: m, defaultMode: h = "week", onSelect: g, resolveAssignee: _, showMilestones: v = !0, className: y, workspaceId: S }) {
1414
- let C = K(), w = S ?? C?.workspaceId, D = Y(), { milestones: O, byDay: k } = dt(w, {
1470
+ function gt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = "", assigneeId: m, defaultMode: h = "week", onSelect: g, resolveAssignee: _, showMilestones: v = !0, className: y, workspaceId: S }) {
1471
+ let C = q(), w = S ?? C?.workspaceId, D = Y(), { milestones: O, byDay: k } = pt(w, {
1415
1472
  projectId: e,
1416
1473
  enabled: v
1417
- }), [A, j] = x(h), [M, N] = x(0), { data: F, loading: I, error: L } = G(le, {
1474
+ }), [A, j] = x(h), [M, N] = x(0), { data: F, loading: I, error: L } = K(le, {
1418
1475
  variables: {
1419
1476
  workspaceId: w,
1420
1477
  ...e ? { filter: { projectId: e } } : {},
@@ -1434,10 +1491,10 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1434
1491
  i,
1435
1492
  o,
1436
1493
  m
1437
- ]), { anchor: z, rangeStart: B, rangeEnd: V, days: ee } = b(() => {
1494
+ ]), { anchor: z, rangeStart: B, rangeEnd: V, days: W } = b(() => {
1438
1495
  let e = /* @__PURE__ */ new Date();
1439
1496
  if (A === "week") {
1440
- let t = a(e, M), n = r(t, ft), i = u(t, ft);
1497
+ let t = a(e, M), n = r(t, mt), i = u(t, mt);
1441
1498
  return {
1442
1499
  anchor: t,
1443
1500
  rangeStart: n,
@@ -1448,7 +1505,7 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1448
1505
  })
1449
1506
  };
1450
1507
  }
1451
- let t = n(e, M), i = r(l(t), ft), o = u(s(t), ft);
1508
+ let t = n(e, M), i = r(l(t), mt), o = u(s(t), mt);
1452
1509
  return {
1453
1510
  anchor: t,
1454
1511
  rangeStart: i,
@@ -1458,7 +1515,7 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1458
1515
  end: o
1459
1516
  })
1460
1517
  };
1461
- }, [A, M]), { byDay: te, overdue: W, undated: ne } = b(() => {
1518
+ }, [A, M]), { byDay: ee, overdue: G, undated: te } = b(() => {
1462
1519
  let e = /* @__PURE__ */ new Map(), t = [], n = [];
1463
1520
  for (let r of R) {
1464
1521
  let i = ve(r.dueDate);
@@ -1466,11 +1523,11 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1466
1523
  n.push(r);
1467
1524
  continue;
1468
1525
  }
1469
- if (be(r.dueDate, r.status)) {
1526
+ if (Se(r.dueDate, r.status)) {
1470
1527
  t.push(r);
1471
1528
  continue;
1472
1529
  }
1473
- let a = pt(i), o = e.get(a);
1530
+ let a = ht(i), o = e.get(a);
1474
1531
  o ? o.push(r) : e.set(a, [r]);
1475
1532
  }
1476
1533
  return {
@@ -1495,7 +1552,7 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1495
1552
  L.message
1496
1553
  ]
1497
1554
  });
1498
- let re = A === "week" ? `${d(B, "MMM d")} \u2013 ${d(V, "MMM d")}` : d(z, "MMMM yyyy");
1555
+ let ne = A === "week" ? `${d(B, "MMM d")} \u2013 ${d(V, "MMM d")}` : d(z, "MMMM yyyy");
1499
1556
  return /* @__PURE__ */ U("div", {
1500
1557
  className: J("space-y-3", y),
1501
1558
  children: [
@@ -1526,7 +1583,7 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1526
1583
  }),
1527
1584
  /* @__PURE__ */ H("span", {
1528
1585
  className: "ml-2 text-sm font-medium text-foreground",
1529
- children: re
1586
+ children: ne
1530
1587
  })
1531
1588
  ]
1532
1589
  }), /* @__PURE__ */ H("div", {
@@ -1541,14 +1598,14 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1541
1598
  }, e))
1542
1599
  })]
1543
1600
  }),
1544
- W.length > 0 && /* @__PURE__ */ U("div", {
1601
+ G.length > 0 && /* @__PURE__ */ U("div", {
1545
1602
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2",
1546
1603
  children: [/* @__PURE__ */ H("p", {
1547
1604
  className: "mb-1 text-xs font-semibold text-destructive",
1548
- children: D.overdue.replace("{n}", String(W.length))
1605
+ children: D.overdue.replace("{n}", String(G.length))
1549
1606
  }), /* @__PURE__ */ H("div", {
1550
1607
  className: "flex flex-wrap gap-1.5",
1551
- children: W.map((e) => /* @__PURE__ */ H(gt, {
1608
+ children: G.map((e) => /* @__PURE__ */ H(vt, {
1552
1609
  task: e,
1553
1610
  onSelect: g,
1554
1611
  resolveAssignee: _,
@@ -1566,13 +1623,13 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1566
1623
  }), D.milestones]
1567
1624
  }), /* @__PURE__ */ H("div", {
1568
1625
  className: "flex flex-wrap gap-1.5",
1569
- children: O.map((e) => /* @__PURE__ */ H(ht, { milestone: e }, e.id))
1626
+ children: O.map((e) => /* @__PURE__ */ H(_t, { milestone: e }, e.id))
1570
1627
  })]
1571
1628
  }),
1572
1629
  A === "week" ? /* @__PURE__ */ H("div", {
1573
1630
  className: "grid grid-cols-7 gap-2",
1574
- children: ee.map((e) => {
1575
- let t = te.get(pt(e)) ?? [], n = k.get(pt(e)) ?? [], r = p(e);
1631
+ children: W.map((e) => {
1632
+ let t = ee.get(ht(e)) ?? [], n = k.get(ht(e)) ?? [], r = p(e);
1576
1633
  return /* @__PURE__ */ U("div", {
1577
1634
  className: J("flex min-h-32 flex-col rounded-lg border p-2", r ? "border-primary/50 bg-primary/5" : "border-border bg-muted/20"),
1578
1635
  children: [/* @__PURE__ */ U("div", {
@@ -1586,16 +1643,16 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1586
1643
  })]
1587
1644
  }), /* @__PURE__ */ U("div", {
1588
1645
  className: "flex flex-col gap-1.5",
1589
- children: [n.map((e) => /* @__PURE__ */ H(ht, {
1646
+ children: [n.map((e) => /* @__PURE__ */ H(_t, {
1590
1647
  milestone: e,
1591
1648
  compact: !0
1592
- }, e.id)), t.map((e) => /* @__PURE__ */ H(gt, {
1649
+ }, e.id)), t.map((e) => /* @__PURE__ */ H(vt, {
1593
1650
  task: e,
1594
1651
  onSelect: g,
1595
1652
  resolveAssignee: _
1596
1653
  }, e.id))]
1597
1654
  })]
1598
- }, pt(e));
1655
+ }, ht(e));
1599
1656
  })
1600
1657
  }) : /* @__PURE__ */ U("div", {
1601
1658
  className: "grid grid-cols-7 gap-1",
@@ -1610,8 +1667,8 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1610
1667
  ].map((e) => /* @__PURE__ */ H("div", {
1611
1668
  className: "px-1 pb-1 text-center text-[10px] font-semibold uppercase text-muted-foreground",
1612
1669
  children: e
1613
- }, e)), ee.map((e) => {
1614
- let t = te.get(pt(e)) ?? [], n = p(e), r = f(e, z);
1670
+ }, e)), W.map((e) => {
1671
+ let t = ee.get(ht(e)) ?? [], n = p(e), r = f(e, z);
1615
1672
  return /* @__PURE__ */ U("div", {
1616
1673
  className: J("flex min-h-20 flex-col gap-1 rounded-md border p-1", n ? "border-primary/50 bg-primary/5" : "border-border/60 bg-muted/10", !r && "opacity-40"),
1617
1674
  children: [
@@ -1619,7 +1676,7 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1619
1676
  className: J("text-[10px] font-semibold", n ? "text-primary" : "text-muted-foreground"),
1620
1677
  children: d(e, "d")
1621
1678
  }),
1622
- t.slice(0, 3).map((e) => /* @__PURE__ */ H(gt, {
1679
+ t.slice(0, 3).map((e) => /* @__PURE__ */ H(vt, {
1623
1680
  task: e,
1624
1681
  onSelect: g,
1625
1682
  resolveAssignee: _,
@@ -1635,17 +1692,17 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1635
1692
  ]
1636
1693
  })
1637
1694
  ]
1638
- }, pt(e));
1695
+ }, ht(e));
1639
1696
  })]
1640
1697
  }),
1641
- ne.length > 0 && /* @__PURE__ */ U("div", {
1698
+ te.length > 0 && /* @__PURE__ */ U("div", {
1642
1699
  className: "rounded-md border border-border bg-muted/20 px-3 py-2",
1643
1700
  children: [/* @__PURE__ */ H("p", {
1644
1701
  className: "mb-1 text-xs font-semibold text-muted-foreground",
1645
- children: D.noDueDate.replace("{n}", String(ne.length))
1702
+ children: D.noDueDate.replace("{n}", String(te.length))
1646
1703
  }), /* @__PURE__ */ H("div", {
1647
1704
  className: "flex flex-wrap gap-1.5",
1648
- children: ne.map((e) => /* @__PURE__ */ H(gt, {
1705
+ children: te.map((e) => /* @__PURE__ */ H(vt, {
1649
1706
  task: e,
1650
1707
  onSelect: g,
1651
1708
  resolveAssignee: _
@@ -1655,8 +1712,8 @@ function mt({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1655
1712
  ]
1656
1713
  });
1657
1714
  }
1658
- function ht({ milestone: e, compact: t }) {
1659
- let n = ye(e.dueDate);
1715
+ function _t({ milestone: e, compact: t }) {
1716
+ let n = be(e.dueDate);
1660
1717
  return /* @__PURE__ */ U("span", {
1661
1718
  className: J("inline-flex max-w-full items-center gap-1 rounded-md border border-primary/40 bg-primary/10 px-1.5 py-1 text-[11px] font-medium text-primary", t && "w-full"),
1662
1719
  title: e.name + (n ? ` \xB7 ${n}` : ""),
@@ -1676,7 +1733,7 @@ function ht({ milestone: e, compact: t }) {
1676
1733
  ]
1677
1734
  });
1678
1735
  }
1679
- function gt({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1736
+ function vt({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1680
1737
  let a = e.assigneeId ? n?.(e.assigneeId) : null, o = !!t;
1681
1738
  return /* @__PURE__ */ U("button", {
1682
1739
  type: "button",
@@ -1685,12 +1742,12 @@ function gt({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1685
1742
  title: e.title,
1686
1743
  className: J("flex w-full items-center gap-1.5 rounded-md border px-1.5 py-1 text-left transition-colors", r === "destructive" ? "border-destructive/40 bg-card hover:bg-destructive/5" : "border-border bg-card hover:border-primary/50", o ? "cursor-pointer" : "cursor-default"),
1687
1744
  children: [
1688
- /* @__PURE__ */ H(Ue, { priority: e.priority }),
1745
+ /* @__PURE__ */ H(Ge, { priority: e.priority }),
1689
1746
  /* @__PURE__ */ H("span", {
1690
1747
  className: "min-w-0 flex-1 truncate text-[11px] font-medium text-foreground",
1691
1748
  children: e.title
1692
1749
  }),
1693
- !i && /* @__PURE__ */ H(De, {
1750
+ !i && /* @__PURE__ */ H(ke, {
1694
1751
  id: e.assigneeId,
1695
1752
  name: a?.name,
1696
1753
  size: "sm"
@@ -1698,12 +1755,12 @@ function gt({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1698
1755
  ]
1699
1756
  });
1700
1757
  }
1701
- var _t = {
1758
+ var yt = {
1702
1759
  board: F,
1703
1760
  list: L,
1704
1761
  timeline: C
1705
- }, vt = "h-8 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground capitalize transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
1706
- function yt({ view: e, onViewChange: t, views: n = [
1762
+ }, bt = "h-8 rounded-md border border-border bg-background px-2 text-xs font-medium text-foreground capitalize transition-colors hover:bg-muted/50 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring";
1763
+ function xt({ view: e, onViewChange: t, views: n = [
1707
1764
  "board",
1708
1765
  "list",
1709
1766
  "timeline"
@@ -1720,7 +1777,7 @@ function yt({ view: e, onViewChange: t, views: n = [
1720
1777
  role: "tablist",
1721
1778
  "aria-label": "Task views",
1722
1779
  children: n.map((n) => {
1723
- let r = _t[n], i = n === e;
1780
+ let r = yt[n], i = n === e;
1724
1781
  return /* @__PURE__ */ U("button", {
1725
1782
  type: "button",
1726
1783
  role: "tab",
@@ -1768,11 +1825,11 @@ function yt({ view: e, onViewChange: t, views: n = [
1768
1825
  value: a,
1769
1826
  onChange: (e) => o(e.target.value),
1770
1827
  "aria-label": m.priorityLabel,
1771
- className: vt,
1828
+ className: bt,
1772
1829
  children: [/* @__PURE__ */ H("option", {
1773
1830
  value: "ALL",
1774
1831
  children: m.allPriorities
1775
- }), ke.map((e) => /* @__PURE__ */ H("option", {
1832
+ }), je.map((e) => /* @__PURE__ */ H("option", {
1776
1833
  value: e,
1777
1834
  children: m.priority[e]
1778
1835
  }, e))]
@@ -1781,11 +1838,11 @@ function yt({ view: e, onViewChange: t, views: n = [
1781
1838
  value: s,
1782
1839
  onChange: (e) => c(e.target.value),
1783
1840
  "aria-label": m.typeLabel,
1784
- className: vt,
1841
+ className: bt,
1785
1842
  children: [/* @__PURE__ */ H("option", {
1786
1843
  value: "ALL",
1787
1844
  children: m.allTypes
1788
- }), Ae.map((e) => /* @__PURE__ */ H("option", {
1845
+ }), Me.map((e) => /* @__PURE__ */ H("option", {
1789
1846
  value: e,
1790
1847
  children: m.type[e]
1791
1848
  }, e))]
@@ -1803,50 +1860,50 @@ function yt({ view: e, onViewChange: t, views: n = [
1803
1860
  })]
1804
1861
  });
1805
1862
  }
1806
- var Q = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", $ = "text-xs font-medium uppercase tracking-wide text-muted-foreground", bt = {
1863
+ var Q = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring", $ = "text-xs font-medium uppercase tracking-wide text-muted-foreground", St = {
1807
1864
  NONE: "muted",
1808
1865
  LOW: "muted",
1809
1866
  MEDIUM: "secondary",
1810
1867
  HIGH: "accent",
1811
1868
  CRITICAL: "destructive"
1812
1869
  };
1813
- function xt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i, onDeleted: a, onError: o, resolveAssignee: s, assigneeOptions: c, className: l }) {
1814
- let u = ne(), d = Y(), f = b(() => new Set(n ?? []), [n]), { data: p, loading: m, error: h } = G(ue, {
1870
+ function Ct({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i, onDeleted: a, onError: o, resolveAssignee: s, assigneeOptions: c, linkSourceProduct: l, renderLinkIcon: u, className: d }) {
1871
+ let f = te(), p = Y(), m = b(() => new Set(n ?? []), [n]), { data: h, loading: g, error: _ } = K(ue, {
1815
1872
  variables: { id: e },
1816
1873
  skip: !e
1817
- }), g = p?.planmagnetWorkItem ?? null, [_, v] = x(!1), [S, C] = x(!1), [w, T] = x(""), [E, D] = x(""), [O, k] = x("TASK"), [A, j] = x("BACKLOG"), [M, N] = x("NONE"), [P, F] = x(""), [I, L] = x(""), [R, z] = x(""), [V, W] = x("");
1874
+ }), v = h?.planmagnetWorkItem ?? null, { linksByItem: S } = $e(v?.workspaceId, l), C = v ? S.get(v.id) ?? [] : [], [w, T] = x(!1), [E, D] = x(!1), [O, k] = x(""), [A, j] = x(""), [M, N] = x("TASK"), [P, F] = x("BACKLOG"), [I, L] = x("NONE"), [R, z] = x(""), [V, G] = x(""), [re, ae] = x(""), [q, oe] = x("");
1818
1875
  y(() => {
1819
- g && (T(g.title), D(g.description ?? ""), k(g.type), j(g.status), N(g.priority), F(g.assigneeId ?? ""), L(g.dueDate ? String(g.dueDate).slice(0, 10) : ""), z((g.labels ?? []).join(", ")), W(g.storyPoints == null ? "" : String(g.storyPoints)));
1820
- }, [g]);
1821
- let [ie, { loading: oe, error: K }] = re(fe), [se, { loading: q, error: ce }] = re(ge), de = async () => {
1822
- if (g) try {
1823
- await se({ variables: { id: g.id } }), u.cache.evict({ id: u.cache.identify({
1876
+ v && (k(v.title), j(v.description ?? ""), N(v.type), F(v.status), L(v.priority), z(v.assigneeId ?? ""), G(v.dueDate ? String(v.dueDate).slice(0, 10) : ""), ae((v.labels ?? []).join(", ")), oe(v.storyPoints == null ? "" : String(v.storyPoints)));
1877
+ }, [v]);
1878
+ let [se, { loading: ce, error: de }] = ne(fe), [pe, { loading: me, error: he }] = ne(ge), _e = async () => {
1879
+ if (v) try {
1880
+ await pe({ variables: { id: v.id } }), f.cache.evict({ id: f.cache.identify({
1824
1881
  __typename: "WorkItem",
1825
- id: g.id
1826
- }) }), u.cache.gc(), u.refetchQueries({ include: [le] }).catch(() => {}), a?.(g.id);
1882
+ id: v.id
1883
+ }) }), f.cache.gc(), f.refetchQueries({ include: [le] }).catch(() => {}), a?.(v.id);
1827
1884
  } catch (e) {
1828
1885
  o?.(e instanceof Error ? e : Error(String(e)));
1829
1886
  }
1830
- }, pe = async (e) => {
1831
- if (e.preventDefault(), !g) return;
1832
- let t = R.split(",").map((e) => e.trim()).filter(Boolean), n = V.trim() ? Number(V) : void 0, r = {
1833
- title: w.trim(),
1834
- ...f.has("description") ? {} : { description: E.trim() },
1835
- ...f.has("type") ? {} : { type: O },
1836
- ...f.has("status") ? {} : { status: A },
1837
- ...f.has("priority") ? {} : { priority: M },
1838
- ...f.has("assignee") ? {} : { assigneeId: P.trim() },
1839
- ...f.has("dueDate") ? {} : { dueDate: I || void 0 },
1840
- ...f.has("labels") ? {} : { labels: t },
1841
- ...f.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
1887
+ }, ve = async (e) => {
1888
+ if (e.preventDefault(), !v) return;
1889
+ let t = re.split(",").map((e) => e.trim()).filter(Boolean), n = q.trim() ? Number(q) : void 0, r = {
1890
+ title: O.trim(),
1891
+ ...m.has("description") ? {} : { description: A.trim() },
1892
+ ...m.has("type") ? {} : { type: M },
1893
+ ...m.has("status") ? {} : { status: P },
1894
+ ...m.has("priority") ? {} : { priority: I },
1895
+ ...m.has("assignee") ? {} : { assigneeId: R.trim() },
1896
+ ...m.has("dueDate") ? {} : { dueDate: ye(V) },
1897
+ ...m.has("labels") ? {} : { labels: t },
1898
+ ...m.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
1842
1899
  };
1843
1900
  try {
1844
- let e = (await ie({ variables: {
1845
- id: g.id,
1901
+ let e = (await se({ variables: {
1902
+ id: v.id,
1846
1903
  input: r
1847
1904
  } })).data?.planmagnetUpdateWorkItem;
1848
1905
  if (e) {
1849
- let t = ae();
1906
+ let t = ie();
1850
1907
  try {
1851
1908
  await t.onTaskSaved?.({
1852
1909
  id: e.id,
@@ -1856,94 +1913,94 @@ function xt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
1856
1913
  operation: "updated"
1857
1914
  });
1858
1915
  } catch {}
1859
- i?.(e), v(!1);
1916
+ i?.(e), T(!1);
1860
1917
  }
1861
1918
  } catch (e) {
1862
1919
  o?.(e instanceof Error ? e : Error(String(e)));
1863
1920
  }
1864
1921
  };
1865
1922
  if (!e) return /* @__PURE__ */ H("div", {
1866
- className: J("p-6 text-sm text-destructive", l),
1923
+ className: J("p-6 text-sm text-destructive", d),
1867
1924
  children: "TaskDetail: no work-item id provided."
1868
1925
  });
1869
- if (m && !p) return /* @__PURE__ */ H("div", {
1870
- className: J("flex items-center justify-center p-12", l),
1926
+ if (g && !h) return /* @__PURE__ */ H("div", {
1927
+ className: J("flex items-center justify-center p-12", d),
1871
1928
  children: /* @__PURE__ */ H("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1872
1929
  });
1873
- if (h && !p) return /* @__PURE__ */ U("div", {
1874
- className: J("p-6 text-sm text-destructive", l),
1930
+ if (_ && !h) return /* @__PURE__ */ U("div", {
1931
+ className: J("p-6 text-sm text-destructive", d),
1875
1932
  children: [
1876
- d.errorLoading,
1933
+ p.errorLoading,
1877
1934
  ": ",
1878
- h.message
1935
+ _.message
1879
1936
  ]
1880
1937
  });
1881
- if (!g) return /* @__PURE__ */ H("div", {
1882
- className: J("p-6 text-sm text-muted-foreground", l),
1883
- children: d.taskNotFound
1938
+ if (!v) return /* @__PURE__ */ H("div", {
1939
+ className: J("p-6 text-sm text-muted-foreground", d),
1940
+ children: p.taskNotFound
1884
1941
  });
1885
- let me = !t;
1886
- return /* @__PURE__ */ H(ee, {
1887
- className: J("shadow-sm", l),
1888
- children: /* @__PURE__ */ U(te, {
1942
+ let be = !t;
1943
+ return /* @__PURE__ */ H(W, {
1944
+ className: J("shadow-sm", d),
1945
+ children: /* @__PURE__ */ U(ee, {
1889
1946
  className: "space-y-4 p-6",
1890
1947
  children: [
1891
1948
  !r && /* @__PURE__ */ U("div", {
1892
1949
  className: "flex items-start justify-between gap-4",
1893
1950
  children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("p", {
1894
1951
  className: "text-xs text-muted-foreground",
1895
- children: g.key
1952
+ children: v.key
1896
1953
  }), /* @__PURE__ */ H("h2", {
1897
1954
  className: "text-xl font-semibold text-foreground",
1898
- children: g.title
1899
- })] }), me && !_ && /* @__PURE__ */ U("div", {
1955
+ children: v.title
1956
+ })] }), be && !w && /* @__PURE__ */ U("div", {
1900
1957
  className: "flex shrink-0 items-center gap-2",
1901
- children: [a && (S ? /* @__PURE__ */ U("span", {
1958
+ children: [a && (E ? /* @__PURE__ */ U("span", {
1902
1959
  className: "flex items-center gap-1 text-xs",
1903
1960
  children: [
1904
1961
  /* @__PURE__ */ H("span", {
1905
1962
  className: "text-muted-foreground",
1906
- children: d.deletePrompt
1963
+ children: p.deletePrompt
1907
1964
  }),
1908
1965
  /* @__PURE__ */ H("button", {
1909
1966
  type: "button",
1910
- disabled: q,
1911
- onClick: de,
1967
+ disabled: me,
1968
+ onClick: _e,
1912
1969
  className: "rounded bg-destructive px-2 py-1 font-medium text-destructive-foreground disabled:opacity-50",
1913
- children: q ? "…" : d.yes
1970
+ children: me ? "…" : p.yes
1914
1971
  }),
1915
1972
  /* @__PURE__ */ H("button", {
1916
1973
  type: "button",
1917
- onClick: () => C(!1),
1974
+ onClick: () => D(!1),
1918
1975
  className: "rounded bg-muted px-2 py-1 text-muted-foreground",
1919
- children: d.no
1976
+ children: p.no
1920
1977
  })
1921
1978
  ]
1922
1979
  }) : /* @__PURE__ */ H("button", {
1923
1980
  type: "button",
1924
- onClick: () => C(!0),
1925
- title: d.del,
1926
- "aria-label": d.del,
1981
+ onClick: () => D(!0),
1982
+ title: p.del,
1983
+ "aria-label": p.del,
1927
1984
  className: "rounded-md p-1.5 text-destructive hover:bg-destructive/10",
1928
1985
  children: /* @__PURE__ */ H(B, { className: "h-4 w-4" })
1929
1986
  })), /* @__PURE__ */ H("button", {
1930
1987
  type: "button",
1931
- onClick: () => v(!0),
1988
+ onClick: () => T(!0),
1932
1989
  className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground",
1933
- children: d.edit
1990
+ children: p.edit
1934
1991
  })]
1935
1992
  })]
1936
1993
  }),
1937
- ce && /* @__PURE__ */ U("p", {
1994
+ he && /* @__PURE__ */ U("p", {
1938
1995
  className: "text-sm text-destructive",
1939
1996
  children: [
1940
- d.failedToDelete,
1997
+ p.failedToDelete,
1941
1998
  ": ",
1942
- ce.message
1999
+ he.message
1943
2000
  ]
1944
2001
  }),
1945
- _ ? /* @__PURE__ */ U("form", {
1946
- onSubmit: pe,
2002
+ w ? /* @__PURE__ */ U("form", {
2003
+ onSubmit: ve,
1947
2004
  className: "space-y-4",
1948
2005
  children: [
1949
2006
  /* @__PURE__ */ U("div", {
@@ -1951,96 +2008,96 @@ function xt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
1951
2008
  children: [/* @__PURE__ */ H("label", {
1952
2009
  htmlFor: "pm-detail-title",
1953
2010
  className: $,
1954
- children: d.title
2011
+ children: p.title
1955
2012
  }), /* @__PURE__ */ H("input", {
1956
2013
  id: "pm-detail-title",
1957
2014
  className: Q,
1958
- value: w,
1959
- onChange: (e) => T(e.target.value),
2015
+ value: O,
2016
+ onChange: (e) => k(e.target.value),
1960
2017
  required: !0
1961
2018
  })]
1962
2019
  }),
1963
- !f.has("description") && /* @__PURE__ */ U("div", {
2020
+ !m.has("description") && /* @__PURE__ */ U("div", {
1964
2021
  className: "space-y-1",
1965
2022
  children: [/* @__PURE__ */ H("label", {
1966
2023
  htmlFor: "pm-detail-desc",
1967
2024
  className: $,
1968
- children: d.description
2025
+ children: p.description
1969
2026
  }), /* @__PURE__ */ H("textarea", {
1970
2027
  id: "pm-detail-desc",
1971
2028
  className: J(Q, "min-h-[80px]"),
1972
- value: E,
1973
- onChange: (e) => D(e.target.value)
2029
+ value: A,
2030
+ onChange: (e) => j(e.target.value)
1974
2031
  })]
1975
2032
  }),
1976
2033
  /* @__PURE__ */ U("div", {
1977
2034
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1978
2035
  children: [
1979
- !f.has("type") && /* @__PURE__ */ U("div", {
2036
+ !m.has("type") && /* @__PURE__ */ U("div", {
1980
2037
  className: "space-y-1",
1981
2038
  children: [/* @__PURE__ */ H("label", {
1982
2039
  htmlFor: "pm-detail-type",
1983
2040
  className: $,
1984
- children: d.typeLabel
2041
+ children: p.typeLabel
1985
2042
  }), /* @__PURE__ */ H("select", {
1986
2043
  id: "pm-detail-type",
1987
2044
  className: J(Q, "capitalize"),
1988
- value: O,
1989
- onChange: (e) => k(e.target.value),
1990
- children: Ae.map((e) => /* @__PURE__ */ H("option", {
2045
+ value: M,
2046
+ onChange: (e) => N(e.target.value),
2047
+ children: Me.map((e) => /* @__PURE__ */ H("option", {
1991
2048
  value: e,
1992
- children: d.type[e]
2049
+ children: p.type[e]
1993
2050
  }, e))
1994
2051
  })]
1995
2052
  }),
1996
- !f.has("status") && /* @__PURE__ */ U("div", {
2053
+ !m.has("status") && /* @__PURE__ */ U("div", {
1997
2054
  className: "space-y-1",
1998
2055
  children: [/* @__PURE__ */ H("label", {
1999
2056
  htmlFor: "pm-detail-status",
2000
2057
  className: $,
2001
- children: d.statusLabel
2058
+ children: p.statusLabel
2002
2059
  }), /* @__PURE__ */ H("select", {
2003
2060
  id: "pm-detail-status",
2004
2061
  className: J(Q, "capitalize"),
2005
- value: A,
2006
- onChange: (e) => j(e.target.value),
2007
- children: je.map((e) => /* @__PURE__ */ H("option", {
2062
+ value: P,
2063
+ onChange: (e) => F(e.target.value),
2064
+ children: Ne.map((e) => /* @__PURE__ */ H("option", {
2008
2065
  value: e,
2009
- children: d.status[e]
2066
+ children: p.status[e]
2010
2067
  }, e))
2011
2068
  })]
2012
2069
  }),
2013
- !f.has("priority") && /* @__PURE__ */ U("div", {
2070
+ !m.has("priority") && /* @__PURE__ */ U("div", {
2014
2071
  className: "space-y-1",
2015
2072
  children: [/* @__PURE__ */ H("label", {
2016
2073
  htmlFor: "pm-detail-priority",
2017
2074
  className: $,
2018
- children: d.priorityLabel
2075
+ children: p.priorityLabel
2019
2076
  }), /* @__PURE__ */ H("select", {
2020
2077
  id: "pm-detail-priority",
2021
2078
  className: J(Q, "capitalize"),
2022
- value: M,
2023
- onChange: (e) => N(e.target.value),
2024
- children: ke.map((e) => /* @__PURE__ */ H("option", {
2079
+ value: I,
2080
+ onChange: (e) => L(e.target.value),
2081
+ children: je.map((e) => /* @__PURE__ */ H("option", {
2025
2082
  value: e,
2026
- children: d.priority[e]
2083
+ children: p.priority[e]
2027
2084
  }, e))
2028
2085
  })]
2029
2086
  }),
2030
- !f.has("assignee") && /* @__PURE__ */ U("div", {
2087
+ !m.has("assignee") && /* @__PURE__ */ U("div", {
2031
2088
  className: "space-y-1",
2032
2089
  children: [/* @__PURE__ */ H("label", {
2033
2090
  htmlFor: "pm-detail-assignee",
2034
2091
  className: $,
2035
- children: d.assigneeLabel
2092
+ children: p.assigneeLabel
2036
2093
  }), c && c.length > 0 ? /* @__PURE__ */ U("select", {
2037
2094
  id: "pm-detail-assignee",
2038
2095
  className: Q,
2039
- value: P,
2040
- onChange: (e) => F(e.target.value),
2096
+ value: R,
2097
+ onChange: (e) => z(e.target.value),
2041
2098
  children: [/* @__PURE__ */ H("option", {
2042
2099
  value: "",
2043
- children: d.unassigned
2100
+ children: p.unassigned
2044
2101
  }), c.map((e) => /* @__PURE__ */ H("option", {
2045
2102
  value: e.id,
2046
2103
  children: e.name
@@ -2048,159 +2105,184 @@ function xt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2048
2105
  }) : /* @__PURE__ */ H("input", {
2049
2106
  id: "pm-detail-assignee",
2050
2107
  className: Q,
2051
- value: P,
2052
- onChange: (e) => F(e.target.value),
2053
- placeholder: d.assigneePlaceholder
2108
+ value: R,
2109
+ onChange: (e) => z(e.target.value),
2110
+ placeholder: p.assigneePlaceholder
2054
2111
  })]
2055
2112
  }),
2056
- !f.has("dueDate") && /* @__PURE__ */ U("div", {
2113
+ !m.has("dueDate") && /* @__PURE__ */ U("div", {
2057
2114
  className: "space-y-1",
2058
2115
  children: [/* @__PURE__ */ H("label", {
2059
2116
  htmlFor: "pm-detail-due",
2060
2117
  className: $,
2061
- children: d.dueDateLabel
2118
+ children: p.dueDateLabel
2062
2119
  }), /* @__PURE__ */ H("input", {
2063
2120
  id: "pm-detail-due",
2064
2121
  type: "date",
2065
2122
  className: Q,
2066
- value: I,
2067
- onChange: (e) => L(e.target.value)
2123
+ value: V,
2124
+ onChange: (e) => G(e.target.value)
2068
2125
  })]
2069
2126
  }),
2070
- !f.has("storyPoints") && /* @__PURE__ */ U("div", {
2127
+ !m.has("storyPoints") && /* @__PURE__ */ U("div", {
2071
2128
  className: "space-y-1",
2072
2129
  children: [/* @__PURE__ */ H("label", {
2073
2130
  htmlFor: "pm-detail-points",
2074
2131
  className: $,
2075
- children: d.storyPointsLabel
2132
+ children: p.storyPointsLabel
2076
2133
  }), /* @__PURE__ */ H("input", {
2077
2134
  id: "pm-detail-points",
2078
2135
  type: "number",
2079
2136
  min: 0,
2080
2137
  className: Q,
2081
- value: V,
2082
- onChange: (e) => W(e.target.value)
2138
+ value: q,
2139
+ onChange: (e) => oe(e.target.value)
2083
2140
  })]
2084
2141
  })
2085
2142
  ]
2086
2143
  }),
2087
- !f.has("labels") && /* @__PURE__ */ U("div", {
2144
+ !m.has("labels") && /* @__PURE__ */ U("div", {
2088
2145
  className: "space-y-1",
2089
2146
  children: [/* @__PURE__ */ H("label", {
2090
2147
  htmlFor: "pm-detail-labels",
2091
2148
  className: $,
2092
- children: d.labelsLabel
2149
+ children: p.labelsLabel
2093
2150
  }), /* @__PURE__ */ H("input", {
2094
2151
  id: "pm-detail-labels",
2095
2152
  className: Q,
2096
- value: R,
2097
- onChange: (e) => z(e.target.value),
2098
- placeholder: d.labelsPlaceholder
2153
+ value: re,
2154
+ onChange: (e) => ae(e.target.value),
2155
+ placeholder: p.labelsPlaceholder
2099
2156
  })]
2100
2157
  }),
2101
- K && /* @__PURE__ */ U("p", {
2158
+ de && /* @__PURE__ */ U("p", {
2102
2159
  className: "text-sm text-destructive",
2103
2160
  children: [
2104
- d.failedToSave,
2161
+ p.failedToSave,
2105
2162
  ": ",
2106
- K.message
2163
+ de.message
2107
2164
  ]
2108
2165
  }),
2109
2166
  /* @__PURE__ */ U("div", {
2110
2167
  className: "flex items-center justify-end gap-2",
2111
2168
  children: [/* @__PURE__ */ H("button", {
2112
2169
  type: "button",
2113
- onClick: () => v(!1),
2170
+ onClick: () => T(!1),
2114
2171
  className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
2115
- children: d.cancel
2172
+ children: p.cancel
2116
2173
  }), /* @__PURE__ */ H("button", {
2117
2174
  type: "submit",
2118
- disabled: oe || !w.trim(),
2119
- className: J("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (oe || !w.trim()) && "cursor-not-allowed opacity-50"),
2120
- children: oe ? d.saving : d.save
2175
+ disabled: ce || !O.trim(),
2176
+ className: J("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (ce || !O.trim()) && "cursor-not-allowed opacity-50"),
2177
+ children: ce ? p.saving : p.save
2121
2178
  })]
2122
2179
  })
2123
2180
  ]
2124
2181
  }) : /* @__PURE__ */ U("dl", {
2125
2182
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
2126
2183
  children: [
2127
- !f.has("type") && /* @__PURE__ */ H(St, {
2128
- label: d.typeLabel,
2129
- children: /* @__PURE__ */ H(Se, {
2184
+ !m.has("type") && /* @__PURE__ */ H(wt, {
2185
+ label: p.typeLabel,
2186
+ children: /* @__PURE__ */ H(we, {
2130
2187
  variant: "secondary",
2131
- children: d.type[g.type]
2188
+ children: p.type[v.type]
2132
2189
  })
2133
2190
  }),
2134
- !f.has("status") && /* @__PURE__ */ H(St, {
2135
- label: d.statusLabel,
2191
+ !m.has("status") && /* @__PURE__ */ H(wt, {
2192
+ label: p.statusLabel,
2136
2193
  children: /* @__PURE__ */ H("span", {
2137
2194
  className: "capitalize text-foreground",
2138
- children: d.status[g.status]
2195
+ children: p.status[v.status]
2139
2196
  })
2140
2197
  }),
2141
- !f.has("priority") && /* @__PURE__ */ H(St, {
2142
- label: d.priorityLabel,
2143
- children: /* @__PURE__ */ H(Se, {
2144
- variant: bt[g.priority],
2145
- children: d.priority[g.priority]
2198
+ !m.has("priority") && /* @__PURE__ */ H(wt, {
2199
+ label: p.priorityLabel,
2200
+ children: /* @__PURE__ */ H(we, {
2201
+ variant: St[v.priority],
2202
+ children: p.priority[v.priority]
2146
2203
  })
2147
2204
  }),
2148
- !f.has("assignee") && /* @__PURE__ */ H(St, {
2149
- label: d.assigneeLabel,
2150
- children: g.assigneeId ? /* @__PURE__ */ U("span", {
2205
+ !m.has("assignee") && /* @__PURE__ */ H(wt, {
2206
+ label: p.assigneeLabel,
2207
+ children: v.assigneeId ? /* @__PURE__ */ U("span", {
2151
2208
  className: "flex items-center gap-1.5",
2152
- children: [/* @__PURE__ */ H(De, {
2153
- id: g.assigneeId,
2154
- name: s?.(g.assigneeId)?.name,
2209
+ children: [/* @__PURE__ */ H(ke, {
2210
+ id: v.assigneeId,
2211
+ name: s?.(v.assigneeId)?.name,
2155
2212
  size: "sm"
2156
2213
  }), /* @__PURE__ */ H("span", {
2157
2214
  className: "text-foreground",
2158
- children: s?.(g.assigneeId)?.name ?? d.assigned
2215
+ children: s?.(v.assigneeId)?.name ?? p.assigned
2159
2216
  })]
2160
2217
  }) : /* @__PURE__ */ H("span", {
2161
2218
  className: "text-muted-foreground",
2162
- children: d.unassigned
2219
+ children: p.unassigned
2163
2220
  })
2164
2221
  }),
2165
- !f.has("dueDate") && /* @__PURE__ */ H(St, {
2166
- label: d.dueDateLabel,
2222
+ !m.has("dueDate") && /* @__PURE__ */ H(wt, {
2223
+ label: p.dueDateLabel,
2167
2224
  children: /* @__PURE__ */ H("span", {
2168
2225
  className: "text-foreground",
2169
- children: g.dueDate ?? "—"
2226
+ children: xe(v.dueDate) ?? "—"
2170
2227
  })
2171
2228
  }),
2172
- !f.has("storyPoints") && /* @__PURE__ */ H(St, {
2173
- label: d.storyPointsLabel,
2229
+ !m.has("storyPoints") && /* @__PURE__ */ H(wt, {
2230
+ label: p.storyPointsLabel,
2174
2231
  children: /* @__PURE__ */ H("span", {
2175
2232
  className: "text-foreground",
2176
- children: g.storyPoints ?? 0
2233
+ children: v.storyPoints ?? 0
2177
2234
  })
2178
2235
  }),
2179
- !f.has("description") && /* @__PURE__ */ U("div", {
2236
+ !m.has("description") && /* @__PURE__ */ U("div", {
2180
2237
  className: "sm:col-span-2",
2181
2238
  children: [/* @__PURE__ */ H("dt", {
2182
2239
  className: $,
2183
- children: d.description
2240
+ children: p.description
2184
2241
  }), /* @__PURE__ */ H("dd", {
2185
2242
  className: "mt-1 whitespace-pre-wrap text-sm text-foreground",
2186
- children: g.description || "—"
2243
+ children: v.description || "—"
2187
2244
  })]
2188
2245
  }),
2189
- !f.has("labels") && /* @__PURE__ */ U("div", {
2246
+ !m.has("labels") && /* @__PURE__ */ U("div", {
2190
2247
  className: "sm:col-span-2",
2191
2248
  children: [/* @__PURE__ */ H("dt", {
2192
2249
  className: $,
2193
- children: d.labelsLabel
2250
+ children: p.labelsLabel
2194
2251
  }), /* @__PURE__ */ H("dd", {
2195
2252
  className: "mt-1 flex flex-wrap gap-1",
2196
- children: (g.labels ?? []).length === 0 ? /* @__PURE__ */ H("span", {
2253
+ children: (v.labels ?? []).length === 0 ? /* @__PURE__ */ H("span", {
2197
2254
  className: "text-sm text-muted-foreground",
2198
2255
  children: "—"
2199
- }) : g.labels.map((e) => /* @__PURE__ */ H("span", {
2256
+ }) : v.labels.map((e) => /* @__PURE__ */ H("span", {
2200
2257
  className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
2201
2258
  children: e
2202
2259
  }, e))
2203
2260
  })]
2261
+ }),
2262
+ C.length > 0 && /* @__PURE__ */ U("div", {
2263
+ className: "sm:col-span-2",
2264
+ children: [/* @__PURE__ */ H("dt", {
2265
+ className: $,
2266
+ children: p.linkedRecordsLabel
2267
+ }), /* @__PURE__ */ H("dd", {
2268
+ className: "mt-1 flex flex-wrap gap-1.5",
2269
+ children: C.map((e) => /* @__PURE__ */ H(Fe, {
2270
+ link: e,
2271
+ renderIcon: u
2272
+ }, e.id))
2273
+ })]
2274
+ }),
2275
+ (v.createdAt || v.updatedAt) && /* @__PURE__ */ U("div", {
2276
+ className: "flex flex-wrap gap-x-6 gap-y-1 border-t border-border pt-3 text-xs text-muted-foreground sm:col-span-2",
2277
+ children: [v.createdAt && /* @__PURE__ */ U("span", { children: [
2278
+ p.createdLabel,
2279
+ " ",
2280
+ xe(v.createdAt)
2281
+ ] }), v.updatedAt && /* @__PURE__ */ U("span", { children: [
2282
+ p.updatedLabel,
2283
+ " ",
2284
+ xe(v.updatedAt)
2285
+ ] })]
2204
2286
  })
2205
2287
  ]
2206
2288
  })
@@ -2208,7 +2290,7 @@ function xt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
2208
2290
  })
2209
2291
  });
2210
2292
  }
2211
- function St({ label: e, children: t }) {
2293
+ function wt({ label: e, children: t }) {
2212
2294
  return /* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("dt", {
2213
2295
  className: $,
2214
2296
  children: e
@@ -2217,48 +2299,50 @@ function St({ label: e, children: t }) {
2217
2299
  children: t
2218
2300
  })] });
2219
2301
  }
2220
- function Ct({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, readonly: i, hiddenFields: a, views: o, defaultView: s = "board", resolveAssignee: c, linkSourceProduct: l, renderLinkIcon: u, assigneeOptions: d, currentActorId: f, labels: p, openItemId: m, header: h, onTaskSaved: g, createSurface: v = "modal", detailSurface: b = "drawer", className: S }) {
2221
- let C = K(), w = e ?? C?.workspaceId, T = ne(), E = Le(p), [D, O] = x(s), [k, A] = x(""), [j, M] = x("ALL"), [N, P] = x("ALL"), [F, I] = x(!1), [L, R] = x(!1), [z, B] = x(null);
2302
+ function Tt({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, readonly: i, hiddenFields: a, views: o, defaultView: s = "board", confirmMove: c, resolveAssignee: l, linkSourceProduct: u, renderLinkIcon: d, assigneeOptions: f, currentActorId: p, labels: m, openItemId: h, header: g, onTaskSaved: v, createSurface: b = "modal", detailSurface: S = "drawer", className: C }) {
2303
+ let w = q(), T = e ?? w?.workspaceId, E = te(), D = ze(m), [O, k] = x(s), [A, j] = x(""), [M, N] = x("ALL"), [P, F] = x("ALL"), [I, L] = x(!1), [R, z] = x(!1), [B, V] = x(null);
2222
2304
  y(() => {
2223
- m && B(m);
2224
- }, [m]);
2225
- let V = _(() => {
2226
- T.refetchQueries({ include: [le] }).catch(() => {});
2227
- }, [T]), ee = _((e) => {
2228
- V(), R(!1), g?.({
2305
+ h && V(h);
2306
+ }, [h]);
2307
+ let W = _(() => {
2308
+ E.refetchQueries({ include: [le] }).catch(() => {});
2309
+ }, [E]), ee = _((e) => {
2310
+ W(), z(!1), v?.({
2229
2311
  workItem: e,
2230
2312
  operation: "created"
2231
2313
  });
2232
- }, [V, g]), te = _((e) => {
2233
- V(), g?.({
2314
+ }, [W, v]), G = _((e) => {
2315
+ W(), v?.({
2234
2316
  workItem: e,
2235
2317
  operation: "updated"
2236
2318
  });
2237
- }, [V, g]), W = _(() => {
2238
- B(null);
2239
- }, []), re = _((e) => {
2240
- B(e.id);
2241
- }, []), G = _((e) => B(e), []);
2242
- if (!w) return /* @__PURE__ */ H("div", {
2243
- className: J("p-6 text-sm text-destructive", S),
2319
+ }, [W, v]), ne = _(() => {
2320
+ V(null);
2321
+ }, []), K = _((e) => {
2322
+ V(e.id);
2323
+ }, []), re = _((e) => V(e), []);
2324
+ if (!T) return /* @__PURE__ */ H("div", {
2325
+ className: J("p-6 text-sm text-destructive", C),
2244
2326
  children: "TasksPage: no workspaceId provided (prop or PlanMagnetProvider)."
2245
2327
  });
2246
- let ie = !i && !!t, ae = L && v === "inline", oe = z != null && b === "inline", se = /* @__PURE__ */ H(nt, {
2247
- workspaceId: w,
2328
+ let ie = !i && !!t, ae = R && b === "inline", oe = B != null && S === "inline", se = /* @__PURE__ */ H(it, {
2329
+ workspaceId: T,
2248
2330
  projectId: t,
2249
- assigneeOptions: d,
2331
+ assigneeOptions: f,
2250
2332
  hiddenFields: a,
2251
2333
  onCreated: ee,
2252
- onCancel: () => R(!1)
2253
- }), q = z == null ? null : /* @__PURE__ */ H(xt, {
2254
- id: z,
2334
+ onCancel: () => z(!1)
2335
+ }), ce = B == null ? null : /* @__PURE__ */ H(Ct, {
2336
+ id: B,
2255
2337
  readonly: i,
2256
2338
  hiddenFields: a,
2257
- resolveAssignee: c,
2258
- assigneeOptions: d,
2259
- onUpdated: te,
2260
- onDeleted: W
2261
- }), ce = j === "ALL" ? void 0 : j, ue = N === "ALL" ? void 0 : N, de = F && f ? f : void 0, fe = l ? [
2339
+ resolveAssignee: l,
2340
+ assigneeOptions: f,
2341
+ linkSourceProduct: u,
2342
+ renderLinkIcon: d,
2343
+ onUpdated: G,
2344
+ onDeleted: ne
2345
+ }), ue = M === "ALL" ? void 0 : M, de = P === "ALL" ? void 0 : P, fe = I && p ? p : void 0, pe = u ? [
2262
2346
  "title",
2263
2347
  "status",
2264
2348
  "priority",
@@ -2266,81 +2350,82 @@ function Ct({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2266
2350
  "dueDate",
2267
2351
  "linkedRecord"
2268
2352
  ] : void 0;
2269
- return /* @__PURE__ */ H(Ie, {
2270
- value: E,
2353
+ return /* @__PURE__ */ H(Re, {
2354
+ value: D,
2271
2355
  children: /* @__PURE__ */ U("div", {
2272
- className: J("space-y-4 p-6", S),
2356
+ className: J("space-y-4 p-6", C),
2273
2357
  children: [
2274
- h && /* @__PURE__ */ H("div", {
2358
+ g && /* @__PURE__ */ H("div", {
2275
2359
  className: "min-w-0",
2276
- children: typeof h == "string" ? /* @__PURE__ */ H("h1", {
2360
+ children: typeof g == "string" ? /* @__PURE__ */ H("h1", {
2277
2361
  className: "truncate text-2xl font-semibold text-foreground",
2278
- children: h
2279
- }) : h
2362
+ children: g
2363
+ }) : g
2280
2364
  }),
2281
- /* @__PURE__ */ H(yt, {
2282
- view: D,
2283
- onViewChange: O,
2365
+ /* @__PURE__ */ H(xt, {
2366
+ view: O,
2367
+ onViewChange: k,
2284
2368
  views: o,
2285
- search: k,
2286
- onSearchChange: A,
2287
- priority: j,
2288
- onPriorityChange: M,
2289
- type: N,
2290
- onTypeChange: P,
2291
- onNewTask: () => R(!0),
2369
+ search: A,
2370
+ onSearchChange: j,
2371
+ priority: M,
2372
+ onPriorityChange: N,
2373
+ type: P,
2374
+ onTypeChange: F,
2375
+ onNewTask: () => z(!0),
2292
2376
  canCreate: ie,
2293
- mine: F,
2294
- onMineChange: f ? I : void 0
2377
+ mine: I,
2378
+ onMineChange: p ? L : void 0
2295
2379
  }),
2296
2380
  ae && /* @__PURE__ */ H("div", { children: se }),
2297
- D === "board" && /* @__PURE__ */ H(Qe, {
2298
- workspaceId: w,
2381
+ O === "board" && /* @__PURE__ */ H(et, {
2382
+ workspaceId: T,
2299
2383
  projectId: n,
2300
2384
  columns: r,
2301
2385
  readonly: i,
2386
+ confirmMove: c,
2302
2387
  hideHeader: !0,
2303
- priority: j,
2304
- type: N,
2305
- search: k,
2306
- assigneeId: de,
2388
+ priority: M,
2389
+ type: P,
2390
+ search: A,
2391
+ assigneeId: fe,
2307
2392
  hiddenFields: a,
2308
- resolveAssignee: c,
2309
- linkSourceProduct: l,
2310
- renderLinkIcon: u,
2311
- onTaskClick: re
2393
+ resolveAssignee: l,
2394
+ linkSourceProduct: u,
2395
+ renderLinkIcon: d,
2396
+ onTaskClick: K
2312
2397
  }),
2313
- D === "list" && /* @__PURE__ */ H(ct, {
2314
- workspaceId: w,
2398
+ O === "list" && /* @__PURE__ */ H(ut, {
2399
+ workspaceId: T,
2315
2400
  projectId: n,
2316
- priority: ce,
2317
- type: ue,
2318
- search: k || void 0,
2319
- assigneeId: de,
2401
+ priority: ue,
2402
+ type: de,
2403
+ search: A || void 0,
2404
+ assigneeId: fe,
2320
2405
  hideHeader: !0,
2321
- resolveAssignee: c,
2322
- linkSourceProduct: l,
2323
- renderLinkIcon: u,
2324
- columns: fe ? [...fe] : void 0,
2325
- onSelect: G
2406
+ resolveAssignee: l,
2407
+ linkSourceProduct: u,
2408
+ renderLinkIcon: d,
2409
+ columns: pe ? [...pe] : void 0,
2410
+ onSelect: re
2326
2411
  }),
2327
- D === "timeline" && /* @__PURE__ */ H(mt, {
2328
- workspaceId: w,
2412
+ O === "timeline" && /* @__PURE__ */ H(gt, {
2413
+ workspaceId: T,
2329
2414
  projectId: n,
2330
- priority: j,
2331
- type: N,
2332
- search: k,
2333
- assigneeId: de,
2334
- resolveAssignee: c,
2335
- onSelect: G
2415
+ priority: M,
2416
+ type: P,
2417
+ search: A,
2418
+ assigneeId: fe,
2419
+ resolveAssignee: l,
2420
+ onSelect: re
2336
2421
  }),
2337
2422
  oe && /* @__PURE__ */ H("div", {
2338
2423
  className: "pb-6",
2339
- children: q
2424
+ children: ce
2340
2425
  }),
2341
- v === "modal" && /* @__PURE__ */ H(qe, {
2342
- open: L,
2343
- onClose: () => R(!1),
2426
+ b === "modal" && /* @__PURE__ */ H(Ye, {
2427
+ open: R,
2428
+ onClose: () => z(!1),
2344
2429
  ariaLabel: "Create task",
2345
2430
  className: "max-w-xl",
2346
2431
  children: /* @__PURE__ */ H("div", {
@@ -2348,13 +2433,13 @@ function Ct({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2348
2433
  children: se
2349
2434
  })
2350
2435
  }),
2351
- b === "drawer" && /* @__PURE__ */ H(Je, {
2352
- open: z != null,
2353
- onClose: () => B(null),
2436
+ S === "drawer" && /* @__PURE__ */ H(Xe, {
2437
+ open: B != null,
2438
+ onClose: () => V(null),
2354
2439
  ariaLabel: "Task detail",
2355
2440
  children: /* @__PURE__ */ H("div", {
2356
2441
  className: "p-2 pt-8",
2357
- children: q
2442
+ children: ce
2358
2443
  })
2359
2444
  })
2360
2445
  ]
@@ -2362,6 +2447,6 @@ function Ct({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
2362
2447
  });
2363
2448
  }
2364
2449
  //#endregion
2365
- export { nt as CreateTaskCore, Ct as TasksPageCore };
2450
+ export { it as CreateTaskCore, Tt as TasksPageCore };
2366
2451
 
2367
2452
  //# sourceMappingURL=index.js.map