@burdenoff/microfe-healthybowl 2026.704.1 → 2026.704.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,30 +15,30 @@ import p from "../../../date-fns/isToday.js";
15
15
  import m from "../../../date-fns/parseISO.js";
16
16
  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
- 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, LayoutGrid as P, Link2 as F, List as I, Plus as L, Search as R, User as z } from "lucide-react";
19
- import { jsx as B, jsxs as V } from "react/jsx-runtime";
20
- import { Card as H, CardContent as U } from "@burdenoff/fe-libs/ui";
21
- import { gql as W } from "@apollo/client";
22
- import { useApolloClient as ee, useMutation as te, useQuery as G } from "@apollo/client/react";
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 ee, User as B } from "lucide-react";
19
+ import { jsx as V, jsxs as H } from "react/jsx-runtime";
20
+ import { Card as te, CardContent as ne } from "@burdenoff/fe-libs/ui";
21
+ import { gql as U } from "@apollo/client";
22
+ import { useApolloClient as re, useMutation as W, useQuery as G } 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 ne = {
27
+ var ie = {
28
28
  apiGatewayUrl: "",
29
29
  workspaceId: ""
30
30
  };
31
31
  new Proxy({}, { get(e, t) {
32
- return ne[t];
32
+ return ie[t];
33
33
  } });
34
- function re() {
35
- return { ...ne };
34
+ function ae() {
35
+ return { ...ie };
36
36
  }
37
- var ie = g(null);
37
+ var oe = g(null);
38
38
  function K() {
39
- return v(ie);
39
+ return v(oe);
40
40
  }
41
- var ae = W`
41
+ var se = U`
42
42
  fragment WorkItemSummaryFields on WorkItem {
43
43
  id
44
44
  key
@@ -52,7 +52,7 @@ var ae = W`
52
52
  dueDate
53
53
  labels
54
54
  }
55
- `, oe = W`
55
+ `, q = U`
56
56
  fragment WorkItemFields on WorkItem {
57
57
  id
58
58
  workspaceId
@@ -81,7 +81,7 @@ var ae = W`
81
81
  updatedBy
82
82
  deletedAt
83
83
  }
84
- `, se = W`
84
+ `, ce = U`
85
85
  fragment ProjectSummaryFields on Project {
86
86
  id
87
87
  name
@@ -93,7 +93,7 @@ var ae = W`
93
93
  endDate
94
94
  tags
95
95
  }
96
- `, ce = W`
96
+ `, le = U`
97
97
  query ListWorkItems(
98
98
  $workspaceId: ID!
99
99
  $filter: PlanmagnetWorkItemFilter
@@ -117,16 +117,16 @@ var ae = W`
117
117
  totalCount
118
118
  }
119
119
  }
120
- ${ae}
121
- `, le = W`
120
+ ${se}
121
+ `, ue = U`
122
122
  query GetWorkItem($id: ID!) {
123
123
  planmagnetWorkItem(id: $id) {
124
124
  ...WorkItemFields
125
125
  }
126
126
  }
127
- ${oe}
127
+ ${q}
128
128
  `;
129
- W`
129
+ U`
130
130
  query GetProjects(
131
131
  $workspaceId: ID!
132
132
  $filter: PlanmagnetProjectFilter
@@ -150,32 +150,32 @@ W`
150
150
  totalCount
151
151
  }
152
152
  }
153
- ${se}
153
+ ${ce}
154
154
  `;
155
- var ue = W`
155
+ var de = U`
156
156
  mutation CreateWorkItem($input: PlanmagnetCreateWorkItemInput!) {
157
157
  planmagnetCreateWorkItem(input: $input) {
158
158
  ...WorkItemFields
159
159
  }
160
160
  }
161
- ${oe}
162
- `, de = W`
161
+ ${q}
162
+ `, fe = U`
163
163
  mutation UpdateWorkItem($id: ID!, $input: PlanmagnetUpdateWorkItemInput!) {
164
164
  planmagnetUpdateWorkItem(id: $id, input: $input) {
165
165
  ...WorkItemFields
166
166
  }
167
167
  }
168
- ${oe}
168
+ ${q}
169
169
  `;
170
- W`
170
+ U`
171
171
  mutation MoveWorkItem($id: ID!, $input: PlanmagnetMoveWorkItemInput!) {
172
172
  planmagnetMoveWorkItem(id: $id, input: $input) {
173
173
  ...WorkItemFields
174
174
  }
175
175
  }
176
- ${oe}
176
+ ${q}
177
177
  `;
178
- var fe = W`
178
+ var pe = U`
179
179
  fragment WorkItemLinkFields on WorkItemLink {
180
180
  id
181
181
  workspaceId
@@ -192,7 +192,7 @@ var fe = W`
192
192
  createdAt
193
193
  updatedAt
194
194
  }
195
- `, pe = W`
195
+ `, me = U`
196
196
  query ListWorkItemLinks(
197
197
  $workspaceId: ID!
198
198
  $filter: PlanmagnetWorkItemLinkFilter
@@ -216,40 +216,83 @@ var fe = W`
216
216
  totalCount
217
217
  }
218
218
  }
219
- ${fe}
219
+ ${pe}
220
220
  `;
221
- W`
221
+ U`
222
222
  mutation CreateWorkItemLink($input: PlanmagnetCreateWorkItemLinkInput!) {
223
223
  planmagnetLinkWorkItem(input: $input) {
224
224
  ...WorkItemLinkFields
225
225
  }
226
226
  }
227
- ${fe}
228
- `, W`
227
+ ${pe}
228
+ `, U`
229
229
  mutation UnlinkWorkItem($id: ID!) {
230
230
  planmagnetUnlinkWorkItem(id: $id)
231
231
  }
232
232
  `;
233
- function q(...n) {
233
+ var he = U`
234
+ query ListMilestones(
235
+ $workspaceId: ID!
236
+ $filter: PlanmagnetMilestoneFilter
237
+ $pagination: PlanmagnetPaginationInput
238
+ ) {
239
+ planmagnetMilestones(
240
+ workspaceId: $workspaceId
241
+ filter: $filter
242
+ pagination: $pagination
243
+ ) {
244
+ items {
245
+ ...MilestoneFields
246
+ }
247
+ pageInfo {
248
+ hasNextPage
249
+ hasPreviousPage
250
+ startCursor
251
+ endCursor
252
+ totalCount
253
+ }
254
+ totalCount
255
+ }
256
+ }
257
+ ${U`
258
+ fragment MilestoneFields on Milestone {
259
+ id
260
+ projectId
261
+ name
262
+ description
263
+ status
264
+ dueDate
265
+ completedAt
266
+ ownerId
267
+ createdAt
268
+ updatedAt
269
+ }
270
+ `}
271
+ `, ge = U`
272
+ mutation DeleteWorkItem($id: ID!) {
273
+ planmagnetDeleteWorkItem(id: $id)
274
+ }
275
+ `;
276
+ function J(...n) {
234
277
  return t(e(n));
235
278
  }
236
- var me = /* @__PURE__ */ new Set(["DONE", "CANCELLED"]);
237
- function he(e) {
279
+ var _e = /* @__PURE__ */ new Set(["DONE", "CANCELLED"]);
280
+ function ve(e) {
238
281
  if (!e) return null;
239
282
  let t = m(e);
240
283
  return o(t) ? t : null;
241
284
  }
242
- function ge(e) {
243
- let t = he(e);
285
+ function ye(e) {
286
+ let t = ve(e);
244
287
  if (!t) return null;
245
288
  let n = /* @__PURE__ */ new Date();
246
289
  return d(t, t.getFullYear() === n.getFullYear() ? "MMM d" : "MMM d yyyy");
247
290
  }
248
- function _e(e, t) {
249
- let n = he(e);
250
- return !n || t && me.has(t) ? !1 : i(n).getTime() < i(/* @__PURE__ */ new Date()).getTime();
291
+ function be(e, t) {
292
+ let n = ve(e);
293
+ return !n || t && _e.has(t) ? !1 : i(n).getTime() < i(/* @__PURE__ */ new Date()).getTime();
251
294
  }
252
- var ve = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
295
+ var xe = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium capitalize transition-colors", {
253
296
  variants: { variant: {
254
297
  default: "bg-primary/10 text-primary",
255
298
  muted: "bg-muted text-muted-foreground",
@@ -259,29 +302,29 @@ var ve = h("inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-m
259
302
  } },
260
303
  defaultVariants: { variant: "default" }
261
304
  });
262
- function ye({ className: e, variant: t, ...n }) {
263
- return /* @__PURE__ */ B("span", {
264
- className: q(ve({ variant: t }), e),
305
+ function Se({ className: e, variant: t, ...n }) {
306
+ return /* @__PURE__ */ V("span", {
307
+ className: J(xe({ variant: t }), e),
265
308
  ...n
266
309
  });
267
310
  }
268
- var be = [
311
+ var Ce = [
269
312
  "bg-primary/15 text-primary",
270
313
  "bg-secondary text-secondary-foreground",
271
314
  "bg-accent text-accent-foreground",
272
315
  "bg-muted text-muted-foreground",
273
316
  "bg-destructive/15 text-destructive"
274
- ], xe = {
317
+ ], we = {
275
318
  sm: "h-5 w-5 text-[9px]",
276
319
  md: "h-6 w-6 text-[10px]",
277
320
  lg: "h-8 w-8 text-xs"
278
321
  };
279
- function Se(e) {
322
+ function Te(e) {
280
323
  let t = 0;
281
324
  for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) >>> 0;
282
- return t % be.length;
325
+ return t % Ce.length;
283
326
  }
284
- function Ce(e, t) {
327
+ function Ee(e, t) {
285
328
  let n = (e ?? "").trim();
286
329
  if (n) {
287
330
  let e = n.split(/\s+/);
@@ -289,25 +332,25 @@ function Ce(e, t) {
289
332
  }
290
333
  return (t ?? "").replace(/[^a-zA-Z0-9]/g, "").slice(0, 2).toUpperCase() || "?";
291
334
  }
292
- function we({ id: e, name: t, size: n = "md", className: r }) {
293
- if (!e && !t) return /* @__PURE__ */ B("span", {
294
- className: q("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", xe[n], r),
335
+ function De({ id: e, name: t, size: n = "md", className: r }) {
336
+ if (!e && !t) return /* @__PURE__ */ V("span", {
337
+ className: J("inline-flex items-center justify-center rounded-full border border-dashed border-border text-muted-foreground", we[n], r),
295
338
  title: "Unassigned",
296
339
  "aria-label": "Unassigned",
297
- children: /* @__PURE__ */ B(z, {
340
+ children: /* @__PURE__ */ V(B, {
298
341
  className: "h-1/2 w-1/2",
299
342
  "aria-hidden": "true"
300
343
  })
301
344
  });
302
- let i = be[Se(t || e || "")];
303
- return /* @__PURE__ */ B("span", {
304
- className: q("inline-flex items-center justify-center rounded-full font-medium", xe[n], i, r),
345
+ let i = Ce[Te(t || e || "")];
346
+ return /* @__PURE__ */ V("span", {
347
+ className: J("inline-flex items-center justify-center rounded-full font-medium", we[n], i, r),
305
348
  title: t ?? e ?? void 0,
306
349
  "aria-label": t ?? e ?? void 0,
307
- children: Ce(t, e)
350
+ children: Ee(t, e)
308
351
  });
309
352
  }
310
- var Te = [
353
+ var Oe = [
311
354
  {
312
355
  status: "BACKLOG",
313
356
  label: "Backlog"
@@ -332,19 +375,19 @@ var Te = [
332
375
  status: "DONE",
333
376
  label: "Done"
334
377
  }
335
- ], Ee = [
378
+ ], ke = [
336
379
  "NONE",
337
380
  "LOW",
338
381
  "MEDIUM",
339
382
  "HIGH",
340
383
  "CRITICAL"
341
- ], De = [
384
+ ], Ae = [
342
385
  "TASK",
343
386
  "STORY",
344
387
  "BUG",
345
388
  "EPIC",
346
389
  "SUB_TASK"
347
- ], Oe = [
390
+ ], je = [
348
391
  "BACKLOG",
349
392
  "TODO",
350
393
  "IN_PROGRESS",
@@ -353,29 +396,140 @@ var Te = [
353
396
  "DONE",
354
397
  "CANCELLED"
355
398
  ];
356
- function J(e) {
399
+ function Me(e) {
357
400
  return e.toLowerCase().replace(/_/g, " ");
358
401
  }
359
- function ke({ link: e, renderIcon: t, className: n }) {
360
- let r = e.displayNameSnapshot || J(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ B(F, {
402
+ function Ne({ link: e, renderIcon: t, className: n }) {
403
+ let r = e.displayNameSnapshot || Me(e.entityType), i = t?.(e.entityType) ?? /* @__PURE__ */ V(I, {
361
404
  className: "h-3 w-3 shrink-0",
362
405
  "aria-hidden": "true"
363
- }), a = /* @__PURE__ */ V("span", {
364
- className: q("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),
365
- title: `${J(e.relationType)} \xB7 ${J(e.entityType)}`,
366
- children: [i, /* @__PURE__ */ B("span", {
406
+ }), a = /* @__PURE__ */ H("span", {
407
+ 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)}`,
409
+ children: [i, /* @__PURE__ */ V("span", {
367
410
  className: "truncate",
368
411
  children: r
369
412
  })]
370
413
  });
