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