@burdenoff/planmagnet-fe-sdk 2026.704.4 → 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 +60 -3
- package/dist/index.js +364 -79
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -810,6 +810,21 @@ interface TaskDetailCoreProps {
|
|
|
810
810
|
linkSourceProduct?: string;
|
|
811
811
|
/** Optional host hook to render an icon per linked-entity type. */
|
|
812
812
|
renderLinkIcon?: RenderLinkIcon;
|
|
813
|
+
/** Open another work item's detail (parent link / sub-task row click). */
|
|
814
|
+
onOpenItem?: (id: string) => void;
|
|
815
|
+
/** Start creating a sub-task under this item (the "Add sub-task" affordance). */
|
|
816
|
+
onAddSubtask?: (parent: {
|
|
817
|
+
id: string;
|
|
818
|
+
projectId: string;
|
|
819
|
+
}) => void;
|
|
820
|
+
/**
|
|
821
|
+
* When set, renders a Comments thread backed by the shared
|
|
822
|
+
* wspace-conversations-svc `EntityComment`, namespaced under this entity type
|
|
823
|
+
* (e.g. "planmagnet_workitem"). Opt-in so the SDK stays generic.
|
|
824
|
+
*/
|
|
825
|
+
commentsEntityType?: string;
|
|
826
|
+
/** The current actor — enables "My tasks", comment authorship + own-comment delete. */
|
|
827
|
+
currentActorId?: string;
|
|
813
828
|
/** Extra classes on the root container. */
|
|
814
829
|
className?: string;
|
|
815
830
|
}
|
|
@@ -818,7 +833,7 @@ interface TaskDetailCoreProps {
|
|
|
818
833
|
* edit. Fetches via `planmagnetWorkItem(id)`, saves via
|
|
819
834
|
* `planmagnetUpdateWorkItem`. BYO-Apollo, semantic-token only, farm-free.
|
|
820
835
|
*/
|
|
821
|
-
declare function TaskDetailCore({ id, readonly, hiddenFields, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, className, }: TaskDetailCoreProps): react.JSX.Element;
|
|
836
|
+
declare function TaskDetailCore({ id, readonly, hiddenFields, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, onOpenItem, onAddSubtask, commentsEntityType, currentActorId, className, }: TaskDetailCoreProps): react.JSX.Element;
|
|
822
837
|
|
|
823
838
|
interface TaskDetailProps extends TaskDetailCoreProps {
|
|
824
839
|
/** Workspace API gateway URL (URL mode). */
|
|
@@ -859,6 +874,30 @@ interface TaskDetailProps extends TaskDetailCoreProps {
|
|
|
859
874
|
*/
|
|
860
875
|
declare function TaskDetail({ apiGatewayUrl, authToken, workspaceToken, workspaceId, tenantId, organizationId, trustedOrigins, onAuthError, workspaceClient, ...coreProps }: TaskDetailProps): react.JSX.Element;
|
|
861
876
|
|
|
877
|
+
interface TaskCommentsCoreProps {
|
|
878
|
+
/** Comment namespace for this entity family (e.g. "planmagnet_workitem"). */
|
|
879
|
+
entityType: string;
|
|
880
|
+
/** The work item id these comments belong to. */
|
|
881
|
+
entityId: string;
|
|
882
|
+
/** The current actor — enables "You" + delete on own comments. */
|
|
883
|
+
currentActorId?: string;
|
|
884
|
+
/** Resolve an author id → display name (reuse the member directory). */
|
|
885
|
+
resolveAssignee?: ResolveAssignee;
|
|
886
|
+
/** Hide the composer + delete affordances (pure read-only). */
|
|
887
|
+
readonly?: boolean;
|
|
888
|
+
/** Extra classes on the root container. */
|
|
889
|
+
className?: string;
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* TaskCommentsCore — a comment thread on a work item, backed by the SHARED
|
|
893
|
+
* wspace-conversations-svc `EntityComment` (the platform's canonical comment
|
|
894
|
+
* owner) rather than a per-product comment table. BYO-Apollo, semantic-token
|
|
895
|
+
* only, farm-free. RBAC is enforced server-side (create/read are editor-level,
|
|
896
|
+
* a workspace Member gets editor on `entity-comment`); the composer fails open
|
|
897
|
+
* and shows a graceful error if the server denies it.
|
|
898
|
+
*/
|
|
899
|
+
declare function TaskCommentsCore({ entityType, entityId, currentActorId, resolveAssignee, readonly, className, }: TaskCommentsCoreProps): react.JSX.Element;
|
|
900
|
+
|
|
862
901
|
/**
|
|
863
902
|
* TaskLabels — every user-facing string the SDK renders, so a host (e.g.
|
|
864
903
|
* HealthyBowl, which ships 6 languages) can inject translations. English
|
|
@@ -918,6 +957,18 @@ interface TaskLabels {
|
|
|
918
957
|
linkedRecordsLabel: string;
|
|
919
958
|
createdLabel: string;
|
|
920
959
|
updatedLabel: string;
|
|
960
|
+
parentLabel: string;
|
|
961
|
+
subtasksLabel: string;
|
|
962
|
+
addSubtask: string;
|
|
963
|
+
commentsLabel: string;
|
|
964
|
+
commentPlaceholder: string;
|
|
965
|
+
postComment: string;
|
|
966
|
+
posting: string;
|
|
967
|
+
noComments: string;
|
|
968
|
+
you: string;
|
|
969
|
+
editedTag: string;
|
|
970
|
+
failedToComment: string;
|
|
971
|
+
failedToDeleteComment: string;
|
|
921
972
|
create: string;
|
|
922
973
|
creating: string;
|
|
923
974
|
cancel: string;
|
|
@@ -1016,6 +1067,12 @@ interface TasksPageCoreProps {
|
|
|
1016
1067
|
* toggle that filters every view to items assigned to this actor.
|
|
1017
1068
|
*/
|
|
1018
1069
|
currentActorId?: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* When set, each task's detail shows a Comments thread backed by the shared
|
|
1072
|
+
* wspace-conversations-svc `EntityComment`, namespaced under this entity type
|
|
1073
|
+
* (e.g. "planmagnet_workitem"). Omit to hide comments.
|
|
1074
|
+
*/
|
|
1075
|
+
commentsEntityType?: string;
|
|
1019
1076
|
/** Host-provided translations for every UI string (English defaults otherwise). */
|
|
1020
1077
|
labels?: PartialTaskLabels;
|
|
1021
1078
|
/**
|
|
@@ -1048,7 +1105,7 @@ interface TasksPageCoreProps {
|
|
|
1048
1105
|
* BYO-Apollo: reads the ambient `<ApolloProvider>` and takes `workspaceId` from
|
|
1049
1106
|
* a prop or the PlanMagnetProvider context. Semantic tokens only, farm-free.
|
|
1050
1107
|
*/
|
|
1051
|
-
declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, confirmMove, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, labels, openItemId, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
|
|
1108
|
+
declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, confirmMove, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, commentsEntityType, labels, openItemId, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
|
|
1052
1109
|
|
|
1053
1110
|
interface TasksPageProps extends TasksPageCoreProps {
|
|
1054
1111
|
/** Workspace API gateway URL (URL mode). */
|
|
@@ -1333,4 +1390,4 @@ declare function getGraphQLEndpoint(baseUrl?: string): string;
|
|
|
1333
1390
|
|
|
1334
1391
|
declare function cn(...inputs: ClassValue[]): string;
|
|
1335
1392
|
|
|
1336
|
-
export { type AssigneeOption, Avatar, type AvatarProps, Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, type CreateWorkItemLinkInput, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, type LinkChipProps, type ListMilestonesInput, type ListTasksInput, type ListWorkItemLinksInput, MILESTONE_FIELDS, MOVE_WORK_ITEM, type Milestone, type MilestoneList, type MilestoneStatus, Modal, type ModalProps, PRIORITY_META, PROJECT_SUMMARY_FIELDS, type PartialTaskLabels, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, PriorityIndicator, type PriorityIndicatorProps, type Project, type ProjectList, type RenderLinkIcon, type ResolveAssignee, STATUS_META, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskCard, type TaskCardProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, type TaskLabels, TaskLabelsProvider, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, TaskTimelineCore, type TaskTimelineCoreProps, TaskToolbar, type TaskToolbarProps, type TaskType, type TaskView, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, TypeBadge, type TypeBadgeProps, UPDATE_WORK_ITEM, type UpdateTaskInput, type UseMilestonesResult, type UseWorkItemLinksResult, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLink, type WorkItemLinkList, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };
|
|
1393
|
+
export { type AssigneeOption, Avatar, type AvatarProps, Badge, type BadgeProps, type BoardColumn, CREATE_WORK_ITEM, CREATE_WORK_ITEM_LINK, CreateTask, CreateTaskCore, type CreateTaskCoreProps, type CreateTaskField, type CreateTaskInput, type CreateTaskProps, type CreateWorkItemLinkInput, DEFAULT_BOARD_COLUMNS, DEFAULT_TASK_LABELS, DELETE_WORK_ITEM, DELETE_WORK_ITEM_LINK, Drawer, type DrawerProps, GET_PROJECTS, GET_WORK_ITEM, LIST_MILESTONES, LIST_WORK_ITEMS, LIST_WORK_ITEM_LINKS, LinkChip, type LinkChipProps, type ListMilestonesInput, type ListTasksInput, type ListWorkItemLinksInput, MILESTONE_FIELDS, MOVE_WORK_ITEM, type Milestone, type MilestoneList, type MilestoneStatus, Modal, type ModalProps, PRIORITY_META, PROJECT_SUMMARY_FIELDS, type PartialTaskLabels, type PlanMagnetClientConfig, type PlanMagnetConfig, PlanMagnetProvider, type PlanMagnetProviderProps, PriorityIndicator, type PriorityIndicatorProps, type Project, type ProjectList, type RenderLinkIcon, type ResolveAssignee, STATUS_META, StatusIcon, type StatusIconProps, StatusPill, type StatusPillProps, TASK_PRIORITIES, TASK_STATUSES, TASK_TYPES, type Task, TaskBoard, TaskBoardCore, type TaskBoardCoreProps, type TaskBoardProps, TaskCard, type TaskCardProps, TaskCommentsCore, type TaskCommentsCoreProps, TaskDetail, TaskDetailCore, type TaskDetailCoreProps, type TaskDetailField, type TaskDetailProps, type TaskLabels, TaskLabelsProvider, TaskList, type TaskListColumn, TaskListCore, type TaskListCoreProps, type TaskListProps, type TaskListSort, type TaskPageInfo, type TaskPaginationInput, type TaskPriority, type TaskSavedResult, type TaskStatus, TaskTimelineCore, type TaskTimelineCoreProps, TaskToolbar, type TaskToolbarProps, type TaskType, type TaskView, TasksPage, TasksPageCore, type TasksPageCoreProps, type TasksPageField, type TasksPageProps, type TasksPageSaved, TypeBadge, type TypeBadgeProps, UPDATE_WORK_ITEM, type UpdateTaskInput, type UseMilestonesResult, type UseWorkItemLinksResult, WORK_ITEM_FIELDS, WORK_ITEM_LINK_FIELDS, WORK_ITEM_SUMMARY_FIELDS, type WorkItemDetail, type WorkItemLink, type WorkItemLinkList, type WorkItemLinkRelation, type WorkItemList, badgeVariants, cn, config, createPlanMagnetClient, enumLabel, getGraphQLEndpoint, getPlanMagnetClient, getPlanMagnetClientSafe, getPlanMagnetConfig, isPlanMagnetClientReady, mergeTaskLabels, resetPlanMagnetClient, resetPlanMagnetConfig, setPlanMagnetClient, setPlanMagnetConfig, useMilestones, usePlanMagnetContext, usePlanMagnetContextSafe, useTaskLabels, useWorkItemLinks, validateTrustedOrigin, waitForPlanMagnetClient };
|