371
- return e.deepLinkSnapshot ? /* @__PURE__ */ B("a", {
414
+ return e.deepLinkSnapshot ? /* @__PURE__ */ V("a", {
372
415
  href: e.deepLinkSnapshot,
373
416
  onClick: (e) => e.stopPropagation(),
374
417
  className: "inline-flex max-w-full no-underline hover:brightness-95",
375
418
  children: a
376
419
  }) : a;
377
420
  }
378
- var Ae = {
421
+ var Pe = {
422
+ board: "Board",
423
+ list: "List",
424
+ timeline: "Timeline",
425
+ searchPlaceholder: "Search tasks…",
426
+ allPriorities: "All priorities",
427
+ allTypes: "All types",
428
+ newTask: "New task",
429
+ myTasks: "My tasks",
430
+ noTasks: "No tasks",
431
+ noTasksFound: "No tasks found.",
432
+ dropHere: "Drop here",
433
+ unassigned: "Unassigned",
434
+ assigned: "Assigned",
435
+ overdue: "{n} overdue",
436
+ noDueDate: "No due date ({n})",
437
+ milestones: "Milestones",
438
+ today: "Today",
439
+ week: "Week",
440
+ month: "Month",
441
+ tasksSingular: "task",
442
+ tasksPlural: "tasks",
443
+ colTask: "Task",
444
+ colStatus: "Status",
445
+ colPriority: "Priority",
446
+ colAssignee: "Assignee",
447
+ colDueDate: "Due Date",
448
+ colPoints: "Points",
449
+ colLinkedRecord: "Linked Record",
450
+ colType: "Type",
451
+ colKey: "Key",
452
+ colLabels: "Labels",
453
+ newTaskHeading: "New task",
454
+ newTaskSubtitle: "Create a work item in this workspace.",
455
+ title: "Title",
456
+ titlePlaceholder: "What needs doing?",
457
+ description: "Description",
458
+ descriptionPlaceholder: "Add more detail (optional)",
459
+ typeLabel: "Type",
460
+ statusLabel: "Status",
461
+ priorityLabel: "Priority",
462
+ assigneeLabel: "Assignee",
463
+ assigneePlaceholder: "Actor ID (optional)",
464
+ dueDateLabel: "Due date",
465
+ storyPointsLabel: "Story points",
466
+ labelsLabel: "Labels",
467
+ labelsPlaceholder: "comma, separated, labels",
468
+ create: "Create task",
469
+ creating: "Creating…",
470
+ cancel: "Cancel",
471
+ edit: "Edit",
472
+ del: "Delete",
473
+ deletePrompt: "Delete?",
474
+ yes: "Yes",
475
+ no: "No",
476
+ save: "Save changes",
477
+ saving: "Saving…",
478
+ taskNotFound: "Task not found.",
479
+ projectRequired: "A projectId is required to create a task.",
480
+ errorLoading: "Error loading tasks",
481
+ moveFailed: "Couldn't move the task. Please try again.",
482
+ failedToCreate: "Failed to create task",
483
+ failedToSave: "Failed to save",
484
+ failedToDelete: "Failed to delete",
485
+ overdueLabel: "Overdue",
486
+ more: "more",
487
+ status: {
488
+ BACKLOG: "Backlog",
489
+ TODO: "To Do",
490
+ IN_PROGRESS: "In Progress",
491
+ IN_REVIEW: "In Review",
492
+ TESTING: "Testing",
493
+ DONE: "Done",
494
+ CANCELLED: "Cancelled"
495
+ },
496
+ priority: {
497
+ NONE: "None",
498
+ LOW: "Low",
499
+ MEDIUM: "Medium",
500
+ HIGH: "High",
501
+ CRITICAL: "Critical"
502
+ },
503
+ type: {
504
+ TASK: "Task",
505
+ STORY: "Story",
506
+ BUG: "Bug",
507
+ EPIC: "Epic",
508
+ SUB_TASK: "Sub Task"
509
+ }
510
+ }, Fe = g(Pe), Ie = Fe.Provider;
511
+ function Y() {
512
+ return v(Fe);
513
+ }
514
+ function Le(e) {
515
+ return e ? {
516
+ ...Pe,
517
+ ...e,
518
+ status: {
519
+ ...Pe.status,
520
+ ...e.status
521
+ },
522
+ priority: {
523
+ ...Pe.priority,
524
+ ...e.priority
525
+ },
526
+ type: {
527
+ ...Pe.type,
528
+ ...e.type
529
+ }
530
+ } : Pe;
531
+ }
532
+ var Re = {
379
533
  BACKLOG: {
380
534
  icon: A,
381
535
  tone: "text-muted-foreground/60"
@@ -405,20 +559,21 @@ var Ae = {
405
559
  tone: "text-destructive/70"
406
560
  }
407
561
  };
408
- function je({ status: e, className: t }) {
409
- let n = Ae[e] ?? Ae.TODO, r = n.icon;
410
- return /* @__PURE__ */ B(r, {
411
- className: q("h-3.5 w-3.5 shrink-0", n.tone, t),
562
+ function ze({ status: e, className: t }) {
563
+ let n = Re[e] ?? Re.TODO, r = n.icon;
564
+ return /* @__PURE__ */ V(r, {
565
+ className: J("h-3.5 w-3.5 shrink-0", n.tone, t),
412
566
  "aria-hidden": "true"
413
567
  });
414
568
  }
415
- function Me({ status: e, className: t }) {
416
- return /* @__PURE__ */ V("span", {
417
- className: q("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),
418
- children: [/* @__PURE__ */ B(je, { status: e }), J(e)]
569
+ function Be({ status: e, className: t }) {
570
+ let n = Y();
571
+ return /* @__PURE__ */ H("span", {
572
+ 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__ */ V(ze, { status: e }), n.status[e]]
419
574
  });
420
575
  }
421
- var Ne = {
576
+ var Ve = {
422
577
  NONE: {
423
578
  level: 0,
424
579
  tone: "text-muted-foreground/50"
@@ -439,41 +594,42 @@ var Ne = {
439
594
  level: 3,
440
595
  tone: "text-destructive"
441
596
  }
442
- }, Pe = [
597
+ }, He = [
443
598
  "h-1.5",
444
599
  "h-2.5",
445
600
  "h-3.5"
446
601
  ];
447
- function Fe({ priority: e, showLabel: t = !1, className: n }) {
448
- let r = Ne[e] ?? Ne.NONE;
449
- return /* @__PURE__ */ V("span", {
450
- className: q("inline-flex items-center gap-1.5", r.tone, n),
451
- title: `Priority: ${J(e)}`,
452
- children: [/* @__PURE__ */ B("span", {
602
+ function Ue({ priority: e, showLabel: t = !1, className: n }) {
603
+ let r = Y(), i = Ve[e] ?? Ve.NONE;
604
+ return /* @__PURE__ */ H("span", {
605
+ className: J("inline-flex items-center gap-1.5", i.tone, n),
606
+ title: `${r.priorityLabel}: ${r.priority[e]}`,
607
+ children: [/* @__PURE__ */ V("span", {
453
608
  className: "flex items-end gap-0.5",
454
609
  "aria-hidden": "true",
455
- children: Pe.map((e, t) => /* @__PURE__ */ B("span", { className: q("w-1 rounded-[1px]", e, t < r.level ? "bg-current" : "bg-current/25") }, e))
456
- }), t && /* @__PURE__ */ B("span", {
610
+ children: He.map((e, t) => /* @__PURE__ */ V("span", { className: J("w-1 rounded-[1px]", e, t < i.level ? "bg-current" : "bg-current/25") }, e))
611
+ }), t && /* @__PURE__ */ V("span", {
457
612
  className: "text-xs font-medium capitalize",
458
- children: J(e)
613
+ children: r.priority[e]
459
614
  })]
460
615
  });
461
616
  }
462
- var Ie = {
617
+ var We = {
463
618
  TASK: "secondary",
464
619
  STORY: "default",
465
620
  BUG: "destructive",
466
621
  EPIC: "accent",
467
622
  SUB_TASK: "muted"
468
623
  };
469
- function Le({ type: e, className: t }) {
470
- return /* @__PURE__ */ B(ye, {
471
- variant: Ie[e],
624
+ function Ge({ type: e, className: t }) {
625
+ let n = Y();
626
+ return /* @__PURE__ */ V(Se, {
627
+ variant: We[e],
472
628
  className: t,
473
- children: J(e)
629
+ children: n.type[e]
474
630
  });
475
631
  }
476
- function Re({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
632
+ function Ke({ open: e, onClose: t, children: n, ariaLabel: r, className: i, variant: a }) {
477
633
  if (y(() => {
478
634
  if (!e) return;
479
635
  let n = (e) => {
@@ -482,16 +638,16 @@ function Re({ open: e, onClose: t, children: n, ariaLabel: r, className: i, vari
482
638
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
483
639
  }, [e, t]), !e) return null;
484
640
  let o = a === "modal";
485
- return /* @__PURE__ */ B("div", {
486
- className: q("fixed inset-0 z-50 flex bg-foreground/40", o ? "items-center justify-center p-4" : "justify-end"),
641
+ return /* @__PURE__ */ V("div", {
642
+ className: J("fixed inset-0 z-50 flex bg-foreground/40", o ? "items-center justify-center p-4" : "justify-end"),
487
643
  onClick: t,
488
- children: /* @__PURE__ */ V("div", {
644
+ children: /* @__PURE__ */ H("div", {
489
645
  role: "dialog",
490
646
  "aria-modal": "true",
491
647
  "aria-label": r,
492
- className: q("relative overflow-y-auto bg-background text-foreground shadow-lg", o ? "max-h-[90vh] w-full max-w-2xl rounded-lg" : "h-full w-full max-w-lg", i),
648
+ className: J("relative overflow-y-auto bg-background text-foreground shadow-lg", o ? "max-h-[90vh] w-full max-w-2xl rounded-lg" : "h-full w-full max-w-lg", i),
493
649
  onClick: (e) => e.stopPropagation(),
494
- children: [/* @__PURE__ */ B("button", {
650
+ children: [/* @__PURE__ */ V("button", {
495
651
  type: "button",
496
652
  "aria-label": "Close",
497
653
  onClick: t,
@@ -501,24 +657,24 @@ function Re({ open: e, onClose: t, children: n, ariaLabel: r, className: i, vari
501
657
  })
502
658
  });
503
659
  }
504
- function ze(e) {
505
- return /* @__PURE__ */ B(Re, {
660
+ function qe(e) {
661
+ return /* @__PURE__ */ V(Ke, {
506
662
  variant: "modal",
507
663
  ...e
508
664
  });
509
665
  }
510
- function Be(e) {
511
- return /* @__PURE__ */ B(Re, {
666
+ function Je(e) {
667
+ return /* @__PURE__ */ V(Ke, {
512
668
  variant: "drawer",
513
669
  ...e
514
670
  });
515
671
  }
516
- var Ve = /* @__PURE__ */ new Set();
517
- function He({ task: e, hidden: t = Ve, onClick: n, draggable: r, onDragStart: i, onDragEnd: a, dragging: o, resolveAssignee: s, links: c, renderLinkIcon: l, className: u }) {
518
- let d = _e(e.dueDate, e.status), f = ge(e.dueDate), p = e.assigneeId ? s?.(e.assigneeId) : null, m = !t.has("key") || !t.has("type"), h = !t.has("links") && (c?.length ?? 0) > 0, g = !t.has("labels") && (e.labels?.length ?? 0) > 0, _ = !t.has("priority"), v = !t.has("storyPoints") && e.storyPoints != null, y = _ || v, b = !t.has("assignee"), x = !t.has("dueDate") && !!f, C = b || x, w = !!n;
519
- return /* @__PURE__ */ V("div", {
520
- role: w ? "button" : void 0,
521
- tabIndex: w ? 0 : void 0,
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;
675
+ return /* @__PURE__ */ H("div", {
676
+ role: T ? "button" : void 0,
677
+ tabIndex: T ? 0 : void 0,
522
678
  draggable: r,
523
679
  onDragStart: r ? (t) => i?.(e, t) : void 0,
524
680
  onDragEnd: r ? (t) => a?.(e, t) : void 0,
@@ -526,76 +682,76 @@ function He({ task: e, hidden: t = Ve, onClick: n, draggable: r, onDragStart: i,
526
682
  onKeyDown: n ? (t) => {
527
683
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e));
528
684
  } : void 0,
529
- className: q("group rounded-lg border border-border bg-card p-2.5 shadow-sm transition", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", w && "cursor-pointer hover:border-primary/50 hover:shadow-md", r && "active:cursor-grabbing", o && "opacity-50 ring-2 ring-primary/40", u),
685
+ className: J("group rounded-lg border border-border bg-card p-2.5 shadow-sm transition", "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring", T && "cursor-pointer hover:border-primary/50 hover:shadow-md", r && "active:cursor-grabbing", o && "opacity-50 ring-2 ring-primary/40", u),
530
686
  children: [
531
- m && /* @__PURE__ */ V("div", {
687
+ h && /* @__PURE__ */ H("div", {
532
688
  className: "mb-1 flex items-center justify-between gap-2",
533
- children: [t.has("key") ? /* @__PURE__ */ B("span", {}) : /* @__PURE__ */ B("span", {
689
+ children: [t.has("key") ? /* @__PURE__ */ V("span", {}) : /* @__PURE__ */ V("span", {
534
690
  className: "font-mono text-[10px] uppercase tracking-wide text-muted-foreground",
535
691
  children: e.key
536
- }), !t.has("type") && /* @__PURE__ */ B(Le, { type: e.type })]
692
+ }), !t.has("type") && /* @__PURE__ */ V(Ge, { type: e.type })]
537
693
  }),
538
- /* @__PURE__ */ B("p", {
694
+ /* @__PURE__ */ V("p", {
539
695
  className: "line-clamp-2 text-sm font-medium leading-snug text-foreground",
540
696
  children: e.title
541
697
  }),
542
- h && /* @__PURE__ */ V("div", {
698
+ g && /* @__PURE__ */ H("div", {
543
699
  className: "mt-1.5 flex flex-wrap gap-1",
544
- children: [c.slice(0, 3).map((e) => /* @__PURE__ */ B(ke, {
700
+ children: [c.slice(0, 3).map((e) => /* @__PURE__ */ V(Ne, {
545
701
  link: e,
546
702
  renderIcon: l
547
- }, e.id)), c.length > 3 && /* @__PURE__ */ V("span", {
703
+ }, e.id)), c.length > 3 && /* @__PURE__ */ H("span", {
548
704
  className: "text-[10px] text-muted-foreground",
549
705
  children: ["+", c.length - 3]
550
706
  })]
551
707
  }),
552
- g && /* @__PURE__ */ V("div", {
708
+ _ && /* @__PURE__ */ H("div", {
553
709
  className: "mt-1.5 flex flex-wrap gap-1",
554
- children: [e.labels.slice(0, 3).map((e) => /* @__PURE__ */ B("span", {
710
+ children: [e.labels.slice(0, 3).map((e) => /* @__PURE__ */ V("span", {
555
711
  className: "rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",
556
712
  children: e
557
- }, e)), e.labels.length > 3 && /* @__PURE__ */ V("span", {
713
+ }, e)), e.labels.length > 3 && /* @__PURE__ */ H("span", {
558
714
  className: "text-[10px] text-muted-foreground",
559
715
  children: ["+", e.labels.length - 3]
560
716
  })]
561
717
  }),
562
- y && /* @__PURE__ */ V("div", {
718
+ b && /* @__PURE__ */ H("div", {
563
719
  className: "mt-2 flex items-center justify-between",
564
- children: [_ ? /* @__PURE__ */ B(Fe, {
720
+ children: [v ? /* @__PURE__ */ V(Ue, {
565
721
  priority: e.priority,
566
722
  showLabel: !0
567
- }) : /* @__PURE__ */ B("span", {}), v && /* @__PURE__ */ B("span", {
723
+ }) : /* @__PURE__ */ V("span", {}), y && /* @__PURE__ */ V("span", {
568
724
  className: "flex h-5 min-w-5 items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] font-semibold text-primary",
569
- title: `${e.storyPoints} story points`,
725
+ title: `${e.storyPoints} ${d.storyPointsLabel}`,
570
726
  children: e.storyPoints
571
727
  })]
572
728
  }),
573
- C && /* @__PURE__ */ V("div", {
729
+ w && /* @__PURE__ */ H("div", {
574
730
  className: "mt-2 flex items-center justify-between gap-2",
575
- children: [b ? /* @__PURE__ */ V("span", {
731
+ children: [x ? /* @__PURE__ */ H("span", {
576
732
  className: "flex min-w-0 items-center gap-1.5",
577
- children: [/* @__PURE__ */ B(we, {
733
+ children: [/* @__PURE__ */ V(De, {
578
734
  id: e.assigneeId,
579
- name: p?.name,
735
+ name: m?.name,
580
736
  size: "sm"
581
- }), p?.name && /* @__PURE__ */ B("span", {
737
+ }), m?.name && /* @__PURE__ */ V("span", {
582
738
  className: "truncate text-[11px] text-muted-foreground",
583
- children: p.name
739
+ children: m.name
584
740
  })]
585
- }) : /* @__PURE__ */ B("span", {}), x && /* @__PURE__ */ V("span", {
586
- className: q("flex shrink-0 items-center gap-1 text-[11px]", d ? "font-medium text-destructive" : "text-muted-foreground"),
587
- title: d ? "Overdue" : "Due date",
588
- children: [/* @__PURE__ */ B(S, {
741
+ }) : /* @__PURE__ */ V("span", {}), C && /* @__PURE__ */ H("span", {
742
+ className: J("flex shrink-0 items-center gap-1 text-[11px]", f ? "font-medium text-destructive" : "text-muted-foreground"),
743
+ title: f ? d.overdueLabel : d.dueDateLabel,
744
+ children: [/* @__PURE__ */ V(S, {
589
745
  className: "h-3 w-3",
590
746
  "aria-hidden": "true"
591
- }), f]
747
+ }), p]
592
748
  })]
593
749
  })
594
750
  ]
595
751
  });
596
752
  }
597
- function Ue(e, t, n = 500) {
598
- let { data: r, loading: i } = G(pe, {
753
+ function Ze(e, t, n = 500) {
754
+ let { data: r, loading: i } = G(me, {
599
755
  variables: {
600
756
  workspaceId: e,
601
757
  ...t ? { filter: { sourceProduct: t } } : {},
@@ -615,116 +771,124 @@ function Ue(e, t, n = 500) {
615
771
  loading: i
616
772
  };
617
773
  }
618
- function We({ projectId: e, columns: t = Te, 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 }) {
619
- let h = K(), g = m ?? h?.workspaceId, v = ee(), y = b(() => new Set(c ?? []), [c]), { linksByItem: S } = Ue(g, u), [C, w] = x(null), [T, E] = x(null), [D, O] = x(null), [k] = te(de), { data: A, loading: j, error: M } = G(ce, {
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 = re(), 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] = W(fe), { data: j, loading: M, error: N } = G(le, {
620
776
  variables: {
621
777
  workspaceId: g,
622
778
  ...e ? { filter: { projectId: e } } : {},
623
779
  pagination: { first: 200 }
624
780
  },
625
781
  skip: !g
626
- }), N = _((e, t) => {
782
+ }), P = _((e, t) => {
627
783
  let n = e.status;
628
784
  if (n === t) return;
629
785
  let r = v.cache.identify({
630
786
  __typename: "WorkItem",
631
787
  id: e.id
632
788
  });
633
- r && (O(null), v.cache.modify({
789
+ r && (k(null), v.cache.modify({
634
790
  id: r,
635
791
  fields: { status: () => t }
636
- }), k({ variables: {
792
+ }), A({ variables: {
637
793
  id: e.id,
638
794
  input: { status: t }
639
795
  } }).catch(() => {
640
796
  v.cache.modify({
641
797
  id: r,
642
798
  fields: { status: () => n }
643
- }), O("Couldn't move the task. Please try again.");
799
+ }), k(y.moveFailed);
644
800
  }));
645
- }, [v, k]);
646
- if (!g) return /* @__PURE__ */ B("div", {
647
- className: q("p-6 text-sm text-destructive", p),
801
+ }, [
802
+ v,
803
+ A,
804
+ y
805
+ ]);
806
+ if (!g) return /* @__PURE__ */ V("div", {
807
+ className: J("p-6 text-sm text-destructive", p),
648
808
  children: "TaskBoard: no workspaceId provided (prop or PlanMagnetProvider)."
649
809
  });
650
- if (j && !A) return /* @__PURE__ */ B("div", {
651
- className: q("flex items-center justify-center p-12", p),
652
- children: /* @__PURE__ */ B("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
810
+ if (M && !j) return /* @__PURE__ */ V("div", {
811
+ className: J("flex items-center justify-center p-12", p),
812
+ children: /* @__PURE__ */ V("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
653
813
  });
654
- if (M && !A) return /* @__PURE__ */ V("div", {
655
- className: q("p-6 text-sm text-destructive", p),
656
- children: ["Error loading tasks: ", M.message]
814
+ if (N && !j) return /* @__PURE__ */ H("div", {
815
+ className: J("p-6 text-sm text-destructive", p),
816
+ children: [
817
+ y.errorLoading,
818
+ ": ",
819
+ N.message
820
+ ]
657
821
  });
658
- let P = A?.planmagnetWorkItems?.items ?? [], F = o.trim().toLowerCase(), I = P.filter((e) => !(i !== "ALL" && e.priority !== i || a !== "ALL" && e.type !== a || s && e.assigneeId !== s || F && ![
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 && ![
659
823
  e.title,
660
824
  e.key,
661
825
  ...e.labels ?? []
662
- ].join(" ").toLowerCase().includes(F))), L = !n, R = (e) => (t) => {
663
- !L || !C || (t.preventDefault(), T !== e && E(e));
664
- }, z = (e) => (t) => {
665
- if (!L) return;
826
+ ].join(" ").toLowerCase().includes(I))), R = !n, z = (e) => (t) => {
827
+ !R || !w || (t.preventDefault(), E !== e && D(e));
828
+ }, ee = (e) => (t) => {
829
+ if (!R) return;
666
830
  t.preventDefault();
667
- let n = P.find((e) => e.id === C);
668
- E(null), w(null), n && N(n, e);
831
+ let n = F.find((e) => e.id === w);
832
+ D(null), T(null), n && P(n, e);
669
833
  };
670
- return /* @__PURE__ */ V("div", {
671
- className: q("space-y-3", p),
834
+ return /* @__PURE__ */ H("div", {
835
+ className: J("space-y-3", p),
672
836
  children: [
673
- !r && /* @__PURE__ */ V("div", {
837
+ !r && /* @__PURE__ */ H("div", {
674
838
  className: "flex items-baseline justify-between",
675
- children: [/* @__PURE__ */ B("h2", {
839
+ children: [/* @__PURE__ */ V("h2", {
676
840
  className: "text-lg font-semibold text-foreground",
677
- children: "Board"
678
- }), /* @__PURE__ */ V("span", {
841
+ children: y.board
842
+ }), /* @__PURE__ */ H("span", {
679
843
  className: "text-sm text-muted-foreground",
680
844
  children: [
681
- I.length,
845
+ L.length,
682
846
  " ",
683
- I.length === 1 ? "task" : "tasks"
847
+ L.length === 1 ? y.tasksSingular : y.tasksPlural
684
848
  ]
685
849
  })]
686
850
  }),
687
- D && /* @__PURE__ */ B("div", {
851
+ O && /* @__PURE__ */ V("div", {
688
852
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-1.5 text-xs text-destructive",
689
- children: D
853
+ children: O
690
854
  }),
691
- /* @__PURE__ */ B("div", {
855
+ /* @__PURE__ */ V("div", {
692
856
  className: "flex gap-3 overflow-x-auto pb-2",
693
857
  children: t.map((e) => {
694
- let t = I.filter((t) => t.status === e.status), n = T === e.status;
695
- return /* @__PURE__ */ V("div", {
696
- onDragOver: R(e.status),
697
- onDragLeave: () => T === e.status && E(null),
698
- onDrop: z(e.status),
699
- className: q("flex w-72 shrink-0 flex-col rounded-lg border transition-colors", n ? "border-primary/50 bg-primary/5" : "border-transparent bg-muted/40"),
700
- children: [/* @__PURE__ */ V("div", {
858
+ let t = L.filter((t) => t.status === e.status), n = E === e.status;
859
+ return /* @__PURE__ */ H("div", {
860
+ onDragOver: z(e.status),
861
+ onDragLeave: () => E === e.status && D(null),
862
+ onDrop: ee(e.status),
863
+ 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
+ children: [/* @__PURE__ */ H("div", {
701
865
  className: "flex items-center justify-between gap-2 px-3 py-2",
702
- children: [/* @__PURE__ */ V("span", {
866
+ children: [/* @__PURE__ */ H("span", {
703
867
  className: "flex items-center gap-2 text-sm font-medium text-foreground",
704
- children: [/* @__PURE__ */ B(je, { status: e.status }), e.label]
705
- }), /* @__PURE__ */ B("span", {
868
+ children: [/* @__PURE__ */ V(ze, { status: e.status }), y.status[e.status]]
869
+ }), /* @__PURE__ */ V("span", {
706
870
  className: "rounded-full bg-muted px-1.5 text-xs font-medium text-muted-foreground",
707
871
  children: t.length
708
872
  })]
709
- }), /* @__PURE__ */ B("div", {
873
+ }), /* @__PURE__ */ V("div", {
710
874
  className: "flex flex-col gap-2 px-2 pb-2",
711
- children: t.length === 0 ? /* @__PURE__ */ B("div", {
875
+ children: t.length === 0 ? /* @__PURE__ */ V("div", {
712
876
  className: "rounded-md border border-dashed border-border/70 px-3 py-6 text-center text-xs text-muted-foreground",
713
- children: n ? "Drop here" : "No tasks"
714
- }) : t.map((e) => /* @__PURE__ */ B(He, {
877
+ children: n ? y.dropHere : y.noTasks
878
+ }) : t.map((e) => /* @__PURE__ */ V(Xe, {
715
879
  task: e,
716
- hidden: y,
880
+ hidden: S,
717
881
  onClick: f,
718
- draggable: L,
719
- dragging: C === e.id,
882
+ draggable: R,
883
+ dragging: w === e.id,
720
884
  resolveAssignee: l,
721
- links: S.get(e.id),
885
+ links: C.get(e.id),
722
886
  renderLinkIcon: d,
723
887
  onDragStart: (e, t) => {
724
- w(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id);
888
+ T(e.id), t.dataTransfer.effectAllowed = "move", t.dataTransfer.setData("text/plain", e.id);
725
889
  },
726
890
  onDragEnd: () => {
727
- w(null), E(null);
891
+ T(null), D(null);
728
892
  }
729
893
  }, e.id))
730
894
  })]
@@ -734,26 +898,26 @@ function We({ projectId: e, columns: t = Te, readonly: n, hideHeader: r, priorit
734
898
  ]
735
899
  });
736
900
  }
737
- var Ge = "TASK", Ke = "BACKLOG", qe = "NONE", Y = "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", X = "text-sm font-medium text-foreground";
738
- function Je({ projectId: e, hiddenFields: t, defaultValues: n, hideHeader: r, submitLabel: i = "Create task", onCreated: a, onError: o, onCancel: s, className: c, workspaceId: l }) {
739
- let u = K(), d = l ?? u?.workspaceId, f = e ?? n?.projectId, p = b(() => new Set(t ?? []), [t]), [m, h] = x(n?.title ?? ""), [g, _] = x(n?.description ?? ""), [v, y] = x(n?.type ?? Ge), [S, C] = x(n?.status ?? Ke), [w, T] = x(n?.priority ?? qe), [E, D] = x(n?.assigneeId ?? ""), [O, k] = x(n?.dueDate ?? ""), [A, j] = x((n?.labels ?? []).join(", ")), [M, N] = x(n?.storyPoints == null ? "" : String(n.storyPoints)), [P, { loading: F, error: I }] = te(ue), L = !!(d && f && m.trim()), R = async (e) => {
740
- if (e.preventDefault(), !L || !f) return;
741
- let t = A.split(",").map((e) => e.trim()).filter(Boolean), n = M.trim() ? Number(M) : void 0, r = {
742
- projectId: f,
743
- title: m.trim(),
744
- type: v,
745
- ...p.has("status") ? {} : { status: S },
746
- ...p.has("priority") ? {} : { priority: w },
747
- ...p.has("description") || !g.trim() ? {} : { description: g.trim() },
748
- ...p.has("assignee") || !E.trim() ? {} : { assigneeId: E.trim() },
749
- ...p.has("dueDate") || !O.trim() ? {} : { dueDate: O },
750
- ...p.has("labels") || t.length === 0 ? {} : { labels: t },
751
- ...p.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
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 }] = W(de), z = !!(f && p && g.trim()), ee = async (e) => {
904
+ if (e.preventDefault(), !z || !p) return;
905
+ let t = M.split(",").map((e) => e.trim()).filter(Boolean), n = P.trim() ? Number(P) : void 0, r = {
906
+ projectId: p,
907
+ title: g.trim(),
908
+ type: S,
909
+ ...h.has("status") ? {} : { status: w },
910
+ ...h.has("priority") ? {} : { priority: E },
911
+ ...h.has("description") || !v.trim() ? {} : { description: v.trim() },
912
+ ...h.has("assignee") || !O.trim() ? {} : { assigneeId: O.trim() },
913
+ ...h.has("dueDate") || !A.trim() ? {} : { dueDate: A },
914
+ ...h.has("labels") || t.length === 0 ? {} : { labels: t },
915
+ ...h.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
752
916
  };
753
917
  try {
754
- let e = (await P({ variables: { input: r } })).data?.planmagnetCreateWorkItem;
918
+ let e = (await I({ variables: { input: r } })).data?.planmagnetCreateWorkItem;
755
919
  if (e) {
756
- let t = re();
920
+ let t = ae();
757
921
  try {
758
922
  await t.onTaskSaved?.({
759
923
  id: e.id,
@@ -763,217 +927,233 @@ function Je({ projectId: e, hiddenFields: t, defaultValues: n, hideHeader: r, su
763
927
  operation: "created"
764
928
  });
765
929
  } catch {}
766
- a?.(e), z();
930
+ o?.(e), B();
767
931
  }
768
932
  } catch (e) {
769
- o?.(e instanceof Error ? e : Error(String(e)));
933
+ s?.(e instanceof Error ? e : Error(String(e)));
770
934
  }
771
935
  };
772
- function z() {
773
- h(""), _(""), y(Ge), C(Ke), T(qe), D(""), k(""), j(""), N("");
936
+ function B() {
937
+ _(""), y(""), C($e), T(et), D(tt), k(""), j(""), N(""), F("");
774
938
  }
775
- return d ? /* @__PURE__ */ B(H, {
776
- className: q("shadow-sm", c),
777
- children: /* @__PURE__ */ B(U, {
939
+ return f ? /* @__PURE__ */ V(te, {
940
+ className: J("shadow-sm", l),
941
+ children: /* @__PURE__ */ V(ne, {
778
942
  className: "p-6",
779
- children: /* @__PURE__ */ V("form", {
780
- onSubmit: R,
943
+ children: /* @__PURE__ */ H("form", {
944
+ onSubmit: ee,
781
945
  className: "space-y-4",
782
946
  children: [
783
- !r && /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("h2", {
947
+ !i && /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("h2", {
784
948
  className: "text-xl font-semibold text-foreground",
785
- children: "New task"
786
- }), /* @__PURE__ */ B("p", {
949
+ children: m.newTaskHeading
950
+ }), /* @__PURE__ */ V("p", {
787
951
  className: "text-sm text-muted-foreground",
788
- children: "Create a work item in this workspace."
952
+ children: m.newTaskSubtitle
789
953
  })] }),
790
- !f && /* @__PURE__ */ B("p", {
954
+ !p && /* @__PURE__ */ V("p", {
791
955
  className: "rounded-md bg-destructive/10 p-2 text-xs text-destructive",
792
- children: "A projectId is required to create a task."
956
+ children: m.projectRequired
793
957
  }),
794
- /* @__PURE__ */ V("div", {
958
+ /* @__PURE__ */ H("div", {
795
959
  className: "space-y-1",
796
- children: [/* @__PURE__ */ B("label", {
960
+ children: [/* @__PURE__ */ V("label", {
797
961
  htmlFor: "pm-title",
798
- className: X,
799
- children: "Title"
800
- }), /* @__PURE__ */ B("input", {
962
+ className: Z,
963
+ children: m.title
964
+ }), /* @__PURE__ */ V("input", {
801
965
  id: "pm-title",
802
- className: Y,
803
- value: m,
804
- onChange: (e) => h(e.target.value),
805
- placeholder: "What needs doing?",
966
+ className: X,
967
+ value: g,
968
+ onChange: (e) => _(e.target.value),
969
+ placeholder: m.titlePlaceholder,
806
970
  required: !0
807
971
  })]
808
972
  }),
809
- !p.has("description") && /* @__PURE__ */ V("div", {
973
+ !h.has("description") && /* @__PURE__ */ H("div", {
810
974
  className: "space-y-1",
811
- children: [/* @__PURE__ */ B("label", {
975
+ children: [/* @__PURE__ */ V("label", {
812
976
  htmlFor: "pm-description",
813
- className: X,
814
- children: "Description"
815
- }), /* @__PURE__ */ B("textarea", {
977
+ className: Z,
978
+ children: m.description
979
+ }), /* @__PURE__ */ V("textarea", {
816
980
  id: "pm-description",
817
- className: q(Y, "min-h-[80px]"),
818
- value: g,
819
- onChange: (e) => _(e.target.value),
820
- placeholder: "Add more detail (optional)"
981
+ className: J(X, "min-h-[80px]"),
982
+ value: v,
983
+ onChange: (e) => y(e.target.value),
984
+ placeholder: m.descriptionPlaceholder
821
985
  })]
822
986
  }),
823
- /* @__PURE__ */ V("div", {
987
+ /* @__PURE__ */ H("div", {
824
988
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
825
989
  children: [
826
- !p.has("type") && /* @__PURE__ */ V("div", {
990
+ !h.has("type") && /* @__PURE__ */ H("div", {
827
991
  className: "space-y-1",
828
- children: [/* @__PURE__ */ B("label", {
992
+ children: [/* @__PURE__ */ V("label", {
829
993
  htmlFor: "pm-type",
830
- className: X,
831
- children: "Type"
832
- }), /* @__PURE__ */ B("select", {
994
+ className: Z,
995
+ children: m.typeLabel
996
+ }), /* @__PURE__ */ V("select", {
833
997
  id: "pm-type",
834
- className: q(Y, "capitalize"),
835
- value: v,
836
- onChange: (e) => y(e.target.value),
837
- children: De.map((e) => /* @__PURE__ */ B("option", {
998
+ className: J(X, "capitalize"),
999
+ value: S,
1000
+ onChange: (e) => C(e.target.value),
1001
+ children: Ae.map((e) => /* @__PURE__ */ V("option", {
838
1002
  value: e,
839
- children: J(e)
1003
+ children: m.type[e]
840
1004
  }, e))
841
1005
  })]
842
1006
  }),
843
- !p.has("status") && /* @__PURE__ */ V("div", {
1007
+ !h.has("status") && /* @__PURE__ */ H("div", {
844
1008
  className: "space-y-1",
845
- children: [/* @__PURE__ */ B("label", {
1009
+ children: [/* @__PURE__ */ V("label", {
846
1010
  htmlFor: "pm-status",
847
- className: X,
848
- children: "Status"
849
- }), /* @__PURE__ */ B("select", {
1011
+ className: Z,
1012
+ children: m.statusLabel
1013
+ }), /* @__PURE__ */ V("select", {
850
1014
  id: "pm-status",
851
- className: q(Y, "capitalize"),
852
- value: S,
853
- onChange: (e) => C(e.target.value),
854
- children: Oe.map((e) => /* @__PURE__ */ B("option", {
1015
+ className: J(X, "capitalize"),
1016
+ value: w,
1017
+ onChange: (e) => T(e.target.value),
1018
+ children: je.map((e) => /* @__PURE__ */ V("option", {
855
1019
  value: e,
856
- children: J(e)
1020
+ children: m.status[e]
857
1021
  }, e))
858
1022
  })]
859
1023
  }),
860
- !p.has("priority") && /* @__PURE__ */ V("div", {
1024
+ !h.has("priority") && /* @__PURE__ */ H("div", {
861
1025
  className: "space-y-1",
862
- children: [/* @__PURE__ */ B("label", {
1026
+ children: [/* @__PURE__ */ V("label", {
863
1027
  htmlFor: "pm-priority",
864
- className: X,
865
- children: "Priority"
866
- }), /* @__PURE__ */ B("select", {
1028
+ className: Z,
1029
+ children: m.priorityLabel
1030
+ }), /* @__PURE__ */ V("select", {
867
1031
  id: "pm-priority",
868
- className: q(Y, "capitalize"),
869
- value: w,
870
- onChange: (e) => T(e.target.value),
871
- children: Ee.map((e) => /* @__PURE__ */ B("option", {
1032
+ className: J(X, "capitalize"),
1033
+ value: E,
1034
+ onChange: (e) => D(e.target.value),
1035
+ children: ke.map((e) => /* @__PURE__ */ V("option", {
872
1036
  value: e,
873
- children: J(e)
1037
+ children: m.priority[e]
874
1038
  }, e))
875
1039
  })]
876
1040
  }),
877
- !p.has("assignee") && /* @__PURE__ */ V("div", {
1041
+ !h.has("assignee") && /* @__PURE__ */ H("div", {
878
1042
  className: "space-y-1",
879
- children: [/* @__PURE__ */ B("label", {
1043
+ children: [/* @__PURE__ */ V("label", {
880
1044
  htmlFor: "pm-assignee",
1045
+ className: Z,
1046
+ children: m.assigneeLabel
1047
+ }), t && t.length > 0 ? /* @__PURE__ */ H("select", {
1048
+ id: "pm-assignee",
881
1049
  className: X,
882
- children: "Assignee"
883
- }), /* @__PURE__ */ B("input", {
1050
+ value: O,
1051
+ onChange: (e) => k(e.target.value),
1052
+ children: [/* @__PURE__ */ V("option", {
1053
+ value: "",
1054
+ children: m.unassigned
1055
+ }), t.map((e) => /* @__PURE__ */ V("option", {
1056
+ value: e.id,
1057
+ children: e.name
1058
+ }, e.id))]
1059
+ }) : /* @__PURE__ */ V("input", {
884
1060
  id: "pm-assignee",
885
- className: Y,
886
- value: E,
887
- onChange: (e) => D(e.target.value),
888
- placeholder: "Actor ID (optional)"
1061
+ className: X,
1062
+ value: O,
1063
+ onChange: (e) => k(e.target.value),
1064
+ placeholder: m.assigneePlaceholder
889
1065
  })]
890
1066
  }),
891
- !p.has("dueDate") && /* @__PURE__ */ V("div", {
1067
+ !h.has("dueDate") && /* @__PURE__ */ H("div", {
892
1068
  className: "space-y-1",
893
- children: [/* @__PURE__ */ B("label", {
1069
+ children: [/* @__PURE__ */ V("label", {
894
1070
  htmlFor: "pm-due",
895
- className: X,
896
- children: "Due date"
897
- }), /* @__PURE__ */ B("input", {
1071
+ className: Z,
1072
+ children: m.dueDateLabel
1073
+ }), /* @__PURE__ */ V("input", {
898
1074
  id: "pm-due",
899
1075
  type: "date",
900
- className: Y,
901
- value: O,
902
- onChange: (e) => k(e.target.value)
1076
+ className: X,
1077
+ value: A,
1078
+ onChange: (e) => j(e.target.value)
903
1079
  })]
904
1080
  }),
905
- !p.has("storyPoints") && /* @__PURE__ */ V("div", {
1081
+ !h.has("storyPoints") && /* @__PURE__ */ H("div", {
906
1082
  className: "space-y-1",
907
- children: [/* @__PURE__ */ B("label", {
1083
+ children: [/* @__PURE__ */ V("label", {
908
1084
  htmlFor: "pm-points",
909
- className: X,
910
- children: "Story points"
911
- }), /* @__PURE__ */ B("input", {
1085
+ className: Z,
1086
+ children: m.storyPointsLabel
1087
+ }), /* @__PURE__ */ V("input", {
912
1088
  id: "pm-points",
913
1089
  type: "number",
914
1090
  min: 0,
915
- className: Y,
916
- value: M,
917
- onChange: (e) => N(e.target.value),
1091
+ className: X,
1092
+ value: P,
1093
+ onChange: (e) => F(e.target.value),
918
1094
  placeholder: "0"
919
1095
  })]
920
1096
  })
921
1097
  ]
922
1098
  }),
923
- !p.has("labels") && /* @__PURE__ */ V("div", {
1099
+ !h.has("labels") && /* @__PURE__ */ H("div", {
924
1100
  className: "space-y-1",
925
- children: [/* @__PURE__ */ B("label", {
1101
+ children: [/* @__PURE__ */ V("label", {
926
1102
  htmlFor: "pm-labels",
927
- className: X,
928
- children: "Labels"
929
- }), /* @__PURE__ */ B("input", {
1103
+ className: Z,
1104
+ children: m.labelsLabel
1105
+ }), /* @__PURE__ */ V("input", {
930
1106
  id: "pm-labels",
931
- className: Y,
932
- value: A,
933
- onChange: (e) => j(e.target.value),
934
- placeholder: "comma, separated, labels"
1107
+ className: X,
1108
+ value: M,
1109
+ onChange: (e) => N(e.target.value),
1110
+ placeholder: m.labelsPlaceholder
935
1111
  })]
936
1112
  }),
937
- I && /* @__PURE__ */ V("p", {
1113
+ R && /* @__PURE__ */ H("p", {
938
1114
  className: "text-sm text-destructive",
939
- children: ["Failed to create task: ", I.message]
1115
+ children: [
1116
+ m.failedToCreate,
1117
+ ": ",
1118
+ R.message
1119
+ ]
940
1120
  }),
941
- /* @__PURE__ */ V("div", {
1121
+ /* @__PURE__ */ H("div", {
942
1122
  className: "flex items-center justify-end gap-2",
943
- children: [s && /* @__PURE__ */ B("button", {
1123
+ children: [c && /* @__PURE__ */ V("button", {
944
1124
  type: "button",
945
- onClick: s,
1125
+ onClick: c,
946
1126
  className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
947
- children: "Cancel"
948
- }), /* @__PURE__ */ B("button", {
1127
+ children: m.cancel
1128
+ }), /* @__PURE__ */ V("button", {
949
1129
  type: "submit",
950
- disabled: !L || F,
951
- className: q("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (!L || F) && "cursor-not-allowed opacity-50"),
952
- children: F ? "Creating…" : i
1130
+ disabled: !z || L,
1131
+ className: J("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (!z || L) && "cursor-not-allowed opacity-50"),
1132
+ children: L ? m.creating : a ?? m.create
953
1133
  })]
954
1134
  })
955
1135
  ]
956
1136
  })
957
1137
  })
958
- }) : /* @__PURE__ */ B("div", {
959
- className: q("p-6 text-sm text-destructive", c),
1138
+ }) : /* @__PURE__ */ V("div", {
1139
+ className: J("p-6 text-sm text-destructive", l),
960
1140
  children: "CreateTask: no workspaceId provided (prop or PlanMagnetProvider)."
961
1141
  });
962
1142
  }
963
- var Ye = [
1143
+ var rt = [
964
1144
  "title",
965
1145
  "status",
966
1146
  "priority",
967
1147
  "assignee",
968
1148
  "dueDate",
969
1149
  "storyPoints"
970
- ], Xe = {
1150
+ ], it = {
971
1151
  CRITICAL: 0,
972
1152
  HIGH: 1,
973
1153
  MEDIUM: 2,
974
1154
  LOW: 3,
975
1155
  NONE: 4
976
- }, Ze = {
1156
+ }, at = {
977
1157
  BACKLOG: 0,
978
1158
  TODO: 1,
979
1159
  IN_PROGRESS: 2,
@@ -981,18 +1161,23 @@ var Ye = [
981
1161
  TESTING: 4,
982
1162
  DONE: 5,
983
1163
  CANCELLED: 6
984
- }, Qe = {
985
- key: "Key",
986
- title: "Task",
987
- type: "Type",
988
- status: "Status",
989
- priority: "Priority",
990
- assignee: "Assignee",
991
- dueDate: "Due Date",
992
- storyPoints: "Points",
993
- linkedRecord: "Linked Record",
994
- labels: "Labels"
995
- }, $e = {
1164
+ };
1165
+ function ot(e, t) {
1166
+ switch (e) {
1167
+ case "key": return t.colKey;
1168
+ case "title": return t.colTask;
1169
+ case "type": return t.colType;
1170
+ case "status": return t.colStatus;
1171
+ case "priority": return t.colPriority;
1172
+ case "assignee": return t.colAssignee;
1173
+ case "dueDate": return t.colDueDate;
1174
+ case "storyPoints": return t.colPoints;
1175
+ case "linkedRecord": return t.colLinkedRecord;
1176
+ case "labels": return t.colLabels;
1177
+ default: return e;
1178
+ }
1179
+ }
1180
+ var st = {
996
1181
  title: "title",
997
1182
  type: "type",
998
1183
  status: "status",
@@ -1000,11 +1185,11 @@ var Ye = [
1000
1185
  dueDate: "dueDate",
1001
1186
  storyPoints: "storyPoints"
1002
1187
  };
1003
- function et({ projectId: e, status: t, type: n, priority: r, assigneeId: i, search: a, columns: o = Ye, sortBy: s, sortDir: c = "asc", hideHeader: l, onSelect: u, resolveAssignee: d, linkSourceProduct: f, renderLinkIcon: p, limit: m = 200, className: h, workspaceId: g }) {
1004
- let _ = K(), v = g ?? _?.workspaceId, { linksByItem: y } = Ue(v, f), [S, C] = x({
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({
1005
1190
  by: s ?? null,
1006
1191
  dir: c
1007
- }), T = b(() => {
1192
+ }), E = b(() => {
1008
1193
  let o = {};
1009
1194
  return e && (o.projectId = e), t && (o.status = t), n && (o.type = n), r && (o.priority = r), i && (o.assigneeId = i), a && (o.search = a), o;
1010
1195
  }, [
@@ -1014,21 +1199,21 @@ function et({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1014
1199
  r,
1015
1200
  i,
1016
1201
  a
1017
- ]), { data: E, loading: O, error: k } = G(ce, {
1202
+ ]), { data: O, loading: k, error: A } = G(le, {
1018
1203
  variables: {
1019
1204
  workspaceId: v,
1020
- ...Object.keys(T).length ? { filter: T } : {},
1205
+ ...Object.keys(E).length ? { filter: E } : {},
1021
1206
  pagination: { first: m }
1022
1207
  },
1023
1208
  skip: !v
1024
- }), A = b(() => {
1025
- let e = E?.planmagnetWorkItems?.items ?? [];
1026
- if (!S.by) return e;
1027
- let t = S.dir === "desc" ? -1 : 1, n = S.by;
1028
- return [...e].sort((e, r) => t * nt(e, r, n));
1029
- }, [E, S]), j = (e) => {
1030
- let t = $e[e];
1031
- t && C((e) => e.by === t ? {
1209
+ }), j = b(() => {
1210
+ let e = O?.planmagnetWorkItems?.items ?? [];
1211
+ if (!C.by) return e;
1212
+ let t = C.dir === "desc" ? -1 : 1, n = C.by;
1213
+ return [...e].sort((e, r) => t * ut(e, r, n));
1214
+ }, [O, C]), M = (e) => {
1215
+ let t = st[e];
1216
+ t && T((e) => e.by === t ? {
1032
1217
  by: t,
1033
1218
  dir: e.dir === "asc" ? "desc" : "asc"
1034
1219
  } : {
@@ -1036,143 +1221,148 @@ function et({ projectId: e, status: t, type: n, priority: r, assigneeId: i, sear
1036
1221
  dir: "asc"
1037
1222
  });
1038
1223
  };
1039
- return v ? O && !E ? /* @__PURE__ */ B("div", {
1040
- className: q("flex items-center justify-center p-12", h),
1041
- children: /* @__PURE__ */ B("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1042
- }) : k && !E ? /* @__PURE__ */ V("div", {
1043
- className: q("p-6 text-sm text-destructive", h),
1044
- children: ["Error loading tasks: ", k.message]
1045
- }) : /* @__PURE__ */ V("div", {
1046
- className: q("space-y-3", h),
1047
- children: [!l && /* @__PURE__ */ V("div", {
1224
+ return v ? k && !O ? /* @__PURE__ */ V("div", {
1225
+ className: J("flex items-center justify-center p-12", h),
1226
+ children: /* @__PURE__ */ V("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1227
+ }) : A && !O ? /* @__PURE__ */ H("div", {
1228
+ className: J("p-6 text-sm text-destructive", h),
1229
+ children: [
1230
+ S.errorLoading,
1231
+ ": ",
1232
+ A.message
1233
+ ]
1234
+ }) : /* @__PURE__ */ H("div", {
1235
+ className: J("space-y-3", h),
1236
+ children: [!l && /* @__PURE__ */ H("div", {
1048
1237
  className: "flex items-baseline justify-between",
1049
- children: [/* @__PURE__ */ B("h2", {
1238
+ children: [/* @__PURE__ */ V("h2", {
1050
1239
  className: "text-lg font-semibold text-foreground",
1051
- children: "List"
1052
- }), /* @__PURE__ */ V("span", {
1240
+ children: S.list
1241
+ }), /* @__PURE__ */ H("span", {
1053
1242
  className: "text-sm text-muted-foreground",
1054
1243
  children: [
1055
- A.length,
1244
+ j.length,
1056
1245
  " ",
1057
- A.length === 1 ? "task" : "tasks"
1246
+ j.length === 1 ? S.tasksSingular : S.tasksPlural
1058
1247
  ]
1059
1248
  })]
1060
- }), /* @__PURE__ */ B("div", {
1249
+ }), /* @__PURE__ */ V("div", {
1061
1250
  className: "overflow-x-auto rounded-lg border border-border",
1062
- children: /* @__PURE__ */ V("table", {
1251
+ children: /* @__PURE__ */ H("table", {
1063
1252
  className: "w-full border-collapse text-sm",
1064
- children: [/* @__PURE__ */ B("thead", { children: /* @__PURE__ */ B("tr", {
1253
+ children: [/* @__PURE__ */ V("thead", { children: /* @__PURE__ */ V("tr", {
1065
1254
  className: "border-b border-border bg-muted/50 text-left",
1066
1255
  children: o.map((e) => {
1067
- let t = !!$e[e], n = S.by === $e[e];
1068
- return /* @__PURE__ */ B("th", {
1069
- onClick: t ? () => j(e) : void 0,
1070
- className: q("px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", t && "cursor-pointer select-none hover:text-foreground"),
1071
- children: /* @__PURE__ */ V("span", {
1256
+ let t = !!st[e], n = C.by === st[e];
1257
+ return /* @__PURE__ */ V("th", {
1258
+ onClick: t ? () => M(e) : void 0,
1259
+ 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
+ children: /* @__PURE__ */ H("span", {
1072
1261
  className: "inline-flex items-center gap-1",
1073
- children: [Qe[e], n && (S.dir === "asc" ? /* @__PURE__ */ B(D, {
1262
+ children: [ot(e, S), n && (C.dir === "asc" ? /* @__PURE__ */ V(D, {
1074
1263
  className: "h-3 w-3",
1075
1264
  "aria-hidden": "true"
1076
- }) : /* @__PURE__ */ B(w, {
1265
+ }) : /* @__PURE__ */ V(w, {
1077
1266
  className: "h-3 w-3",
1078
1267
  "aria-hidden": "true"
1079
1268
  }))]
1080
1269
  })
1081
1270
  }, e);
1082
1271
  })
1083
- }) }), /* @__PURE__ */ V("tbody", { children: [A.length === 0 && /* @__PURE__ */ B("tr", { children: /* @__PURE__ */ B("td", {
1272
+ }) }), /* @__PURE__ */ H("tbody", { children: [j.length === 0 && /* @__PURE__ */ V("tr", { children: /* @__PURE__ */ V("td", {
1084
1273
  colSpan: o.length,
1085
1274
  className: "px-3 py-8 text-center text-muted-foreground",
1086
- children: "No tasks found."
1087
- }) }), A.map((e) => /* @__PURE__ */ B("tr", {
1275
+ children: S.noTasksFound
1276
+ }) }), j.map((e) => /* @__PURE__ */ V("tr", {
1088
1277
  onClick: u ? () => u(e.id) : void 0,
1089
- className: q("border-b border-border last:border-0", u && "cursor-pointer hover:bg-muted/40"),
1090
- children: o.map((t) => /* @__PURE__ */ B("td", {
1278
+ className: J("border-b border-border last:border-0", u && "cursor-pointer hover:bg-muted/40"),
1279
+ children: o.map((t) => /* @__PURE__ */ V("td", {
1091
1280
  className: "px-3 py-2 align-middle text-foreground",
1092
- children: tt(t, e, {
1281
+ children: lt(t, e, {
1093
1282
  resolveAssignee: d,
1094
1283
  links: y.get(e.id),
1095
- renderLinkIcon: p
1284
+ renderLinkIcon: p,
1285
+ unassigned: S.unassigned
1096
1286
  })
1097
1287
  }, t))
1098
1288
  }, e.id))] })]
1099
1289
  })
1100
1290
  })]
1101
- }) : /* @__PURE__ */ B("div", {
1102
- className: q("p-6 text-sm text-destructive", h),
1291
+ }) : /* @__PURE__ */ V("div", {
1292
+ className: J("p-6 text-sm text-destructive", h),
1103
1293
  children: "TaskList: no workspaceId provided (prop or PlanMagnetProvider)."
1104
1294
  });
1105
1295
  }
1106
- function tt(e, t, n) {
1107
- let { resolveAssignee: r, links: i, renderLinkIcon: a } = n;
1296
+ function lt(e, t, n) {
1297
+ let { resolveAssignee: r, links: i, renderLinkIcon: a, unassigned: o } = n;
1108
1298
  switch (e) {
1109
- case "key": return /* @__PURE__ */ B("span", {
1299
+ case "key": return /* @__PURE__ */ V("span", {
1110
1300
  className: "font-mono text-xs text-muted-foreground",
1111
1301
  children: t.key
1112
1302
  });
1113
- case "title": return /* @__PURE__ */ V("div", {
1303
+ case "title": return /* @__PURE__ */ H("div", {
1114
1304
  className: "flex flex-col",
1115
- children: [/* @__PURE__ */ B("span", {
1305
+ children: [/* @__PURE__ */ V("span", {
1116
1306
  className: "font-medium text-foreground",
1117
1307
  children: t.title
1118
- }), /* @__PURE__ */ B("span", {
1308
+ }), /* @__PURE__ */ V("span", {
1119
1309
  className: "font-mono text-[10px] uppercase text-muted-foreground",
1120
1310
  children: t.key
1121
1311
  })]
1122
1312
  });
1123
- case "type": return /* @__PURE__ */ B(Le, { type: t.type });
1124
- case "status": return /* @__PURE__ */ B(Me, { status: t.status });
1125
- case "priority": return /* @__PURE__ */ B(Fe, {
1313
+ case "type": return /* @__PURE__ */ V(Ge, { type: t.type });
1314
+ case "status": return /* @__PURE__ */ V(Be, { status: t.status });
1315
+ case "priority": return /* @__PURE__ */ V(Ue, {
1126
1316
  priority: t.priority,
1127
1317
  showLabel: !0
1128
1318
  });
1129
1319
  case "assignee": {
1130
1320
  let e = t.assigneeId ? r?.(t.assigneeId) : null;
1131
- return /* @__PURE__ */ V("span", {
1321
+ return /* @__PURE__ */ H("span", {
1132
1322
  className: "flex items-center gap-1.5",
1133
- children: [/* @__PURE__ */ B(we, {
1323
+ children: [/* @__PURE__ */ V(De, {
1134
1324
  id: t.assigneeId,
1135
1325
  name: e?.name,
1136
1326
  size: "sm"
1137
- }), /* @__PURE__ */ B("span", {
1327
+ }), /* @__PURE__ */ V("span", {
1138
1328
  className: "text-xs text-muted-foreground",
1139
- children: e?.name ?? (t.assigneeId ? "" : "Unassigned")
1329
+ children: e?.name ?? (t.assigneeId ? "" : o)
1140
1330
  })]
1141
1331
  });
1142
1332
  }
1143
1333
  case "dueDate": {
1144
- let e = ge(t.dueDate);
1145
- return e ? /* @__PURE__ */ B("span", {
1146
- className: q("text-xs", _e(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1334
+ let e = ye(t.dueDate);
1335
+ return e ? /* @__PURE__ */ V("span", {
1336
+ className: J("text-xs", be(t.dueDate, t.status) ? "font-medium text-destructive" : "text-muted-foreground"),
1147
1337
  children: e
1148
- }) : /* @__PURE__ */ B("span", {
1338
+ }) : /* @__PURE__ */ V("span", {
1149
1339
  className: "text-muted-foreground",
1150
1340
  children: "—"
1151
1341
  });
1152
1342
  }
1153
- case "storyPoints": return t.storyPoints == null ? /* @__PURE__ */ B("span", {
1343
+ case "storyPoints": return t.storyPoints == null ? /* @__PURE__ */ V("span", {
1154
1344
  className: "text-muted-foreground",
1155
1345
  children: "—"
1156
- }) : /* @__PURE__ */ B("span", {
1346
+ }) : /* @__PURE__ */ V("span", {
1157
1347
  className: "flex h-5 min-w-5 items-center justify-center rounded-full bg-primary/10 px-1 text-[10px] font-semibold text-primary",
1158
1348
  children: t.storyPoints
1159
1349
  });
1160
- case "linkedRecord": return !i || i.length === 0 ? /* @__PURE__ */ B("span", {
1350
+ case "linkedRecord": return !i || i.length === 0 ? /* @__PURE__ */ V("span", {
1161
1351
  className: "text-muted-foreground",
1162
1352
  children: "—"
1163
- }) : /* @__PURE__ */ V("div", {
1353
+ }) : /* @__PURE__ */ H("div", {
1164
1354
  className: "flex flex-wrap gap-1",
1165
- children: [i.slice(0, 2).map((e) => /* @__PURE__ */ B(ke, {
1355
+ children: [i.slice(0, 2).map((e) => /* @__PURE__ */ V(Ne, {
1166
1356
  link: e,
1167
1357
  renderIcon: a
1168
- }, e.id)), i.length > 2 && /* @__PURE__ */ V("span", {
1358
+ }, e.id)), i.length > 2 && /* @__PURE__ */ H("span", {
1169
1359
  className: "text-[10px] text-muted-foreground",
1170
1360
  children: ["+", i.length - 2]
1171
1361
  })]
1172
1362
  });
1173
- case "labels": return /* @__PURE__ */ B("div", {
1363
+ case "labels": return /* @__PURE__ */ V("div", {
1174
1364
  className: "flex flex-wrap gap-1",
1175
- children: (t.labels ?? []).slice(0, 3).map((e) => /* @__PURE__ */ B("span", {
1365
+ children: (t.labels ?? []).slice(0, 3).map((e) => /* @__PURE__ */ V("span", {
1176
1366
  className: "rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground",
1177
1367
  children: e
1178
1368
  }, e))
@@ -1180,10 +1370,10 @@ function tt(e, t, n) {
1180
1370
  default: return null;
1181
1371
  }
1182
1372
  }
1183
- function nt(e, t, n) {
1373
+ function ut(e, t, n) {
1184
1374
  switch (n) {
1185
- case "priority": return Xe[e.priority] - Xe[t.priority];
1186
- case "status": return Ze[e.status] - Ze[t.status];
1375
+ case "priority": return it[e.priority] - it[t.priority];
1376
+ case "status": return at[e.status] - at[t.status];
1187
1377
  case "title": return e.title.localeCompare(t.title);
1188
1378
  case "type": return e.type.localeCompare(t.type);
1189
1379
  case "dueDate": return (e.dueDate ?? "").localeCompare(t.dueDate ?? "");
@@ -1191,35 +1381,63 @@ function nt(e, t, n) {
1191
1381
  default: return 0;
1192
1382
  }
1193
1383
  }
1194
- var rt = { weekStartsOn: 1 };
1195
- function it(e) {
1384
+ function dt(e, t = {}) {
1385
+ let { projectId: n, enabled: r = !0, limit: i = 100 } = t, { data: a, loading: o } = G(he, {
1386
+ variables: {
1387
+ workspaceId: e,
1388
+ ...n ? { filter: { projectId: n } } : {},
1389
+ pagination: { first: i }
1390
+ },
1391
+ skip: !e || !r,
1392
+ errorPolicy: "all"
1393
+ }), s = b(() => a?.planmagnetMilestones?.items ?? [], [a]);
1394
+ return {
1395
+ milestones: s,
1396
+ byDay: b(() => {
1397
+ let e = /* @__PURE__ */ new Map();
1398
+ for (let t of s) {
1399
+ let n = ve(t.dueDate);
1400
+ if (!n) continue;
1401
+ let r = `${n.getFullYear()}-${String(n.getMonth() + 1).padStart(2, "0")}-${String(n.getDate()).padStart(2, "0")}`, i = e.get(r);
1402
+ i ? i.push(t) : e.set(r, [t]);
1403
+ }
1404
+ return e;
1405
+ }, [s]),
1406
+ loading: o
1407
+ };
1408
+ }
1409
+ var ft = { weekStartsOn: 1 };
1410
+ function pt(e) {
1196
1411
  return d(e, "yyyy-MM-dd");
1197
1412
  }
1198
- function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = "", assigneeId: m, defaultMode: h = "week", onSelect: g, resolveAssignee: _, className: v, workspaceId: y }) {
1199
- let S = K(), C = y ?? S?.workspaceId, [w, D] = x(h), [O, k] = x(0), { data: A, loading: j, error: M } = G(ce, {
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, {
1415
+ projectId: e,
1416
+ enabled: v
1417
+ }), [A, j] = x(h), [M, N] = x(0), { data: F, loading: I, error: L } = G(le, {
1200
1418
  variables: {
1201
- workspaceId: C,
1419
+ workspaceId: w,
1202
1420
  ...e ? { filter: { projectId: e } } : {},
1203
1421
  pagination: { first: 200 }
1204
1422
  },
1205
- skip: !C
1206
- }), N = b(() => {
1207
- let e = A?.planmagnetWorkItems?.items ?? [], n = o.trim().toLowerCase();
1423
+ skip: !w
1424
+ }), R = b(() => {
1425
+ let e = F?.planmagnetWorkItems?.items ?? [], n = o.trim().toLowerCase();
1208
1426
  return e.filter((e) => !(t !== "ALL" && e.priority !== t || i !== "ALL" && e.type !== i || m && e.assigneeId !== m || n && ![
1209
1427
  e.title,
1210
1428
  e.key,
1211
1429
  ...e.labels ?? []
1212
1430
  ].join(" ").toLowerCase().includes(n)));
1213
1431
  }, [
1214
- A,
1432
+ F,
1215
1433
  t,
1216
1434
  i,
1217
1435
  o,
1218
1436
  m
1219
- ]), { anchor: P, rangeStart: F, rangeEnd: I, days: L } = b(() => {
1437
+ ]), { anchor: z, rangeStart: ee, rangeEnd: B, days: te } = b(() => {
1220
1438
  let e = /* @__PURE__ */ new Date();
1221
- if (w === "week") {
1222
- let t = a(e, O), n = r(t, rt), i = u(t, rt);
1439
+ if (A === "week") {
1440
+ let t = a(e, M), n = r(t, ft), i = u(t, ft);
1223
1441
  return {
1224
1442
  anchor: t,
1225
1443
  rangeStart: n,
@@ -1230,7 +1448,7 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1230
1448
  })
1231
1449
  };
1232
1450
  }
1233
- let t = n(e, O), i = r(l(t), rt), o = u(s(t), rt);
1451
+ let t = n(e, M), i = r(l(t), ft), o = u(s(t), ft);
1234
1452
  return {
1235
1453
  anchor: t,
1236
1454
  rangeStart: i,
@@ -1240,19 +1458,19 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1240
1458
  end: o
1241
1459
  })
1242
1460
  };
1243
- }, [w, O]), { byDay: R, overdue: z, undated: H } = b(() => {
1461
+ }, [A, M]), { byDay: ne, overdue: U, undated: re } = b(() => {
1244
1462
  let e = /* @__PURE__ */ new Map(), t = [], n = [];
1245
- for (let r of N) {
1246
- let i = he(r.dueDate);
1463
+ for (let r of R) {
1464
+ let i = ve(r.dueDate);
1247
1465
  if (!i) {
1248
1466
  n.push(r);
1249
1467
  continue;
1250
1468
  }
1251
- if (_e(r.dueDate, r.status)) {
1469
+ if (be(r.dueDate, r.status)) {
1252
1470
  t.push(r);
1253
1471
  continue;
1254
1472
  }
1255
- let a = it(i), o = e.get(a);
1473
+ let a = pt(i), o = e.get(a);
1256
1474
  o ? o.push(r) : e.set(a, [r]);
1257
1475
  }
1258
1476
  return {
@@ -1260,73 +1478,77 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1260
1478
  overdue: t,
1261
1479
  undated: n
1262
1480
  };
1263
- }, [N]);
1264
- if (!C) return /* @__PURE__ */ B("div", {
1265
- className: q("p-6 text-sm text-destructive", v),
1481
+ }, [R]);
1482
+ if (!w) return /* @__PURE__ */ V("div", {
1483
+ className: J("p-6 text-sm text-destructive", y),
1266
1484
  children: "Timeline: no workspaceId provided (prop or PlanMagnetProvider)."
1267
1485
  });
1268
- if (j && !A) return /* @__PURE__ */ B("div", {
1269
- className: q("flex items-center justify-center p-12", v),
1270
- children: /* @__PURE__ */ B("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1486
+ if (I && !F) return /* @__PURE__ */ V("div", {
1487
+ className: J("flex items-center justify-center p-12", y),
1488
+ children: /* @__PURE__ */ V("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1271
1489
  });
1272
- if (M && !A) return /* @__PURE__ */ V("div", {
1273
- className: q("p-6 text-sm text-destructive", v),
1274
- children: ["Error loading timeline: ", M.message]
1490
+ if (L && !F) return /* @__PURE__ */ H("div", {
1491
+ className: J("p-6 text-sm text-destructive", y),
1492
+ children: [
1493
+ D.errorLoading,
1494
+ ": ",
1495
+ L.message
1496
+ ]
1275
1497
  });
1276
- let U = w === "week" ? `${d(F, "MMM d")} \u2013 ${d(I, "MMM d")}` : d(P, "MMMM yyyy");
1277
- return /* @__PURE__ */ V("div", {
1278
- className: q("space-y-3", v),
1498
+ let W = A === "week" ? `${d(ee, "MMM d")} \u2013 ${d(B, "MMM d")}` : d(z, "MMMM yyyy");
1499
+ return /* @__PURE__ */ H("div", {
1500
+ className: J("space-y-3", y),
1279
1501
  children: [
1280
- /* @__PURE__ */ V("div", {
1502
+ /* @__PURE__ */ H("div", {
1281
1503
  className: "flex flex-wrap items-center justify-between gap-2",
1282
- children: [/* @__PURE__ */ V("div", {
1504
+ children: [/* @__PURE__ */ H("div", {
1283
1505
  className: "flex items-center gap-1",
1284
1506
  children: [
1285
- /* @__PURE__ */ B("button", {
1507
+ /* @__PURE__ */ V("button", {
1286
1508
  type: "button",
1287
- onClick: () => k((e) => e - 1),
1509
+ onClick: () => N((e) => e - 1),
1288
1510
  "aria-label": "Previous",
1289
1511
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-muted/50",
1290
- children: /* @__PURE__ */ B(T, { className: "h-4 w-4" })
1512
+ children: /* @__PURE__ */ V(T, { className: "h-4 w-4" })
1291
1513
  }),
1292
- /* @__PURE__ */ B("button", {
1514
+ /* @__PURE__ */ V("button", {
1293
1515
  type: "button",
1294
- onClick: () => k(0),
1516
+ onClick: () => N(0),
1295
1517
  className: "h-8 rounded-md border border-border px-3 text-xs font-medium text-foreground hover:bg-muted/50",
1296
- children: "Today"
1518
+ children: D.today
1297
1519
  }),
1298
- /* @__PURE__ */ B("button", {
1520
+ /* @__PURE__ */ V("button", {
1299
1521
  type: "button",
1300
- onClick: () => k((e) => e + 1),
1522
+ onClick: () => N((e) => e + 1),
1301
1523
  "aria-label": "Next",
1302
1524
  className: "flex h-8 w-8 items-center justify-center rounded-md border border-border text-muted-foreground hover:bg-muted/50",
1303
- children: /* @__PURE__ */ B(E, { className: "h-4 w-4" })
1525
+ children: /* @__PURE__ */ V(E, { className: "h-4 w-4" })
1304
1526
  }),
1305
- /* @__PURE__ */ B("span", {
1527
+ /* @__PURE__ */ V("span", {
1306
1528
  className: "ml-2 text-sm font-medium text-foreground",
1307
- children: U
1529
+ children: W
1308
1530
  })
1309
1531
  ]
1310
- }), /* @__PURE__ */ B("div", {
1532
+ }), /* @__PURE__ */ V("div", {
1311
1533
  className: "inline-flex rounded-md border border-border p-0.5",
1312
- children: ["week", "month"].map((e) => /* @__PURE__ */ B("button", {
1534
+ children: ["week", "month"].map((e) => /* @__PURE__ */ V("button", {
1313
1535
  type: "button",
1314
1536
  onClick: () => {
1315
- D(e), k(0);
1537
+ j(e), N(0);
1316
1538
  },
1317
- className: q("rounded px-3 py-1 text-xs font-medium capitalize transition-colors", w === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"),
1318
- children: e
1539
+ className: J("rounded px-3 py-1 text-xs font-medium capitalize transition-colors", A === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:text-foreground"),
1540
+ children: e === "week" ? D.week : D.month
1319
1541
  }, e))
1320
1542
  })]
1321
1543
  }),
1322
- z.length > 0 && /* @__PURE__ */ V("div", {
1544
+ U.length > 0 && /* @__PURE__ */ H("div", {
1323
1545
  className: "rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2",
1324
1546
  children: [/* @__PURE__ */ V("p", {
1325
1547
  className: "mb-1 text-xs font-semibold text-destructive",
1326
- children: [z.length, " overdue"]
1327
- }), /* @__PURE__ */ B("div", {
1548
+ children: D.overdue.replace("{n}", String(U.length))
1549
+ }), /* @__PURE__ */ V("div", {
1328
1550
  className: "flex flex-wrap gap-1.5",
1329
- children: z.map((e) => /* @__PURE__ */ B(ot, {
1551
+ children: U.map((e) => /* @__PURE__ */ V(gt, {
1330
1552
  task: e,
1331
1553
  onSelect: g,
1332
1554
  resolveAssignee: _,
@@ -1334,32 +1556,48 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1334
1556
  }, e.id))
1335
1557
  })]
1336
1558
  }),
1337
- w === "week" ? /* @__PURE__ */ B("div", {
1559
+ O.length > 0 && /* @__PURE__ */ H("div", {
1560
+ className: "rounded-md border border-primary/30 bg-primary/5 px-3 py-2",
1561
+ children: [/* @__PURE__ */ H("p", {
1562
+ className: "mb-1 flex items-center gap-1 text-xs font-semibold text-primary",
1563
+ children: [/* @__PURE__ */ V(P, {
1564
+ className: "h-3.5 w-3.5",
1565
+ "aria-hidden": "true"
1566
+ }), D.milestones]
1567
+ }), /* @__PURE__ */ V("div", {
1568
+ className: "flex flex-wrap gap-1.5",
1569
+ children: O.map((e) => /* @__PURE__ */ V(ht, { milestone: e }, e.id))
1570
+ })]
1571
+ }),
1572
+ A === "week" ? /* @__PURE__ */ V("div", {
1338
1573
  className: "grid grid-cols-7 gap-2",
1339
- children: L.map((e) => {
1340
- let t = R.get(it(e)) ?? [], n = p(e);
1341
- return /* @__PURE__ */ V("div", {
1342
- className: q("flex min-h-32 flex-col rounded-lg border p-2", n ? "border-primary/50 bg-primary/5" : "border-border bg-muted/20"),
1343
- children: [/* @__PURE__ */ V("div", {
1574
+ children: te.map((e) => {
1575
+ let t = ne.get(pt(e)) ?? [], n = k.get(pt(e)) ?? [], r = p(e);
1576
+ return /* @__PURE__ */ H("div", {
1577
+ 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
+ children: [/* @__PURE__ */ H("div", {
1344
1579
  className: "mb-2 flex items-baseline justify-between",
1345
- children: [/* @__PURE__ */ B("span", {
1346
- className: q("text-xs font-semibold uppercase", n ? "text-primary" : "text-muted-foreground"),
1580
+ children: [/* @__PURE__ */ V("span", {
1581
+ className: J("text-xs font-semibold uppercase", r ? "text-primary" : "text-muted-foreground"),
1347
1582
  children: d(e, "EEE")
1348
- }), /* @__PURE__ */ B("span", {
1349
- className: q("text-sm font-semibold", n ? "text-primary" : "text-foreground"),
1583
+ }), /* @__PURE__ */ V("span", {
1584
+ className: J("text-sm font-semibold", r ? "text-primary" : "text-foreground"),
1350
1585
  children: d(e, "d")
1351
1586
  })]
1352
- }), /* @__PURE__ */ B("div", {
1587
+ }), /* @__PURE__ */ H("div", {
1353
1588
  className: "flex flex-col gap-1.5",
1354
- children: t.map((e) => /* @__PURE__ */ B(ot, {
1589
+ children: [n.map((e) => /* @__PURE__ */ V(ht, {
1590
+ milestone: e,
1591
+ compact: !0
1592
+ }, e.id)), t.map((e) => /* @__PURE__ */ V(gt, {
1355
1593
  task: e,
1356
1594
  onSelect: g,
1357
1595
  resolveAssignee: _
1358
- }, e.id))
1596
+ }, e.id))]
1359
1597
  })]
1360
- }, it(e));
1598
+ }, pt(e));
1361
1599
  })
1362
- }) : /* @__PURE__ */ V("div", {
1600
+ }) : /* @__PURE__ */ H("div", {
1363
1601
  className: "grid grid-cols-7 gap-1",
1364
1602
  children: [[
1365
1603
  "Mon",
@@ -1369,48 +1607,45 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1369
1607
  "Fri",
1370
1608
  "Sat",
1371
1609
  "Sun"
1372
- ].map((e) => /* @__PURE__ */ B("div", {
1610
+ ].map((e) => /* @__PURE__ */ V("div", {
1373
1611
  className: "px-1 pb-1 text-center text-[10px] font-semibold uppercase text-muted-foreground",
1374
1612
  children: e
1375
- }, e)), L.map((e) => {
1376
- let t = R.get(it(e)) ?? [], n = p(e), r = f(e, P);
1377
- return /* @__PURE__ */ V("div", {
1378
- className: q("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"),
1613
+ }, e)), te.map((e) => {
1614
+ let t = ne.get(pt(e)) ?? [], n = p(e), r = f(e, z);
1615
+ return /* @__PURE__ */ H("div", {
1616
+ 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"),
1379
1617
  children: [
1380
- /* @__PURE__ */ B("span", {
1381
- className: q("text-[10px] font-semibold", n ? "text-primary" : "text-muted-foreground"),
1618
+ /* @__PURE__ */ V("span", {
1619
+ className: J("text-[10px] font-semibold", n ? "text-primary" : "text-muted-foreground"),
1382
1620
  children: d(e, "d")
1383
1621
  }),
1384
- t.slice(0, 3).map((e) => /* @__PURE__ */ B(ot, {
1622
+ t.slice(0, 3).map((e) => /* @__PURE__ */ V(gt, {
1385
1623
  task: e,
1386
1624
  onSelect: g,
1387
1625
  resolveAssignee: _,
1388
1626
  compact: !0
1389
1627
  }, e.id)),
1390
- t.length > 3 && /* @__PURE__ */ V("span", {
1628
+ t.length > 3 && /* @__PURE__ */ H("span", {
1391
1629
  className: "text-[10px] text-muted-foreground",
1392
1630
  children: [
1393
1631
  "+",
1394
1632
  t.length - 3,
1395
- " more"
1633
+ " ",
1634
+ D.more
1396
1635
  ]
1397
1636
  })
1398
1637
  ]
1399
- }, it(e));
1638
+ }, pt(e));
1400
1639
  })]
1401
1640
  }),
1402
- H.length > 0 && /* @__PURE__ */ V("div", {
1641
+ re.length > 0 && /* @__PURE__ */ H("div", {
1403
1642
  className: "rounded-md border border-border bg-muted/20 px-3 py-2",
1404
1643
  children: [/* @__PURE__ */ V("p", {
1405
1644
  className: "mb-1 text-xs font-semibold text-muted-foreground",
1406
- children: [
1407
- "No due date (",
1408
- H.length,
1409
- ")"
1410
- ]
1411
- }), /* @__PURE__ */ B("div", {
1645
+ children: D.noDueDate.replace("{n}", String(re.length))
1646
+ }), /* @__PURE__ */ V("div", {
1412
1647
  className: "flex flex-wrap gap-1.5",
1413
- children: H.map((e) => /* @__PURE__ */ B(ot, {
1648
+ children: re.map((e) => /* @__PURE__ */ V(gt, {
1414
1649
  task: e,
1415
1650
  onSelect: g,
1416
1651
  resolveAssignee: _
@@ -1420,21 +1655,42 @@ function at({ projectId: e, priority: t = "ALL", type: i = "ALL", search: o = ""
1420
1655
  ]
1421
1656
  });
1422
1657
  }
1423
- function ot({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1658
+ function ht({ milestone: e, compact: t }) {
1659
+ let n = ye(e.dueDate);
1660
+ return /* @__PURE__ */ H("span", {
1661
+ 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
+ title: e.name + (n ? ` \xB7 ${n}` : ""),
1663
+ children: [
1664
+ /* @__PURE__ */ V(P, {
1665
+ className: "h-3 w-3 shrink-0",
1666
+ "aria-hidden": "true"
1667
+ }),
1668
+ /* @__PURE__ */ V("span", {
1669
+ className: "truncate",
1670
+ children: e.name
1671
+ }),
1672
+ !t && n && /* @__PURE__ */ H("span", {
1673
+ className: "shrink-0 text-primary/70",
1674
+ children: ["· ", n]
1675
+ })
1676
+ ]
1677
+ });
1678
+ }
1679
+ function gt({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1424
1680
  let a = e.assigneeId ? n?.(e.assigneeId) : null, o = !!t;
1425
- return /* @__PURE__ */ V("button", {
1681
+ return /* @__PURE__ */ H("button", {
1426
1682
  type: "button",
1427
1683
  disabled: !o,
1428
1684
  onClick: o ? () => t?.(e.id) : void 0,
1429
1685
  title: e.title,
1430
- className: q("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"),
1686
+ 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"),
1431
1687
  children: [
1432
- /* @__PURE__ */ B(Fe, { priority: e.priority }),
1433
- /* @__PURE__ */ B("span", {
1688
+ /* @__PURE__ */ V(Ue, { priority: e.priority }),
1689
+ /* @__PURE__ */ V("span", {
1434
1690
  className: "min-w-0 flex-1 truncate text-[11px] font-medium text-foreground",
1435
1691
  children: e.title
1436
1692
  }),
1437
- !i && /* @__PURE__ */ B(we, {
1693
+ !i && /* @__PURE__ */ V(De, {
1438
1694
  id: e.assigneeId,
1439
1695
  name: a?.name,
1440
1696
  size: "sm"
@@ -1442,140 +1698,155 @@ function ot({ task: e, onSelect: t, resolveAssignee: n, tone: r, compact: i }) {
1442
1698
  ]
1443
1699
  });
1444
1700
  }
1445
- var st = {
1446
- board: {
1447
- label: "Board",
1448
- icon: P
1449
- },
1450
- list: {
1451
- label: "List",
1452
- icon: I
1453
- },
1454
- timeline: {
1455
- label: "Timeline",
1456
- icon: C
1457
- }
1458
- }, ct = "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";
1459
- function lt({ view: e, onViewChange: t, views: n = [
1701
+ var _t = {
1702
+ board: F,
1703
+ list: L,
1704
+ 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 = [
1460
1707
  "board",
1461
1708
  "list",
1462
1709
  "timeline"
1463
- ], search: r, onSearchChange: i, priority: a, onPriorityChange: o, type: s, onTypeChange: c, onNewTask: l, canCreate: u, className: d }) {
1464
- return /* @__PURE__ */ V("div", {
1465
- className: q("flex flex-wrap items-center justify-between gap-3 border-b border-border pb-2", d),
1466
- children: [/* @__PURE__ */ B("div", {
1710
+ ], search: r, onSearchChange: i, priority: a, onPriorityChange: o, type: s, onTypeChange: c, onNewTask: l, canCreate: u, mine: d, onMineChange: f, className: p }) {
1711
+ let m = Y(), h = {
1712
+ board: m.board,
1713
+ list: m.list,
1714
+ timeline: m.timeline
1715
+ };
1716
+ return /* @__PURE__ */ H("div", {
1717
+ className: J("flex flex-wrap items-center justify-between gap-3 border-b border-border pb-2", p),
1718
+ children: [/* @__PURE__ */ V("div", {
1467
1719
  className: "flex items-center gap-1",
1468
1720
  role: "tablist",
1469
1721
  "aria-label": "Task views",
1470
1722
  children: n.map((n) => {
1471
- let r = st[n], i = r.icon, a = n === e;
1472
- return /* @__PURE__ */ V("button", {
1723
+ let r = _t[n], i = n === e;
1724
+ return /* @__PURE__ */ H("button", {
1473
1725
  type: "button",
1474
1726
  role: "tab",
1475
- "aria-selected": a,
1727
+ "aria-selected": i,
1476
1728
  onClick: () => t(n),
1477
- className: q("relative flex items-center gap-1.5 rounded-t-md px-2.5 py-1.5 text-sm font-medium transition-colors", a ? "text-foreground" : "text-muted-foreground hover:text-foreground"),
1729
+ className: J("relative flex items-center gap-1.5 rounded-t-md px-2.5 py-1.5 text-sm font-medium transition-colors", i ? "text-foreground" : "text-muted-foreground hover:text-foreground"),
1478
1730
  children: [
1479
- /* @__PURE__ */ B(i, {
1731
+ /* @__PURE__ */ V(r, {
1480
1732
  className: "h-4 w-4",
1481
1733
  "aria-hidden": "true"
1482
1734
  }),
1483
- r.label,
1484
- a && /* @__PURE__ */ B("span", { className: "absolute inset-x-1 -bottom-[9px] h-0.5 rounded-full bg-primary" })
1735
+ h[n],
1736
+ i && /* @__PURE__ */ V("span", { className: "absolute inset-x-1 -bottom-[9px] h-0.5 rounded-full bg-primary" })
1485
1737
  ]
1486
1738
  }, n);
1487
1739
  })
1488
- }), /* @__PURE__ */ V("div", {
1740
+ }), /* @__PURE__ */ H("div", {
1489
1741
  className: "flex flex-wrap items-center gap-2",
1490
1742
  children: [
1491
- /* @__PURE__ */ V("div", {
1743
+ /* @__PURE__ */ H("div", {
1492
1744
  className: "relative",
1493
- children: [/* @__PURE__ */ B(R, {
1745
+ children: [/* @__PURE__ */ V(z, {
1494
1746
  className: "pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground",
1495
1747
  "aria-hidden": "true"
1496
- }), /* @__PURE__ */ B("input", {
1748
+ }), /* @__PURE__ */ V("input", {
1497
1749
  type: "search",
1498
1750
  value: r,
1499
1751
  onChange: (e) => i(e.target.value),
1500
- placeholder: "Search tasks…",
1501
- "aria-label": "Search tasks",
1752
+ placeholder: m.searchPlaceholder,
1753
+ "aria-label": m.searchPlaceholder,
1502
1754
  className: "h-8 w-40 rounded-md border border-border bg-background pl-7 pr-2 text-xs text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
1503
1755
  })]
1504
1756
  }),
1505
- /* @__PURE__ */ V("select", {
1757
+ f && /* @__PURE__ */ H("button", {
1758
+ type: "button",
1759
+ onClick: () => f(!d),
1760
+ "aria-pressed": d,
1761
+ className: J("flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-xs font-medium transition-colors", d ? "border-primary bg-primary/10 text-primary" : "border-border bg-background text-muted-foreground hover:bg-muted/50 hover:text-foreground"),
1762
+ children: [/* @__PURE__ */ V(B, {
1763
+ className: "h-3.5 w-3.5",
1764
+ "aria-hidden": "true"
1765
+ }), m.myTasks]
1766
+ }),
1767
+ /* @__PURE__ */ H("select", {
1506
1768
  value: a,
1507
1769
  onChange: (e) => o(e.target.value),
1508
- "aria-label": "Filter by priority",
1509
- className: ct,
1510
- children: [/* @__PURE__ */ B("option", {
1770
+ "aria-label": m.priorityLabel,
1771
+ className: vt,
1772
+ children: [/* @__PURE__ */ V("option", {
1511
1773
  value: "ALL",
1512
- children: "All priorities"
1513
- }), Ee.map((e) => /* @__PURE__ */ B("option", {
1774
+ children: m.allPriorities
1775
+ }), ke.map((e) => /* @__PURE__ */ V("option", {
1514
1776
  value: e,
1515
- children: J(e)
1777
+ children: m.priority[e]
1516
1778
  }, e))]
1517
1779
  }),
1518
- /* @__PURE__ */ V("select", {
1780
+ /* @__PURE__ */ H("select", {
1519
1781
  value: s,
1520
1782
  onChange: (e) => c(e.target.value),
1521
- "aria-label": "Filter by type",
1522
- className: ct,
1523
- children: [/* @__PURE__ */ B("option", {
1783
+ "aria-label": m.typeLabel,
1784
+ className: vt,
1785
+ children: [/* @__PURE__ */ V("option", {
1524
1786
  value: "ALL",
1525
- children: "All types"
1526
- }), De.map((e) => /* @__PURE__ */ B("option", {
1787
+ children: m.allTypes
1788
+ }), Ae.map((e) => /* @__PURE__ */ V("option", {
1527
1789
  value: e,
1528
- children: J(e)
1790
+ children: m.type[e]
1529
1791
  }, e))]
1530
1792
  }),
1531
- u && l && /* @__PURE__ */ V("button", {
1793
+ u && l && /* @__PURE__ */ H("button", {
1532
1794
  type: "button",
1533
1795
  onClick: l,
1534
1796
  className: "flex h-8 items-center gap-1.5 rounded-md bg-primary px-3 text-sm font-medium text-primary-foreground transition-colors hover:bg-primary/90",
1535
- children: [/* @__PURE__ */ B(L, {
1797
+ children: [/* @__PURE__ */ V(R, {
1536
1798
  className: "h-4 w-4",
1537
1799
  "aria-hidden": "true"
1538
- }), "New task"]
1800
+ }), m.newTask]
1539
1801
  })
1540
1802
  ]
1541
1803
  })]
1542
1804
  });
1543
1805
  }
1544
- var Z = "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", Q = "text-xs font-medium uppercase tracking-wide text-muted-foreground", ut = {
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 = {
1545
1807
  NONE: "muted",
1546
1808
  LOW: "muted",
1547
1809
  MEDIUM: "secondary",
1548
1810
  HIGH: "accent",
1549
1811
  CRITICAL: "destructive"
1550
1812
  };
1551
- function dt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i, onError: a, className: o }) {
1552
- let s = b(() => new Set(n ?? []), [n]), { data: c, loading: l, error: u } = G(le, {
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 = re(), d = Y(), f = b(() => new Set(n ?? []), [n]), { data: p, loading: m, error: h } = G(ue, {
1553
1815
  variables: { id: e },
1554
1816
  skip: !e
1555
- }), d = c?.planmagnetWorkItem ?? null, [f, p] = x(!1), [m, h] = x(""), [g, _] = x(""), [v, S] = x("TASK"), [C, w] = x("BACKLOG"), [T, E] = x("NONE"), [D, O] = x(""), [k, A] = x(""), [j, M] = x(""), [N, P] = x("");
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(""), [B, U] = x("");
1556
1818
  y(() => {
1557
- d && (h(d.title), _(d.description ?? ""), S(d.type), w(d.status), E(d.priority), O(d.assigneeId ?? ""), A(d.dueDate ? String(d.dueDate).slice(0, 10) : ""), M((d.labels ?? []).join(", ")), P(d.storyPoints == null ? "" : String(d.storyPoints)));
1558
- }, [d]);
1559
- let [F, { loading: I, error: L }] = te(de), R = async (e) => {
1560
- if (e.preventDefault(), !d) return;
1561
- let t = j.split(",").map((e) => e.trim()).filter(Boolean), n = N.trim() ? Number(N) : void 0, r = {
1562
- title: m.trim(),
1563
- ...s.has("description") ? {} : { description: g.trim() },
1564
- ...s.has("type") ? {} : { type: v },
1565
- ...s.has("status") ? {} : { status: C },
1566
- ...s.has("priority") ? {} : { priority: T },
1567
- ...s.has("assignee") ? {} : { assigneeId: D.trim() },
1568
- ...s.has("dueDate") ? {} : { dueDate: k || void 0 },
1569
- ...s.has("labels") ? {} : { labels: t },
1570
- ...s.has("storyPoints") || n == null || Number.isNaN(n) ? {} : { storyPoints: n }
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(", ")), U(g.storyPoints == null ? "" : String(g.storyPoints)));
1820
+ }, [g]);
1821
+ let [ie, { loading: oe, error: K }] = W(fe), [se, { loading: q, error: ce }] = W(ge), de = async () => {
1822
+ if (g) try {
1823
+ await se({ variables: { id: g.id } }), u.cache.evict({ id: u.cache.identify({
1824
+ __typename: "WorkItem",
1825
+ id: g.id
1826
+ }) }), u.cache.gc(), u.refetchQueries({ include: [le] }).catch(() => {}), a?.(g.id);
1827
+ } catch (e) {
1828
+ o?.(e instanceof Error ? e : Error(String(e)));
1829
+ }
1830
+ }, pe = async (e) => {
1831
+ if (e.preventDefault(), !g) return;
1832
+ let t = R.split(",").map((e) => e.trim()).filter(Boolean), n = B.trim() ? Number(B) : 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 }
1571
1842
  };
1572
1843
  try {
1573
- let e = (await F({ variables: {
1574
- id: d.id,
1844
+ let e = (await ie({ variables: {
1845
+ id: g.id,
1575
1846
  input: r
1576
1847
  } })).data?.planmagnetUpdateWorkItem;
1577
1848
  if (e) {
1578
- let t = re();
1849
+ let t = ae();
1579
1850
  try {
1580
1851
  await t.onTaskSaved?.({
1581
1852
  id: e.id,
@@ -1585,327 +1856,405 @@ function dt({ id: e, readonly: t, hiddenFields: n, hideHeader: r, onUpdated: i,
1585
1856
  operation: "updated"
1586
1857
  });
1587
1858
  } catch {}
1588
- i?.(e), p(!1);
1859
+ i?.(e), v(!1);
1589
1860
  }
1590
1861
  } catch (e) {
1591
- a?.(e instanceof Error ? e : Error(String(e)));
1862
+ o?.(e instanceof Error ? e : Error(String(e)));
1592
1863
  }
1593
1864
  };
1594
- if (!e) return /* @__PURE__ */ B("div", {
1595
- className: q("p-6 text-sm text-destructive", o),
1865
+ if (!e) return /* @__PURE__ */ V("div", {
1866
+ className: J("p-6 text-sm text-destructive", l),
1596
1867
  children: "TaskDetail: no work-item id provided."
1597
1868
  });
1598
- if (l && !c) return /* @__PURE__ */ B("div", {
1599
- className: q("flex items-center justify-center p-12", o),
1600
- children: /* @__PURE__ */ B("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1869
+ if (m && !p) return /* @__PURE__ */ V("div", {
1870
+ className: J("flex items-center justify-center p-12", l),
1871
+ children: /* @__PURE__ */ V("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent" })
1601
1872
  });
1602
- if (u && !c) return /* @__PURE__ */ V("div", {
1603
- className: q("p-6 text-sm text-destructive", o),
1604
- children: ["Error loading task: ", u.message]
1873
+ if (h && !p) return /* @__PURE__ */ H("div", {
1874
+ className: J("p-6 text-sm text-destructive", l),
1875
+ children: [
1876
+ d.errorLoading,
1877
+ ": ",
1878
+ h.message
1879
+ ]
1605
1880
  });
1606
- if (!d) return /* @__PURE__ */ B("div", {
1607
- className: q("p-6 text-sm text-muted-foreground", o),
1608
- children: "Task not found."
1881
+ if (!g) return /* @__PURE__ */ V("div", {
1882
+ className: J("p-6 text-sm text-muted-foreground", l),
1883
+ children: d.taskNotFound
1609
1884
  });
1610
- let z = !t;
1611
- return /* @__PURE__ */ B(H, {
1612
- className: q("shadow-sm", o),
1613
- children: /* @__PURE__ */ V(U, {
1885
+ let me = !t;
1886
+ return /* @__PURE__ */ V(te, {
1887
+ className: J("shadow-sm", l),
1888
+ children: /* @__PURE__ */ H(ne, {
1614
1889
  className: "space-y-4 p-6",
1615
- children: [!r && /* @__PURE__ */ V("div", {
1616
- className: "flex items-start justify-between gap-4",
1617
- children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
1618
- className: "text-xs text-muted-foreground",
1619
- children: d.key
1620
- }), /* @__PURE__ */ B("h2", {
1621
- className: "text-xl font-semibold text-foreground",
1622
- children: d.title
1623
- })] }), z && !f && /* @__PURE__ */ B("button", {
1624
- type: "button",
1625
- onClick: () => p(!0),
1626
- className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground",
1627
- children: "Edit"
1628
- })]
1629
- }), f ? /* @__PURE__ */ V("form", {
1630
- onSubmit: R,
1631
- className: "space-y-4",
1632
- children: [
1633
- /* @__PURE__ */ V("div", {
1634
- className: "space-y-1",
1635
- children: [/* @__PURE__ */ B("label", {
1636
- htmlFor: "pm-detail-title",
1637
- className: Q,
1638
- children: "Title"
1639
- }), /* @__PURE__ */ B("input", {
1640
- id: "pm-detail-title",
1641
- className: Z,
1642
- value: m,
1643
- onChange: (e) => h(e.target.value),
1644
- required: !0
1645
- })]
1646
- }),
1647
- !s.has("description") && /* @__PURE__ */ V("div", {
1648
- className: "space-y-1",
1649
- children: [/* @__PURE__ */ B("label", {
1650
- htmlFor: "pm-detail-desc",
1651
- className: Q,
1652
- children: "Description"
1653
- }), /* @__PURE__ */ B("textarea", {
1654
- id: "pm-detail-desc",
1655
- className: q(Z, "min-h-[80px]"),
1656
- value: g,
1657
- onChange: (e) => _(e.target.value)
1658
- })]
1659
- }),
1660
- /* @__PURE__ */ V("div", {
1661
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1662
- children: [
1663
- !s.has("type") && /* @__PURE__ */ V("div", {
1664
- className: "space-y-1",
1665
- children: [/* @__PURE__ */ B("label", {
1666
- htmlFor: "pm-detail-type",
1667
- className: Q,
1668
- children: "Type"
1669
- }), /* @__PURE__ */ B("select", {
1670
- id: "pm-detail-type",
1671
- className: q(Z, "capitalize"),
1672
- value: v,
1673
- onChange: (e) => S(e.target.value),
1674
- children: De.map((e) => /* @__PURE__ */ B("option", {
1675
- value: e,
1676
- children: J(e)
1677
- }, e))
1678
- })]
1679
- }),
1680
- !s.has("status") && /* @__PURE__ */ V("div", {
1681
- className: "space-y-1",
1682
- children: [/* @__PURE__ */ B("label", {
1683
- htmlFor: "pm-detail-status",
1684
- className: Q,
1685
- children: "Status"
1686
- }), /* @__PURE__ */ B("select", {
1687
- id: "pm-detail-status",
1688
- className: q(Z, "capitalize"),
1689
- value: C,
1690
- onChange: (e) => w(e.target.value),
1691
- children: Oe.map((e) => /* @__PURE__ */ B("option", {
1692
- value: e,
1693
- children: J(e)
1694
- }, e))
1695
- })]
1696
- }),
1697
- !s.has("priority") && /* @__PURE__ */ V("div", {
1698
- className: "space-y-1",
1699
- children: [/* @__PURE__ */ B("label", {
1700
- htmlFor: "pm-detail-priority",
1701
- className: Q,
1702
- children: "Priority"
1703
- }), /* @__PURE__ */ B("select", {
1704
- id: "pm-detail-priority",
1705
- className: q(Z, "capitalize"),
1706
- value: T,
1707
- onChange: (e) => E(e.target.value),
1708
- children: Ee.map((e) => /* @__PURE__ */ B("option", {
1709
- value: e,
1710
- children: J(e)
1711
- }, e))
1712
- })]
1713
- }),
1714
- !s.has("assignee") && /* @__PURE__ */ V("div", {
1715
- className: "space-y-1",
1716
- children: [/* @__PURE__ */ B("label", {
1717
- htmlFor: "pm-detail-assignee",
1718
- className: Q,
1719
- children: "Assignee"
1720
- }), /* @__PURE__ */ B("input", {
1721
- id: "pm-detail-assignee",
1722
- className: Z,
1723
- value: D,
1724
- onChange: (e) => O(e.target.value),
1725
- placeholder: "Actor ID"
1726
- })]
1727
- }),
1728
- !s.has("dueDate") && /* @__PURE__ */ V("div", {
1729
- className: "space-y-1",
1730
- children: [/* @__PURE__ */ B("label", {
1731
- htmlFor: "pm-detail-due",
1732
- className: Q,
1733
- children: "Due date"
1734
- }), /* @__PURE__ */ B("input", {
1735
- id: "pm-detail-due",
1736
- type: "date",
1737
- className: Z,
1738
- value: k,
1739
- onChange: (e) => A(e.target.value)
1740
- })]
1741
- }),
1742
- !s.has("storyPoints") && /* @__PURE__ */ V("div", {
1743
- className: "space-y-1",
1744
- children: [/* @__PURE__ */ B("label", {
1745
- htmlFor: "pm-detail-points",
1746
- className: Q,
1747
- children: "Story points"
1748
- }), /* @__PURE__ */ B("input", {
1749
- id: "pm-detail-points",
1750
- type: "number",
1751
- min: 0,
1752
- className: Z,
1753
- value: N,
1754
- onChange: (e) => P(e.target.value)
1755
- })]
1756
- })
1757
- ]
1758
- }),
1759
- !s.has("labels") && /* @__PURE__ */ V("div", {
1760
- className: "space-y-1",
1761
- children: [/* @__PURE__ */ B("label", {
1762
- htmlFor: "pm-detail-labels",
1763
- className: Q,
1764
- children: "Labels"
1765
- }), /* @__PURE__ */ B("input", {
1766
- id: "pm-detail-labels",
1767
- className: Z,
1768
- value: j,
1769
- onChange: (e) => M(e.target.value),
1770
- placeholder: "comma, separated, labels"
1771
- })]
1772
- }),
1773
- L && /* @__PURE__ */ V("p", {
1774
- className: "text-sm text-destructive",
1775
- children: ["Failed to save: ", L.message]
1776
- }),
1777
- /* @__PURE__ */ V("div", {
1778
- className: "flex items-center justify-end gap-2",
1779
- children: [/* @__PURE__ */ B("button", {
1890
+ children: [
1891
+ !r && /* @__PURE__ */ H("div", {
1892
+ className: "flex items-start justify-between gap-4",
1893
+ children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("p", {
1894
+ className: "text-xs text-muted-foreground",
1895
+ children: g.key
1896
+ }), /* @__PURE__ */ V("h2", {
1897
+ className: "text-xl font-semibold text-foreground",
1898
+ children: g.title
1899
+ })] }), me && !_ && /* @__PURE__ */ H("div", {
1900
+ className: "flex shrink-0 items-center gap-2",
1901
+ children: [a && (S ? /* @__PURE__ */ H("span", {
1902
+ className: "flex items-center gap-1 text-xs",
1903
+ children: [
1904
+ /* @__PURE__ */ V("span", {
1905
+ className: "text-muted-foreground",
1906
+ children: d.deletePrompt
1907
+ }),
1908
+ /* @__PURE__ */ V("button", {
1909
+ type: "button",
1910
+ disabled: q,
1911
+ onClick: de,
1912
+ className: "rounded bg-destructive px-2 py-1 font-medium text-destructive-foreground disabled:opacity-50",
1913
+ children: q ? "…" : d.yes
1914
+ }),
1915
+ /* @__PURE__ */ V("button", {
1916
+ type: "button",
1917
+ onClick: () => C(!1),
1918
+ className: "rounded bg-muted px-2 py-1 text-muted-foreground",
1919
+ children: d.no
1920
+ })
1921
+ ]
1922
+ }) : /* @__PURE__ */ V("button", {
1780
1923
  type: "button",
1781
- onClick: () => p(!1),
1782
- className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
1783
- children: "Cancel"
1784
- }), /* @__PURE__ */ B("button", {
1785
- type: "submit",
1786
- disabled: I || !m.trim(),
1787
- className: q("rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground", (I || !m.trim()) && "cursor-not-allowed opacity-50"),
1788
- children: I ? "Saving…" : "Save changes"
1924
+ onClick: () => C(!0),
1925
+ title: d.del,
1926
+ "aria-label": d.del,
1927
+ className: "rounded-md p-1.5 text-destructive hover:bg-destructive/10",
1928
+ children: /* @__PURE__ */ V(ee, { className: "h-4 w-4" })
1929
+ })), /* @__PURE__ */ V("button", {
1930
+ type: "button",
1931
+ onClick: () => v(!0),
1932
+ className: "rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground",
1933
+ children: d.edit
1789
1934
  })]
1790
- })
1791
- ]
1792
- }) : /* @__PURE__ */ V("dl", {
1793
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1794
- children: [
1795
- !s.has("type") && /* @__PURE__ */ B($, {
1796
- label: "Type",
1797
- children: /* @__PURE__ */ B(ye, {
1798
- variant: "secondary",
1799
- children: J(d.type)
1800
- })
1801
- }),
1802
- !s.has("status") && /* @__PURE__ */ B($, {
1803
- label: "Status",
1804
- children: /* @__PURE__ */ B("span", {
1805
- className: "capitalize text-foreground",
1806
- children: J(d.status)
1807
- })
1808
- }),
1809
- !s.has("priority") && /* @__PURE__ */ B($, {
1810
- label: "Priority",
1811
- children: /* @__PURE__ */ B(ye, {
1812
- variant: ut[d.priority],
1813
- children: J(d.priority)
1814
- })
1815
- }),
1816
- !s.has("assignee") && /* @__PURE__ */ B($, {
1817
- label: "Assignee",
1818
- children: /* @__PURE__ */ B("span", {
1819
- className: "text-foreground",
1820
- children: d.assigneeId ?? "Unassigned"
1821
- })
1822
- }),
1823
- !s.has("dueDate") && /* @__PURE__ */ B($, {
1824
- label: "Due date",
1825
- children: /* @__PURE__ */ B("span", {
1826
- className: "text-foreground",
1827
- children: d.dueDate ?? "—"
1935
+ })]
1936
+ }),
1937
+ ce && /* @__PURE__ */ H("p", {
1938
+ className: "text-sm text-destructive",
1939
+ children: [
1940
+ d.failedToDelete,
1941
+ ": ",
1942
+ ce.message
1943
+ ]
1944
+ }),
1945
+ _ ? /* @__PURE__ */ H("form", {
1946
+ onSubmit: pe,
1947
+ className: "space-y-4",
1948
+ children: [
1949
+ /* @__PURE__ */ H("div", {
1950
+ className: "space-y-1",
1951
+ children: [/* @__PURE__ */ V("label", {
1952
+ htmlFor: "pm-detail-title",
1953
+ className: $,
1954
+ children: d.title
1955
+ }), /* @__PURE__ */ V("input", {
1956
+ id: "pm-detail-title",
1957
+ className: Q,
1958
+ value: w,
1959
+ onChange: (e) => T(e.target.value),
1960
+ required: !0
1961
+ })]
1962
+ }),
1963
+ !f.has("description") && /* @__PURE__ */ H("div", {
1964
+ className: "space-y-1",
1965
+ children: [/* @__PURE__ */ V("label", {
1966
+ htmlFor: "pm-detail-desc",
1967
+ className: $,
1968
+ children: d.description
1969
+ }), /* @__PURE__ */ V("textarea", {
1970
+ id: "pm-detail-desc",
1971
+ className: J(Q, "min-h-[80px]"),
1972
+ value: E,
1973
+ onChange: (e) => D(e.target.value)
1974
+ })]
1975
+ }),
1976
+ /* @__PURE__ */ H("div", {
1977
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
1978
+ children: [
1979
+ !f.has("type") && /* @__PURE__ */ H("div", {
1980
+ className: "space-y-1",
1981
+ children: [/* @__PURE__ */ V("label", {
1982
+ htmlFor: "pm-detail-type",
1983
+ className: $,
1984
+ children: d.typeLabel
1985
+ }), /* @__PURE__ */ V("select", {
1986
+ id: "pm-detail-type",
1987
+ className: J(Q, "capitalize"),
1988
+ value: O,
1989
+ onChange: (e) => k(e.target.value),
1990
+ children: Ae.map((e) => /* @__PURE__ */ V("option", {
1991
+ value: e,
1992
+ children: d.type[e]
1993
+ }, e))
1994
+ })]
1995
+ }),
1996
+ !f.has("status") && /* @__PURE__ */ H("div", {
1997
+ className: "space-y-1",
1998
+ children: [/* @__PURE__ */ V("label", {
1999
+ htmlFor: "pm-detail-status",
2000
+ className: $,
2001
+ children: d.statusLabel
2002
+ }), /* @__PURE__ */ V("select", {
2003
+ id: "pm-detail-status",
2004
+ className: J(Q, "capitalize"),
2005
+ value: A,
2006
+ onChange: (e) => j(e.target.value),
2007
+ children: je.map((e) => /* @__PURE__ */ V("option", {
2008
+ value: e,
2009
+ children: d.status[e]
2010
+ }, e))
2011
+ })]
2012
+ }),
2013
+ !f.has("priority") && /* @__PURE__ */ H("div", {
2014
+ className: "space-y-1",
2015
+ children: [/* @__PURE__ */ V("label", {
2016
+ htmlFor: "pm-detail-priority",
2017
+ className: $,
2018
+ children: d.priorityLabel
2019
+ }), /* @__PURE__ */ V("select", {
2020
+ id: "pm-detail-priority",
2021
+ className: J(Q, "capitalize"),
2022
+ value: M,
2023
+ onChange: (e) => N(e.target.value),
2024
+ children: ke.map((e) => /* @__PURE__ */ V("option", {
2025
+ value: e,
2026
+ children: d.priority[e]
2027
+ }, e))
2028
+ })]
2029
+ }),
2030
+ !f.has("assignee") && /* @__PURE__ */ H("div", {
2031
+ className: "space-y-1",
2032
+ children: [/* @__PURE__ */ V("label", {
2033
+ htmlFor: "pm-detail-assignee",
2034
+ className: $,
2035
+ children: d.assigneeLabel
2036
+ }), c && c.length > 0 ? /* @__PURE__ */ H("select", {
2037
+ id: "pm-detail-assignee",
2038
+ className: Q,
2039
+ value: P,
2040
+ onChange: (e) => F(e.target.value),
2041
+ children: [/* @__PURE__ */ V("option", {
2042
+ value: "",
2043
+ children: d.unassigned
2044
+ }), c.map((e) => /* @__PURE__ */ V("option", {
2045
+ value: e.id,
2046
+ children: e.name
2047
+ }, e.id))]
2048
+ }) : /* @__PURE__ */ V("input", {
2049
+ id: "pm-detail-assignee",
2050
+ className: Q,
2051
+ value: P,
2052
+ onChange: (e) => F(e.target.value),
2053
+ placeholder: d.assigneePlaceholder
2054
+ })]
2055
+ }),
2056
+ !f.has("dueDate") && /* @__PURE__ */ H("div", {
2057
+ className: "space-y-1",
2058
+ children: [/* @__PURE__ */ V("label", {
2059
+ htmlFor: "pm-detail-due",
2060
+ className: $,
2061
+ children: d.dueDateLabel
2062
+ }), /* @__PURE__ */ V("input", {
2063
+ id: "pm-detail-due",
2064
+ type: "date",
2065
+ className: Q,
2066
+ value: I,
2067
+ onChange: (e) => L(e.target.value)
2068
+ })]
2069
+ }),
2070
+ !f.has("storyPoints") && /* @__PURE__ */ H("div", {
2071
+ className: "space-y-1",
2072
+ children: [/* @__PURE__ */ V("label", {
2073
+ htmlFor: "pm-detail-points",
2074
+ className: $,
2075
+ children: d.storyPointsLabel
2076
+ }), /* @__PURE__ */ V("input", {
2077
+ id: "pm-detail-points",
2078
+ type: "number",
2079
+ min: 0,
2080
+ className: Q,
2081
+ value: B,
2082
+ onChange: (e) => U(e.target.value)
2083
+ })]
2084
+ })
2085
+ ]
2086
+ }),
2087
+ !f.has("labels") && /* @__PURE__ */ H("div", {
2088
+ className: "space-y-1",
2089
+ children: [/* @__PURE__ */ V("label", {
2090
+ htmlFor: "pm-detail-labels",
2091
+ className: $,
2092
+ children: d.labelsLabel
2093
+ }), /* @__PURE__ */ V("input", {
2094
+ id: "pm-detail-labels",
2095
+ className: Q,
2096
+ value: R,
2097
+ onChange: (e) => z(e.target.value),
2098
+ placeholder: d.labelsPlaceholder
2099
+ })]
2100
+ }),
2101
+ K && /* @__PURE__ */ H("p", {
2102
+ className: "text-sm text-destructive",
2103
+ children: [
2104
+ d.failedToSave,
2105
+ ": ",
2106
+ K.message
2107
+ ]
2108
+ }),
2109
+ /* @__PURE__ */ H("div", {
2110
+ className: "flex items-center justify-end gap-2",
2111
+ children: [/* @__PURE__ */ V("button", {
2112
+ type: "button",
2113
+ onClick: () => v(!1),
2114
+ className: "rounded-md bg-muted px-4 py-2 text-sm font-medium text-muted-foreground hover:bg-muted/70",
2115
+ children: d.cancel
2116
+ }), /* @__PURE__ */ V("button", {
2117
+ 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
2121
+ })]
1828
2122
  })
1829
- }),
1830
- !s.has("storyPoints") && /* @__PURE__ */ B($, {
1831
- label: "Story points",
1832
- children: /* @__PURE__ */ B("span", {
1833
- className: "text-foreground",
1834
- children: d.storyPoints ?? 0
2123
+ ]
2124
+ }) : /* @__PURE__ */ H("dl", {
2125
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
2126
+ children: [
2127
+ !f.has("type") && /* @__PURE__ */ V(St, {
2128
+ label: d.typeLabel,
2129
+ children: /* @__PURE__ */ V(Se, {
2130
+ variant: "secondary",
2131
+ children: d.type[g.type]
2132
+ })
2133
+ }),
2134
+ !f.has("status") && /* @__PURE__ */ V(St, {
2135
+ label: d.statusLabel,
2136
+ children: /* @__PURE__ */ V("span", {
2137
+ className: "capitalize text-foreground",
2138
+ children: d.status[g.status]
2139
+ })
2140
+ }),
2141
+ !f.has("priority") && /* @__PURE__ */ V(St, {
2142
+ label: d.priorityLabel,
2143
+ children: /* @__PURE__ */ V(Se, {
2144
+ variant: bt[g.priority],
2145
+ children: d.priority[g.priority]
2146
+ })
2147
+ }),
2148
+ !f.has("assignee") && /* @__PURE__ */ V(St, {
2149
+ label: d.assigneeLabel,
2150
+ children: g.assigneeId ? /* @__PURE__ */ H("span", {
2151
+ className: "flex items-center gap-1.5",
2152
+ children: [/* @__PURE__ */ V(De, {
2153
+ id: g.assigneeId,
2154
+ name: s?.(g.assigneeId)?.name,
2155
+ size: "sm"
2156
+ }), /* @__PURE__ */ V("span", {
2157
+ className: "text-foreground",
2158
+ children: s?.(g.assigneeId)?.name ?? d.assigned
2159
+ })]
2160
+ }) : /* @__PURE__ */ V("span", {
2161
+ className: "text-muted-foreground",
2162
+ children: d.unassigned
2163
+ })
2164
+ }),
2165
+ !f.has("dueDate") && /* @__PURE__ */ V(St, {
2166
+ label: d.dueDateLabel,
2167
+ children: /* @__PURE__ */ V("span", {
2168
+ className: "text-foreground",
2169
+ children: g.dueDate ?? "—"
2170
+ })
2171
+ }),
2172
+ !f.has("storyPoints") && /* @__PURE__ */ V(St, {
2173
+ label: d.storyPointsLabel,
2174
+ children: /* @__PURE__ */ V("span", {
2175
+ className: "text-foreground",
2176
+ children: g.storyPoints ?? 0
2177
+ })
2178
+ }),
2179
+ !f.has("description") && /* @__PURE__ */ H("div", {
2180
+ className: "sm:col-span-2",
2181
+ children: [/* @__PURE__ */ V("dt", {
2182
+ className: $,
2183
+ children: d.description
2184
+ }), /* @__PURE__ */ V("dd", {
2185
+ className: "mt-1 whitespace-pre-wrap text-sm text-foreground",
2186
+ children: g.description || "—"
2187
+ })]
2188
+ }),
2189
+ !f.has("labels") && /* @__PURE__ */ H("div", {
2190
+ className: "sm:col-span-2",
2191
+ children: [/* @__PURE__ */ V("dt", {
2192
+ className: $,
2193
+ children: d.labelsLabel
2194
+ }), /* @__PURE__ */ V("dd", {
2195
+ className: "mt-1 flex flex-wrap gap-1",
2196
+ children: (g.labels ?? []).length === 0 ? /* @__PURE__ */ V("span", {
2197
+ className: "text-sm text-muted-foreground",
2198
+ children: "—"
2199
+ }) : g.labels.map((e) => /* @__PURE__ */ V("span", {
2200
+ className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
2201
+ children: e
2202
+ }, e))
2203
+ })]
1835
2204
  })
1836
- }),
1837
- !s.has("description") && /* @__PURE__ */ V("div", {
1838
- className: "sm:col-span-2",
1839
- children: [/* @__PURE__ */ B("dt", {
1840
- className: Q,
1841
- children: "Description"
1842
- }), /* @__PURE__ */ B("dd", {
1843
- className: "mt-1 whitespace-pre-wrap text-sm text-foreground",
1844
- children: d.description || "—"
1845
- })]
1846
- }),
1847
- !s.has("labels") && /* @__PURE__ */ V("div", {
1848
- className: "sm:col-span-2",
1849
- children: [/* @__PURE__ */ B("dt", {
1850
- className: Q,
1851
- children: "Labels"
1852
- }), /* @__PURE__ */ B("dd", {
1853
- className: "mt-1 flex flex-wrap gap-1",
1854
- children: (d.labels ?? []).length === 0 ? /* @__PURE__ */ B("span", {
1855
- className: "text-sm text-muted-foreground",
1856
- children: "—"
1857
- }) : d.labels.map((e) => /* @__PURE__ */ B("span", {
1858
- className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
1859
- children: e
1860
- }, e))
1861
- })]
1862
- })
1863
- ]
1864
- })]
2205
+ ]
2206
+ })
2207
+ ]
1865
2208
  })
1866
2209
  });
1867
2210
  }
1868
- function $({ label: e, children: t }) {
1869
- return /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("dt", {
1870
- className: Q,
2211
+ function St({ label: e, children: t }) {
2212
+ return /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("dt", {
2213
+ className: $,
1871
2214
  children: e
1872
- }), /* @__PURE__ */ B("dd", {
2215
+ }), /* @__PURE__ */ V("dd", {
1873
2216
  className: "mt-1 text-sm",
1874
2217
  children: t
1875
2218
  })] });
1876
2219
  }
1877
- function ft({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, readonly: i, hiddenFields: a, views: o, defaultView: s = "board", resolveAssignee: c, linkSourceProduct: l, renderLinkIcon: u, header: d, onTaskSaved: f, createSurface: p = "modal", detailSurface: m = "drawer", className: h }) {
1878
- let g = K(), v = e ?? g?.workspaceId, y = ee(), [b, S] = x(s), [C, w] = x(""), [T, E] = x("ALL"), [D, O] = x("ALL"), [k, A] = x(!1), [j, M] = x(null), N = _(() => {
1879
- y.refetchQueries({ include: [ce] }).catch(() => {});
1880
- }, [y]), P = _((e) => {
1881
- N(), A(!1), f?.({
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, header: m, onTaskSaved: h, createSurface: g = "modal", detailSurface: v = "drawer", className: y }) {
2221
+ let b = K(), S = e ?? b?.workspaceId, C = re(), w = Le(p), [T, E] = x(s), [D, O] = x(""), [k, A] = x("ALL"), [j, M] = x("ALL"), [N, P] = x(!1), [F, I] = x(!1), [L, R] = x(null), z = _(() => {
2222
+ C.refetchQueries({ include: [le] }).catch(() => {});
2223
+ }, [C]), ee = _((e) => {
2224
+ z(), I(!1), h?.({
1882
2225
  workItem: e,
1883
2226
  operation: "created"
1884
2227
  });
1885
- }, [N, f]), F = _((e) => {
1886
- N(), f?.({
2228
+ }, [z, h]), B = _((e) => {
2229
+ z(), h?.({
1887
2230
  workItem: e,
1888
2231
  operation: "updated"
1889
2232
  });
1890
- }, [N, f]), I = _((e) => {
1891
- M(e.id);
1892
- }, []), L = _((e) => M(e), []);
1893
- if (!v) return /* @__PURE__ */ B("div", {
1894
- className: q("p-6 text-sm text-destructive", h),
2233
+ }, [z, h]), te = _(() => {
2234
+ R(null);
2235
+ }, []), ne = _((e) => {
2236
+ R(e.id);
2237
+ }, []), U = _((e) => R(e), []);
2238
+ if (!S) return /* @__PURE__ */ V("div", {
2239
+ className: J("p-6 text-sm text-destructive", y),
1895
2240
  children: "TasksPage: no workspaceId provided (prop or PlanMagnetProvider)."
1896
2241
  });
1897
- let R = !i && !!t, z = k && p === "inline", H = j != null && m === "inline", U = /* @__PURE__ */ B(Je, {
1898
- workspaceId: v,
2242
+ let W = !i && !!t, G = F && g === "inline", ie = L != null && v === "inline", ae = /* @__PURE__ */ V(nt, {
2243
+ workspaceId: S,
1899
2244
  projectId: t,
2245
+ assigneeOptions: d,
1900
2246
  hiddenFields: a,
1901
- onCreated: P,
1902
- onCancel: () => A(!1)
1903
- }), W = j == null ? null : /* @__PURE__ */ B(dt, {
1904
- id: j,
2247
+ onCreated: ee,
2248
+ onCancel: () => I(!1)
2249
+ }), oe = L == null ? null : /* @__PURE__ */ V(xt, {
2250
+ id: L,
1905
2251
  readonly: i,
1906
2252
  hiddenFields: a,
1907
- onUpdated: F
1908
- }), te = T === "ALL" ? void 0 : T, G = D === "ALL" ? void 0 : D, ne = l ? [
2253
+ resolveAssignee: c,
2254
+ assigneeOptions: d,
2255
+ onUpdated: B,
2256
+ onDeleted: te
2257
+ }), se = k === "ALL" ? void 0 : k, q = j === "ALL" ? void 0 : j, ce = N && f ? f : void 0, ue = l ? [
1909
2258
  "title",
1910
2259
  "status",
1911
2260
  "priority",
@@ -1913,94 +2262,102 @@ function ft({ workspaceId: e, projectId: t, boardProjectId: n, columns: r, reado
1913
2262
  "dueDate",
1914
2263
  "linkedRecord"
1915
2264
  ] : void 0;
1916
- return /* @__PURE__ */ V("div", {
1917
- className: q("space-y-4 p-6", h),
1918
- children: [
1919
- d && /* @__PURE__ */ B("div", {
1920
- className: "min-w-0",
1921
- children: typeof d == "string" ? /* @__PURE__ */ B("h1", {
1922
- className: "truncate text-2xl font-semibold text-foreground",
1923
- children: d
1924
- }) : d
1925
- }),
1926
- /* @__PURE__ */ B(lt, {
1927
- view: b,
1928
- onViewChange: S,
1929
- views: o,
1930
- search: C,
1931
- onSearchChange: w,
1932
- priority: T,
1933
- onPriorityChange: E,
1934
- type: D,
1935
- onTypeChange: O,
1936
- onNewTask: () => A(!0),
1937
- canCreate: R
1938
- }),
1939
- z && /* @__PURE__ */ B("div", { children: U }),
1940
- b === "board" && /* @__PURE__ */ B(We, {
1941
- workspaceId: v,
1942
- projectId: n,
1943
- columns: r,
1944
- readonly: i,
1945
- hideHeader: !0,
1946
- priority: T,
1947
- type: D,
1948
- search: C,
1949
- hiddenFields: a,
1950
- resolveAssignee: c,
1951
- linkSourceProduct: l,
1952
- renderLinkIcon: u,
1953
- onTaskClick: I
1954
- }),
1955
- b === "list" && /* @__PURE__ */ B(et, {
1956
- workspaceId: v,
1957
- projectId: n,
1958
- priority: te,
1959
- type: G,
1960
- search: C || void 0,
1961
- hideHeader: !0,
1962
- resolveAssignee: c,
1963
- linkSourceProduct: l,
1964
- renderLinkIcon: u,
1965
- columns: ne ? [...ne] : void 0,
1966
- onSelect: L
1967
- }),
1968
- b === "timeline" && /* @__PURE__ */ B(at, {
1969
- workspaceId: v,
1970
- projectId: n,
1971
- priority: T,
1972
- type: D,
1973
- search: C,
1974
- resolveAssignee: c,
1975
- onSelect: L
1976
- }),
1977
- H && /* @__PURE__ */ B("div", {
1978
- className: "pb-6",
1979
- children: W
1980
- }),
1981
- p === "modal" && /* @__PURE__ */ B(ze, {
1982
- open: k,
1983
- onClose: () => A(!1),
1984
- ariaLabel: "Create task",
1985
- className: "max-w-xl",
1986
- children: /* @__PURE__ */ B("div", {
1987
- className: "p-2 pt-8",
1988
- children: U
1989
- })
1990
- }),
1991
- m === "drawer" && /* @__PURE__ */ B(Be, {
1992
- open: j != null,
1993
- onClose: () => M(null),
1994
- ariaLabel: "Task detail",
1995
- children: /* @__PURE__ */ B("div", {
1996
- className: "p-2 pt-8",
1997
- children: W
2265
+ return /* @__PURE__ */ V(Ie, {
2266
+ value: w,
2267
+ children: /* @__PURE__ */ H("div", {
2268
+ className: J("space-y-4 p-6", y),
2269
+ children: [
2270
+ m && /* @__PURE__ */ V("div", {
2271
+ className: "min-w-0",
2272
+ children: typeof m == "string" ? /* @__PURE__ */ V("h1", {
2273
+ className: "truncate text-2xl font-semibold text-foreground",
2274
+ children: m
2275
+ }) : m
2276
+ }),
2277
+ /* @__PURE__ */ V(yt, {
2278
+ view: T,
2279
+ onViewChange: E,
2280
+ views: o,
2281
+ search: D,
2282
+ onSearchChange: O,
2283
+ priority: k,
2284
+ onPriorityChange: A,
2285
+ type: j,
2286
+ onTypeChange: M,
2287
+ onNewTask: () => I(!0),
2288
+ canCreate: W,
2289
+ mine: N,
2290
+ onMineChange: f ? P : void 0
2291
+ }),
2292
+ G && /* @__PURE__ */ V("div", { children: ae }),
2293
+ T === "board" && /* @__PURE__ */ V(Qe, {
2294
+ workspaceId: S,
2295
+ projectId: n,
2296
+ columns: r,
2297
+ readonly: i,
2298
+ hideHeader: !0,
2299
+ priority: k,
2300
+ type: j,
2301
+ search: D,
2302
+ assigneeId: ce,
2303
+ hiddenFields: a,
2304
+ resolveAssignee: c,
2305
+ linkSourceProduct: l,
2306
+ renderLinkIcon: u,
2307
+ onTaskClick: ne
2308
+ }),
2309
+ T === "list" && /* @__PURE__ */ V(ct, {
2310
+ workspaceId: S,
2311
+ projectId: n,
2312
+ priority: se,
2313
+ type: q,
2314
+ search: D || void 0,
2315
+ assigneeId: ce,
2316
+ hideHeader: !0,
2317
+ resolveAssignee: c,
2318
+ linkSourceProduct: l,
2319
+ renderLinkIcon: u,
2320
+ columns: ue ? [...ue] : void 0,
2321
+ onSelect: U
2322
+ }),
2323
+ T === "timeline" && /* @__PURE__ */ V(mt, {
2324
+ workspaceId: S,
2325
+ projectId: n,
2326
+ priority: k,
2327
+ type: j,
2328
+ search: D,
2329
+ assigneeId: ce,
2330
+ resolveAssignee: c,
2331
+ onSelect: U
2332
+ }),
2333
+ ie && /* @__PURE__ */ V("div", {
2334
+ className: "pb-6",
2335
+ children: oe
2336
+ }),
2337
+ g === "modal" && /* @__PURE__ */ V(qe, {
2338
+ open: F,
2339
+ onClose: () => I(!1),
2340
+ ariaLabel: "Create task",
2341
+ className: "max-w-xl",
2342
+ children: /* @__PURE__ */ V("div", {
2343
+ className: "p-2 pt-8",
2344
+ children: ae
2345
+ })
2346
+ }),
2347
+ v === "drawer" && /* @__PURE__ */ V(Je, {
2348
+ open: L != null,
2349
+ onClose: () => R(null),
2350
+ ariaLabel: "Task detail",
2351
+ children: /* @__PURE__ */ V("div", {
2352
+ className: "p-2 pt-8",
2353
+ children: oe
2354
+ })
1998
2355
  })
1999
- })
2000
- ]
2356
+ ]
2357
+ })
2001
2358
  });
2002
2359
  }
2003
2360
  //#endregion
2004
- export { Je as CreateTaskCore, ft as TasksPageCore };
2361
+ export { nt as CreateTaskCore, Ct as TasksPageCore };
2005
2362
 
2006
2363
  //# sourceMappingURL=index.js.map