@burdenoff/planmagnet-fe-sdk 2026.705.1 → 2026.705.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +50 -3
- package/dist/index.js +306 -119
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -512,6 +512,44 @@ var DELETE_WORK_ITEM = gql`
|
|
|
512
512
|
planmagnetDeleteWorkItem(id: $id)
|
|
513
513
|
}
|
|
514
514
|
`;
|
|
515
|
+
var ENTITY_COMMENT_FIELDS = gql`
|
|
516
|
+
fragment EntityCommentFields on EntityComment {
|
|
517
|
+
id
|
|
518
|
+
authorId
|
|
519
|
+
authorType
|
|
520
|
+
content {
|
|
521
|
+
text
|
|
522
|
+
}
|
|
523
|
+
createdAt
|
|
524
|
+
edited
|
|
525
|
+
editedAt
|
|
526
|
+
status
|
|
527
|
+
}
|
|
528
|
+
`;
|
|
529
|
+
var GET_ENTITY_COMMENTS = gql`
|
|
530
|
+
query GetEntityComments($input: GetCommentsInput!) {
|
|
531
|
+
getEntityComments(input: $input) {
|
|
532
|
+
items {
|
|
533
|
+
...EntityCommentFields
|
|
534
|
+
}
|
|
535
|
+
total
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
${ENTITY_COMMENT_FIELDS}
|
|
539
|
+
`;
|
|
540
|
+
var CREATE_ENTITY_COMMENT = gql`
|
|
541
|
+
mutation CreateEntityComment($input: CreateEntityCommentInput!) {
|
|
542
|
+
createEntityComment(input: $input) {
|
|
543
|
+
...EntityCommentFields
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
${ENTITY_COMMENT_FIELDS}
|
|
547
|
+
`;
|
|
548
|
+
var DELETE_ENTITY_COMMENT = gql`
|
|
549
|
+
mutation DeleteEntityComment($input: DeleteCommentInput!) {
|
|
550
|
+
deleteEntityComment(input: $input)
|
|
551
|
+
}
|
|
552
|
+
`;
|
|
515
553
|
function cn(...inputs) {
|
|
516
554
|
return twMerge(clsx(inputs));
|
|
517
555
|
}
|
|
@@ -751,6 +789,15 @@ var DEFAULT_TASK_LABELS = {
|
|
|
751
789
|
parentLabel: "Parent",
|
|
752
790
|
subtasksLabel: "Sub-tasks",
|
|
753
791
|
addSubtask: "Add sub-task",
|
|
792
|
+
commentsLabel: "Comments",
|
|
793
|
+
commentPlaceholder: "Write a comment\u2026",
|
|
794
|
+
postComment: "Comment",
|
|
795
|
+
posting: "Posting\u2026",
|
|
796
|
+
noComments: "No comments yet",
|
|
797
|
+
you: "You",
|
|
798
|
+
editedTag: "(edited)",
|
|
799
|
+
failedToComment: "Failed to post comment",
|
|
800
|
+
failedToDeleteComment: "Failed to delete comment",
|
|
754
801
|
create: "Create task",
|
|
755
802
|
creating: "Creating\u2026",
|
|
756
803
|
cancel: "Cancel",
|
|
@@ -2454,8 +2501,129 @@ function TaskToolbar({
|
|
|
2454
2501
|
}
|
|
2455
2502
|
);
|
|
2456
2503
|
}
|
|
2457
|
-
var fieldClass2 = "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";
|
|
2458
2504
|
var labelClass2 = "text-xs font-medium uppercase tracking-wide text-muted-foreground";
|
|
2505
|
+
var fieldClass2 = "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";
|
|
2506
|
+
function TaskCommentsCore({
|
|
2507
|
+
entityType,
|
|
2508
|
+
entityId,
|
|
2509
|
+
currentActorId,
|
|
2510
|
+
resolveAssignee,
|
|
2511
|
+
readonly,
|
|
2512
|
+
className
|
|
2513
|
+
}) {
|
|
2514
|
+
const L = useTaskLabels();
|
|
2515
|
+
const [text, setText] = useState("");
|
|
2516
|
+
const [error, setError] = useState(null);
|
|
2517
|
+
const { data, loading, refetch } = useQuery(
|
|
2518
|
+
GET_ENTITY_COMMENTS,
|
|
2519
|
+
{
|
|
2520
|
+
variables: {
|
|
2521
|
+
input: {
|
|
2522
|
+
entityType,
|
|
2523
|
+
entityId,
|
|
2524
|
+
take: 100,
|
|
2525
|
+
sortBy: "createdAt",
|
|
2526
|
+
sortOrder: "asc"
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2529
|
+
skip: !entityId,
|
|
2530
|
+
errorPolicy: "all"
|
|
2531
|
+
}
|
|
2532
|
+
);
|
|
2533
|
+
const comments = data?.getEntityComments?.items ?? [];
|
|
2534
|
+
const [createComment, { loading: posting }] = useMutation(CREATE_ENTITY_COMMENT);
|
|
2535
|
+
const [deleteComment] = useMutation(
|
|
2536
|
+
DELETE_ENTITY_COMMENT
|
|
2537
|
+
);
|
|
2538
|
+
const authorName = (id) => id === currentActorId ? L.you : resolveAssignee?.(id)?.name ?? void 0;
|
|
2539
|
+
const handlePost = async (e) => {
|
|
2540
|
+
e.preventDefault();
|
|
2541
|
+
const body = text.trim();
|
|
2542
|
+
if (!body) return;
|
|
2543
|
+
setError(null);
|
|
2544
|
+
try {
|
|
2545
|
+
await createComment({
|
|
2546
|
+
variables: {
|
|
2547
|
+
input: {
|
|
2548
|
+
entityType,
|
|
2549
|
+
entityId,
|
|
2550
|
+
content: { text: body },
|
|
2551
|
+
contentType: "TEXT"
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
});
|
|
2555
|
+
setText("");
|
|
2556
|
+
await refetch();
|
|
2557
|
+
} catch {
|
|
2558
|
+
setError(L.failedToComment);
|
|
2559
|
+
}
|
|
2560
|
+
};
|
|
2561
|
+
const handleDelete = async (id) => {
|
|
2562
|
+
setError(null);
|
|
2563
|
+
try {
|
|
2564
|
+
await deleteComment({ variables: { input: { id, soft: true } } });
|
|
2565
|
+
await refetch();
|
|
2566
|
+
} catch {
|
|
2567
|
+
setError(L.failedToDeleteComment);
|
|
2568
|
+
}
|
|
2569
|
+
};
|
|
2570
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-3", className), children: [
|
|
2571
|
+
/* @__PURE__ */ jsxs("div", { className: labelClass2, children: [
|
|
2572
|
+
L.commentsLabel,
|
|
2573
|
+
comments.length > 0 ? ` (${comments.length})` : ""
|
|
2574
|
+
] }),
|
|
2575
|
+
/* @__PURE__ */ jsx("ul", { className: "space-y-3", children: comments.length === 0 && !loading ? /* @__PURE__ */ jsx("li", { className: "text-sm text-muted-foreground", children: L.noComments }) : comments.map((c) => /* @__PURE__ */ jsxs("li", { className: "flex gap-2", children: [
|
|
2576
|
+
/* @__PURE__ */ jsx(Avatar, { id: c.authorId, name: authorName(c.authorId), size: "sm" }),
|
|
2577
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2578
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2579
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground", children: authorName(c.authorId) ?? c.authorId.slice(0, 8) }),
|
|
2580
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: formatDateFull(c.createdAt) }),
|
|
2581
|
+
c.edited && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: L.editedTag }),
|
|
2582
|
+
!readonly && c.authorId === currentActorId && /* @__PURE__ */ jsx(
|
|
2583
|
+
"button",
|
|
2584
|
+
{
|
|
2585
|
+
type: "button",
|
|
2586
|
+
onClick: () => handleDelete(c.id),
|
|
2587
|
+
"aria-label": L.del,
|
|
2588
|
+
title: L.del,
|
|
2589
|
+
className: "ml-auto rounded p-1 text-muted-foreground hover:text-destructive",
|
|
2590
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3.5 w-3.5" })
|
|
2591
|
+
}
|
|
2592
|
+
)
|
|
2593
|
+
] }),
|
|
2594
|
+
/* @__PURE__ */ jsx("p", { className: "whitespace-pre-wrap break-words text-sm text-foreground", children: c.content?.text })
|
|
2595
|
+
] })
|
|
2596
|
+
] }, c.id)) }),
|
|
2597
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-sm text-destructive", children: error }),
|
|
2598
|
+
!readonly && /* @__PURE__ */ jsxs("form", { onSubmit: handlePost, className: "space-y-2", children: [
|
|
2599
|
+
/* @__PURE__ */ jsx(
|
|
2600
|
+
"textarea",
|
|
2601
|
+
{
|
|
2602
|
+
className: cn(fieldClass2, "min-h-[60px]"),
|
|
2603
|
+
rows: 2,
|
|
2604
|
+
value: text,
|
|
2605
|
+
onChange: (e) => setText(e.target.value),
|
|
2606
|
+
placeholder: L.commentPlaceholder,
|
|
2607
|
+
"aria-label": L.commentsLabel
|
|
2608
|
+
}
|
|
2609
|
+
),
|
|
2610
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
2611
|
+
"button",
|
|
2612
|
+
{
|
|
2613
|
+
type: "submit",
|
|
2614
|
+
disabled: posting || !text.trim(),
|
|
2615
|
+
className: cn(
|
|
2616
|
+
"rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground",
|
|
2617
|
+
(posting || !text.trim()) && "cursor-not-allowed opacity-50"
|
|
2618
|
+
),
|
|
2619
|
+
children: posting ? L.posting : L.postComment
|
|
2620
|
+
}
|
|
2621
|
+
) })
|
|
2622
|
+
] })
|
|
2623
|
+
] });
|
|
2624
|
+
}
|
|
2625
|
+
var fieldClass3 = "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";
|
|
2626
|
+
var labelClass3 = "text-xs font-medium uppercase tracking-wide text-muted-foreground";
|
|
2459
2627
|
var priorityVariant = {
|
|
2460
2628
|
NONE: "muted",
|
|
2461
2629
|
LOW: "muted",
|
|
@@ -2477,6 +2645,8 @@ function TaskDetailCore({
|
|
|
2477
2645
|
renderLinkIcon,
|
|
2478
2646
|
onOpenItem,
|
|
2479
2647
|
onAddSubtask,
|
|
2648
|
+
commentsEntityType,
|
|
2649
|
+
currentActorId,
|
|
2480
2650
|
className
|
|
2481
2651
|
}) {
|
|
2482
2652
|
const client = useApolloClient();
|
|
@@ -2661,119 +2831,133 @@ function TaskDetailCore({
|
|
|
2661
2831
|
": ",
|
|
2662
2832
|
deleteError.message
|
|
2663
2833
|
] }),
|
|
2664
|
-
!editing ? /* @__PURE__ */ jsxs("
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
/* @__PURE__ */ jsx(
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
/* @__PURE__ */
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
/* @__PURE__ */
|
|
2687
|
-
|
|
2688
|
-
"span",
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
/* @__PURE__ */
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
/* @__PURE__ */
|
|
2709
|
-
|
|
2710
|
-
"
|
|
2711
|
-
{
|
|
2712
|
-
type: "button",
|
|
2713
|
-
onClick: () => onOpenItem?.(parent.id),
|
|
2714
|
-
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",
|
|
2715
|
-
children: [
|
|
2716
|
-
/* @__PURE__ */ jsx(StatusIcon, { status: parent.status }),
|
|
2717
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: parent.key }),
|
|
2718
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: parent.title })
|
|
2719
|
-
]
|
|
2720
|
-
}
|
|
2721
|
-
) })
|
|
2722
|
-
] }),
|
|
2723
|
-
(children.length > 0 || onAddSubtask && canEdit) && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2724
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2725
|
-
/* @__PURE__ */ jsxs("dt", { className: labelClass2, children: [
|
|
2726
|
-
L.subtasksLabel,
|
|
2727
|
-
children.length > 0 ? ` (${children.length})` : ""
|
|
2728
|
-
] }),
|
|
2729
|
-
onAddSubtask && canEdit && /* @__PURE__ */ jsxs(
|
|
2834
|
+
!editing ? /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
|
|
2835
|
+
/* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
2836
|
+
!hidden.has("type") && /* @__PURE__ */ jsx(Field, { label: L.typeLabel, children: /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: L.type[item.type] }) }),
|
|
2837
|
+
!hidden.has("status") && /* @__PURE__ */ jsx(Field, { label: L.statusLabel, children: /* @__PURE__ */ jsx("span", { className: "capitalize text-foreground", children: L.status[item.status] }) }),
|
|
2838
|
+
!hidden.has("priority") && /* @__PURE__ */ jsx(Field, { label: L.priorityLabel, children: /* @__PURE__ */ jsx(Badge, { variant: priorityVariant[item.priority], children: L.priority[item.priority] }) }),
|
|
2839
|
+
!hidden.has("assignee") && /* @__PURE__ */ jsx(Field, { label: L.assigneeLabel, children: item.assigneeId ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
2840
|
+
/* @__PURE__ */ jsx(
|
|
2841
|
+
Avatar,
|
|
2842
|
+
{
|
|
2843
|
+
id: item.assigneeId,
|
|
2844
|
+
name: resolveAssignee?.(item.assigneeId)?.name,
|
|
2845
|
+
size: "sm"
|
|
2846
|
+
}
|
|
2847
|
+
),
|
|
2848
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground", children: resolveAssignee?.(item.assigneeId)?.name ?? L.assigned })
|
|
2849
|
+
] }) : /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: L.unassigned }) }),
|
|
2850
|
+
!hidden.has("dueDate") && /* @__PURE__ */ jsx(Field, { label: L.dueDateLabel, children: /* @__PURE__ */ jsx("span", { className: "text-foreground", children: formatDateFull(item.dueDate) ?? "\u2014" }) }),
|
|
2851
|
+
!hidden.has("storyPoints") && /* @__PURE__ */ jsx(Field, { label: L.storyPointsLabel, children: /* @__PURE__ */ jsx("span", { className: "text-foreground", children: item.storyPoints ?? 0 }) }),
|
|
2852
|
+
!hidden.has("description") && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2853
|
+
/* @__PURE__ */ jsx("dt", { className: labelClass3, children: L.description }),
|
|
2854
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 whitespace-pre-wrap text-sm text-foreground", children: item.description || "\u2014" })
|
|
2855
|
+
] }),
|
|
2856
|
+
!hidden.has("labels") && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2857
|
+
/* @__PURE__ */ jsx("dt", { className: labelClass3, children: L.labelsLabel }),
|
|
2858
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 flex flex-wrap gap-1", children: (item.labels ?? []).length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "\u2014" }) : item.labels.map((l) => /* @__PURE__ */ jsx(
|
|
2859
|
+
"span",
|
|
2860
|
+
{
|
|
2861
|
+
className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
2862
|
+
children: l
|
|
2863
|
+
},
|
|
2864
|
+
l
|
|
2865
|
+
)) })
|
|
2866
|
+
] }),
|
|
2867
|
+
links.length > 0 && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2868
|
+
/* @__PURE__ */ jsx("dt", { className: labelClass3, children: L.linkedRecordsLabel }),
|
|
2869
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 flex flex-wrap gap-1.5", children: links.map((link) => /* @__PURE__ */ jsx(
|
|
2870
|
+
LinkChip,
|
|
2871
|
+
{
|
|
2872
|
+
link,
|
|
2873
|
+
renderIcon: renderLinkIcon
|
|
2874
|
+
},
|
|
2875
|
+
link.id
|
|
2876
|
+
)) })
|
|
2877
|
+
] }),
|
|
2878
|
+
parent && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2879
|
+
/* @__PURE__ */ jsx("dt", { className: labelClass3, children: L.parentLabel }),
|
|
2880
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1", children: /* @__PURE__ */ jsxs(
|
|
2730
2881
|
"button",
|
|
2731
2882
|
{
|
|
2732
2883
|
type: "button",
|
|
2733
|
-
onClick: () =>
|
|
2734
|
-
className: "
|
|
2884
|
+
onClick: () => onOpenItem?.(parent.id),
|
|
2885
|
+
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",
|
|
2735
2886
|
children: [
|
|
2736
|
-
|
|
2737
|
-
|
|
2887
|
+
/* @__PURE__ */ jsx(StatusIcon, { status: parent.status }),
|
|
2888
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: parent.key }),
|
|
2889
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: parent.title })
|
|
2738
2890
|
]
|
|
2739
2891
|
}
|
|
2740
|
-
)
|
|
2892
|
+
) })
|
|
2741
2893
|
] }),
|
|
2742
|
-
|
|
2743
|
-
"
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2894
|
+
(children.length > 0 || onAddSubtask && canEdit) && /* @__PURE__ */ jsxs("div", { className: "sm:col-span-2", children: [
|
|
2895
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
2896
|
+
/* @__PURE__ */ jsxs("dt", { className: labelClass3, children: [
|
|
2897
|
+
L.subtasksLabel,
|
|
2898
|
+
children.length > 0 ? ` (${children.length})` : ""
|
|
2899
|
+
] }),
|
|
2900
|
+
onAddSubtask && canEdit && /* @__PURE__ */ jsxs(
|
|
2901
|
+
"button",
|
|
2902
|
+
{
|
|
2903
|
+
type: "button",
|
|
2904
|
+
onClick: () => onAddSubtask({
|
|
2905
|
+
id: item.id,
|
|
2906
|
+
projectId: item.projectId
|
|
2907
|
+
}),
|
|
2908
|
+
className: "text-xs font-medium text-primary hover:underline",
|
|
2909
|
+
children: [
|
|
2910
|
+
"+ ",
|
|
2911
|
+
L.addSubtask
|
|
2912
|
+
]
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
] }),
|
|
2916
|
+
/* @__PURE__ */ jsx("dd", { className: "mt-1 space-y-1", children: children.length === 0 ? /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "\u2014" }) : children.map((c) => /* @__PURE__ */ jsxs(
|
|
2917
|
+
"button",
|
|
2918
|
+
{
|
|
2919
|
+
type: "button",
|
|
2920
|
+
onClick: () => onOpenItem?.(c.id),
|
|
2921
|
+
className: "flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm hover:bg-muted",
|
|
2922
|
+
children: [
|
|
2923
|
+
/* @__PURE__ */ jsx(StatusIcon, { status: c.status }),
|
|
2924
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: c.key }),
|
|
2925
|
+
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-foreground", children: c.title })
|
|
2926
|
+
]
|
|
2927
|
+
},
|
|
2928
|
+
c.id
|
|
2929
|
+
)) })
|
|
2762
2930
|
] }),
|
|
2763
|
-
item.updatedAt && /* @__PURE__ */ jsxs("
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2931
|
+
(item.createdAt || item.updatedAt) && /* @__PURE__ */ jsxs("div", { 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", children: [
|
|
2932
|
+
item.createdAt && /* @__PURE__ */ jsxs("span", { children: [
|
|
2933
|
+
L.createdLabel,
|
|
2934
|
+
" ",
|
|
2935
|
+
formatDateFull(item.createdAt)
|
|
2936
|
+
] }),
|
|
2937
|
+
item.updatedAt && /* @__PURE__ */ jsxs("span", { children: [
|
|
2938
|
+
L.updatedLabel,
|
|
2939
|
+
" ",
|
|
2940
|
+
formatDateFull(item.updatedAt)
|
|
2941
|
+
] })
|
|
2767
2942
|
] })
|
|
2768
|
-
] })
|
|
2943
|
+
] }),
|
|
2944
|
+
commentsEntityType && /* @__PURE__ */ jsx("div", { className: "border-t border-border pt-4", children: /* @__PURE__ */ jsx(
|
|
2945
|
+
TaskCommentsCore,
|
|
2946
|
+
{
|
|
2947
|
+
entityType: commentsEntityType,
|
|
2948
|
+
entityId: item.id,
|
|
2949
|
+
currentActorId,
|
|
2950
|
+
resolveAssignee
|
|
2951
|
+
}
|
|
2952
|
+
) })
|
|
2769
2953
|
] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSave, className: "space-y-4", children: [
|
|
2770
2954
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2771
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-title", className:
|
|
2955
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-title", className: labelClass3, children: L.title }),
|
|
2772
2956
|
/* @__PURE__ */ jsx(
|
|
2773
2957
|
"input",
|
|
2774
2958
|
{
|
|
2775
2959
|
id: "pm-detail-title",
|
|
2776
|
-
className:
|
|
2960
|
+
className: fieldClass3,
|
|
2777
2961
|
value: title,
|
|
2778
2962
|
onChange: (e) => setTitle(e.target.value),
|
|
2779
2963
|
required: true
|
|
@@ -2781,12 +2965,12 @@ function TaskDetailCore({
|
|
|
2781
2965
|
)
|
|
2782
2966
|
] }),
|
|
2783
2967
|
!hidden.has("description") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2784
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-desc", className:
|
|
2968
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-desc", className: labelClass3, children: L.description }),
|
|
2785
2969
|
/* @__PURE__ */ jsx(
|
|
2786
2970
|
"textarea",
|
|
2787
2971
|
{
|
|
2788
2972
|
id: "pm-detail-desc",
|
|
2789
|
-
className: cn(
|
|
2973
|
+
className: cn(fieldClass3, "min-h-[80px]"),
|
|
2790
2974
|
value: description,
|
|
2791
2975
|
onChange: (e) => setDescription(e.target.value)
|
|
2792
2976
|
}
|
|
@@ -2794,12 +2978,12 @@ function TaskDetailCore({
|
|
|
2794
2978
|
] }),
|
|
2795
2979
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
2796
2980
|
!hidden.has("type") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2797
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-type", className:
|
|
2981
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-type", className: labelClass3, children: L.typeLabel }),
|
|
2798
2982
|
/* @__PURE__ */ jsx(
|
|
2799
2983
|
"select",
|
|
2800
2984
|
{
|
|
2801
2985
|
id: "pm-detail-type",
|
|
2802
|
-
className: cn(
|
|
2986
|
+
className: cn(fieldClass3, "capitalize"),
|
|
2803
2987
|
value: type,
|
|
2804
2988
|
onChange: (e) => setType(e.target.value),
|
|
2805
2989
|
children: TASK_TYPES.map((t) => /* @__PURE__ */ jsx("option", { value: t, children: L.type[t] }, t))
|
|
@@ -2807,12 +2991,12 @@ function TaskDetailCore({
|
|
|
2807
2991
|
)
|
|
2808
2992
|
] }),
|
|
2809
2993
|
!hidden.has("status") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2810
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-status", className:
|
|
2994
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-status", className: labelClass3, children: L.statusLabel }),
|
|
2811
2995
|
/* @__PURE__ */ jsx(
|
|
2812
2996
|
"select",
|
|
2813
2997
|
{
|
|
2814
2998
|
id: "pm-detail-status",
|
|
2815
|
-
className: cn(
|
|
2999
|
+
className: cn(fieldClass3, "capitalize"),
|
|
2816
3000
|
value: status,
|
|
2817
3001
|
onChange: (e) => setStatus(e.target.value),
|
|
2818
3002
|
children: TASK_STATUSES.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: L.status[s] }, s))
|
|
@@ -2820,12 +3004,12 @@ function TaskDetailCore({
|
|
|
2820
3004
|
)
|
|
2821
3005
|
] }),
|
|
2822
3006
|
!hidden.has("priority") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2823
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-priority", className:
|
|
3007
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-priority", className: labelClass3, children: L.priorityLabel }),
|
|
2824
3008
|
/* @__PURE__ */ jsx(
|
|
2825
3009
|
"select",
|
|
2826
3010
|
{
|
|
2827
3011
|
id: "pm-detail-priority",
|
|
2828
|
-
className: cn(
|
|
3012
|
+
className: cn(fieldClass3, "capitalize"),
|
|
2829
3013
|
value: priority,
|
|
2830
3014
|
onChange: (e) => setPriority(e.target.value),
|
|
2831
3015
|
children: TASK_PRIORITIES.map((p) => /* @__PURE__ */ jsx("option", { value: p, children: L.priority[p] }, p))
|
|
@@ -2833,12 +3017,12 @@ function TaskDetailCore({
|
|
|
2833
3017
|
)
|
|
2834
3018
|
] }),
|
|
2835
3019
|
!hidden.has("assignee") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2836
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-assignee", className:
|
|
3020
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-assignee", className: labelClass3, children: L.assigneeLabel }),
|
|
2837
3021
|
assigneeOptions && assigneeOptions.length > 0 ? /* @__PURE__ */ jsxs(
|
|
2838
3022
|
"select",
|
|
2839
3023
|
{
|
|
2840
3024
|
id: "pm-detail-assignee",
|
|
2841
|
-
className:
|
|
3025
|
+
className: fieldClass3,
|
|
2842
3026
|
value: assigneeId,
|
|
2843
3027
|
onChange: (e) => setAssigneeId(e.target.value),
|
|
2844
3028
|
children: [
|
|
@@ -2850,7 +3034,7 @@ function TaskDetailCore({
|
|
|
2850
3034
|
"input",
|
|
2851
3035
|
{
|
|
2852
3036
|
id: "pm-detail-assignee",
|
|
2853
|
-
className:
|
|
3037
|
+
className: fieldClass3,
|
|
2854
3038
|
value: assigneeId,
|
|
2855
3039
|
onChange: (e) => setAssigneeId(e.target.value),
|
|
2856
3040
|
placeholder: L.assigneePlaceholder
|
|
@@ -2858,27 +3042,27 @@ function TaskDetailCore({
|
|
|
2858
3042
|
)
|
|
2859
3043
|
] }),
|
|
2860
3044
|
!hidden.has("dueDate") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2861
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-due", className:
|
|
3045
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-due", className: labelClass3, children: L.dueDateLabel }),
|
|
2862
3046
|
/* @__PURE__ */ jsx(
|
|
2863
3047
|
"input",
|
|
2864
3048
|
{
|
|
2865
3049
|
id: "pm-detail-due",
|
|
2866
3050
|
type: "date",
|
|
2867
|
-
className:
|
|
3051
|
+
className: fieldClass3,
|
|
2868
3052
|
value: dueDate,
|
|
2869
3053
|
onChange: (e) => setDueDate(e.target.value)
|
|
2870
3054
|
}
|
|
2871
3055
|
)
|
|
2872
3056
|
] }),
|
|
2873
3057
|
!hidden.has("storyPoints") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2874
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-points", className:
|
|
3058
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-points", className: labelClass3, children: L.storyPointsLabel }),
|
|
2875
3059
|
/* @__PURE__ */ jsx(
|
|
2876
3060
|
"input",
|
|
2877
3061
|
{
|
|
2878
3062
|
id: "pm-detail-points",
|
|
2879
3063
|
type: "number",
|
|
2880
3064
|
min: 0,
|
|
2881
|
-
className:
|
|
3065
|
+
className: fieldClass3,
|
|
2882
3066
|
value: storyPoints,
|
|
2883
3067
|
onChange: (e) => setStoryPoints(e.target.value)
|
|
2884
3068
|
}
|
|
@@ -2886,12 +3070,12 @@ function TaskDetailCore({
|
|
|
2886
3070
|
] })
|
|
2887
3071
|
] }),
|
|
2888
3072
|
!hidden.has("labels") && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
2889
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-labels", className:
|
|
3073
|
+
/* @__PURE__ */ jsx("label", { htmlFor: "pm-detail-labels", className: labelClass3, children: L.labelsLabel }),
|
|
2890
3074
|
/* @__PURE__ */ jsx(
|
|
2891
3075
|
"input",
|
|
2892
3076
|
{
|
|
2893
3077
|
id: "pm-detail-labels",
|
|
2894
|
-
className:
|
|
3078
|
+
className: fieldClass3,
|
|
2895
3079
|
value: labels,
|
|
2896
3080
|
onChange: (e) => setLabels(e.target.value),
|
|
2897
3081
|
placeholder: L.labelsPlaceholder
|
|
@@ -2931,7 +3115,7 @@ function TaskDetailCore({
|
|
|
2931
3115
|
}
|
|
2932
3116
|
function Field({ label, children }) {
|
|
2933
3117
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
2934
|
-
/* @__PURE__ */ jsx("dt", { className:
|
|
3118
|
+
/* @__PURE__ */ jsx("dt", { className: labelClass3, children: label }),
|
|
2935
3119
|
/* @__PURE__ */ jsx("dd", { className: "mt-1 text-sm", children })
|
|
2936
3120
|
] });
|
|
2937
3121
|
}
|
|
@@ -2978,6 +3162,7 @@ function TasksPageCore({
|
|
|
2978
3162
|
renderLinkIcon,
|
|
2979
3163
|
assigneeOptions,
|
|
2980
3164
|
currentActorId,
|
|
3165
|
+
commentsEntityType,
|
|
2981
3166
|
labels,
|
|
2982
3167
|
openItemId,
|
|
2983
3168
|
header,
|
|
@@ -3079,7 +3264,9 @@ function TasksPageCore({
|
|
|
3079
3264
|
onUpdated: handleUpdated,
|
|
3080
3265
|
onDeleted: handleDeleted,
|
|
3081
3266
|
onOpenItem: handleSelect,
|
|
3082
|
-
onAddSubtask: handleAddSubtask
|
|
3267
|
+
onAddSubtask: handleAddSubtask,
|
|
3268
|
+
commentsEntityType,
|
|
3269
|
+
currentActorId
|
|
3083
3270
|
}
|
|
3084
3271
|
) : null;
|
|
3085
3272
|
const listPriority = priority === "ALL" ? void 0 : priority;
|
|
@@ -3215,6 +3402,6 @@ function TasksPage({
|
|
|
3215
3402
|
);
|
|
3216
3403
|
}
|
|
3217
3404
|
|
|
3218
|
-
export { Avatar, Badge, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, MILESTONE_FIELDS, MOVE_WORK_ITEM, Modal, PRIORITY_META, PROJECT_SUMMARY_FIELDS, PlanMagnetProvider, PriorityIndicator, STATUS_META, StatusIcon, StatusPill, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, TaskBoard, TaskBoardCore, TaskCard, TaskDetail, TaskDetailCore, TaskLabelsProvider, TaskList, TaskListCore, TaskTimelineCore, TaskToolbar, TasksPage, TasksPageCore, TypeBadge, UPDATE_WORK_ITEM, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };
|
|
3405
|
+
export { Avatar, Badge, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, MILESTONE_FIELDS, MOVE_WORK_ITEM, Modal, PRIORITY_META, PROJECT_SUMMARY_FIELDS, PlanMagnetProvider, PriorityIndicator, STATUS_META, StatusIcon, StatusPill, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, TaskBoard, TaskBoardCore, TaskCard, TaskCommentsCore, TaskDetail, TaskDetailCore, TaskLabelsProvider, TaskList, TaskListCore, TaskTimelineCore, TaskToolbar, TasksPage, TasksPageCore, TypeBadge, UPDATE_WORK_ITEM, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };
|
|
3219
3406
|
//# sourceMappingURL=index.js.map
|
|
3220
3407
|
//# sourceMappingURL=index.js.map
|