@burdenoff/planmagnet-fe-sdk 2026.708.1 → 2026.813.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.
- package/dist/index.d.ts +39 -3
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -570,6 +570,18 @@ interface CreateTaskCoreProps {
|
|
|
570
570
|
assigneeOptions?: AssigneeOption[];
|
|
571
571
|
/** Field names to hide on the form. */
|
|
572
572
|
hiddenFields?: CreateTaskField[];
|
|
573
|
+
/**
|
|
574
|
+
* Statuses a user may SET, defaulting to every {@link TASK_STATUSES} value.
|
|
575
|
+
*
|
|
576
|
+
* ★ A host that narrows the board's `columns` must narrow this too. The board
|
|
577
|
+
* renders one column per entry and filters by exact status, so a work item in
|
|
578
|
+
* a status with no column renders NOWHERE — setting it would lose the task.
|
|
579
|
+
* `TasksPageCore` derives this from `columns` for exactly that reason.
|
|
580
|
+
*
|
|
581
|
+
* The item's CURRENT status is always offered even when absent from this list,
|
|
582
|
+
* so opening a task that predates a narrowing never silently rewrites it.
|
|
583
|
+
*/
|
|
584
|
+
statuses?: TaskStatus[];
|
|
573
585
|
/** Default values applied on first render. */
|
|
574
586
|
defaultValues?: Partial<CreateTaskInput>;
|
|
575
587
|
/** Hide the form header (title + subtitle). */
|
|
@@ -595,7 +607,7 @@ interface CreateTaskCoreProps {
|
|
|
595
607
|
* Mirrors the TaskBoardCore contract: `workspaceId` from a prop or the
|
|
596
608
|
* PlanMagnetProvider context, `hiddenFields` for host-driven field suppression.
|
|
597
609
|
*/
|
|
598
|
-
declare function CreateTaskCore({ projectId: projectIdProp, assigneeOptions, hiddenFields, defaultValues, hideHeader, submitLabel, onCreated, onError, onCancel, className, workspaceId: workspaceIdProp, }: CreateTaskCoreProps): react.JSX.Element;
|
|
610
|
+
declare function CreateTaskCore({ projectId: projectIdProp, assigneeOptions, hiddenFields, statuses, defaultValues, hideHeader, submitLabel, onCreated, onError, onCancel, className, workspaceId: workspaceIdProp, }: CreateTaskCoreProps): react.JSX.Element;
|
|
599
611
|
|
|
600
612
|
interface CreateTaskProps extends CreateTaskCoreProps {
|
|
601
613
|
/** Workspace API gateway URL (URL mode). */
|
|
@@ -660,6 +672,18 @@ interface TaskListCoreProps {
|
|
|
660
672
|
/** Free-text search (server-side). */
|
|
661
673
|
search?: string;
|
|
662
674
|
/** Columns to render (order preserved). */
|
|
675
|
+
/**
|
|
676
|
+
* Statuses a user may SET, defaulting to every {@link TASK_STATUSES} value.
|
|
677
|
+
*
|
|
678
|
+
* ★ A host that narrows the board's `columns` must narrow this too. The board
|
|
679
|
+
* renders one column per entry and filters by exact status, so a work item in
|
|
680
|
+
* a status with no column renders NOWHERE — setting it would lose the task.
|
|
681
|
+
* `TasksPageCore` derives this from `columns` for exactly that reason.
|
|
682
|
+
*
|
|
683
|
+
* The item's CURRENT status is always offered even when absent from this list,
|
|
684
|
+
* so opening a task that predates a narrowing never silently rewrites it.
|
|
685
|
+
*/
|
|
686
|
+
statuses?: TaskStatus[];
|
|
663
687
|
columns?: TaskListColumn[];
|
|
664
688
|
/** Initial sort key. */
|
|
665
689
|
sortBy?: TaskListSort;
|
|
@@ -704,7 +728,7 @@ interface TaskListCoreProps {
|
|
|
704
728
|
* headers. Filters map to the server-side filter; sort is client-side.
|
|
705
729
|
* BYO-Apollo, semantic-token only, farm-free.
|
|
706
730
|
*/
|
|
707
|
-
declare function TaskListCore({ projectId, status, type, priority, assigneeId, search, columns, sortBy, sortDir, hideHeader, onSelect, resolveAssignee, linkSourceProduct, renderLinkIcon, limit, selectable, assigneeOptions, className, workspaceId: workspaceIdProp, }: TaskListCoreProps): react.JSX.Element;
|
|
731
|
+
declare function TaskListCore({ projectId, status, type, priority, assigneeId, search, columns, sortBy, sortDir, hideHeader, onSelect, resolveAssignee, linkSourceProduct, renderLinkIcon, limit, selectable, assigneeOptions, statuses, className, workspaceId: workspaceIdProp, }: TaskListCoreProps): react.JSX.Element;
|
|
708
732
|
|
|
709
733
|
interface TaskListProps extends TaskListCoreProps {
|
|
710
734
|
/** Workspace API gateway URL (URL mode). */
|
|
@@ -844,6 +868,18 @@ interface TaskDetailCoreProps {
|
|
|
844
868
|
readonly?: boolean;
|
|
845
869
|
/** Field names to hide. */
|
|
846
870
|
hiddenFields?: TaskDetailField[];
|
|
871
|
+
/**
|
|
872
|
+
* Statuses a user may SET, defaulting to every {@link TASK_STATUSES} value.
|
|
873
|
+
*
|
|
874
|
+
* ★ A host that narrows the board's `columns` must narrow this too. The board
|
|
875
|
+
* renders one column per entry and filters by exact status, so a work item in
|
|
876
|
+
* a status with no column renders NOWHERE — setting it would lose the task.
|
|
877
|
+
* `TasksPageCore` derives this from `columns` for exactly that reason.
|
|
878
|
+
*
|
|
879
|
+
* The item's CURRENT status is always offered even when absent from this list,
|
|
880
|
+
* so opening a task that predates a narrowing never silently rewrites it.
|
|
881
|
+
*/
|
|
882
|
+
statuses?: TaskStatus[];
|
|
847
883
|
/** Hide the header (key + title). */
|
|
848
884
|
hideHeader?: boolean;
|
|
849
885
|
/** Called with the updated work item after a successful save. */
|
|
@@ -894,7 +930,7 @@ interface TaskDetailCoreProps {
|
|
|
894
930
|
* edit. Fetches via `planmagnetWorkItem(id)`, saves via
|
|
895
931
|
* `planmagnetUpdateWorkItem`. BYO-Apollo, semantic-token only, farm-free.
|
|
896
932
|
*/
|
|
897
|
-
declare function TaskDetailCore({ id, readonly, hiddenFields, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, onOpenItem, onAddSubtask, commentsEntityType, currentActorId, onMention, className, }: TaskDetailCoreProps): react.JSX.Element;
|
|
933
|
+
declare function TaskDetailCore({ id, readonly, hiddenFields, statuses, hideHeader, onUpdated, onDeleted, onError, resolveAssignee, assigneeOptions, linkSourceProduct, renderLinkIcon, onOpenItem, onAddSubtask, commentsEntityType, currentActorId, onMention, className, }: TaskDetailCoreProps): react.JSX.Element;
|
|
898
934
|
|
|
899
935
|
interface TaskDetailProps extends TaskDetailCoreProps {
|
|
900
936
|
/** Workspace API gateway URL (URL mode). */
|
package/dist/index.js
CHANGED
|
@@ -1568,6 +1568,7 @@ function CreateTaskCore({
|
|
|
1568
1568
|
projectId: projectIdProp,
|
|
1569
1569
|
assigneeOptions,
|
|
1570
1570
|
hiddenFields,
|
|
1571
|
+
statuses,
|
|
1571
1572
|
defaultValues,
|
|
1572
1573
|
hideHeader,
|
|
1573
1574
|
submitLabel,
|
|
@@ -1577,6 +1578,7 @@ function CreateTaskCore({
|
|
|
1577
1578
|
className,
|
|
1578
1579
|
workspaceId: workspaceIdProp
|
|
1579
1580
|
}) {
|
|
1581
|
+
const statusOptions = statuses ?? TASK_STATUSES;
|
|
1580
1582
|
const ctx = usePlanMagnetContextSafe();
|
|
1581
1583
|
const workspaceId = workspaceIdProp ?? ctx?.workspaceId;
|
|
1582
1584
|
const projectId = projectIdProp ?? defaultValues?.projectId;
|
|
@@ -1721,7 +1723,7 @@ function CreateTaskCore({
|
|
|
1721
1723
|
className: cn(fieldClass, "capitalize"),
|
|
1722
1724
|
value: status,
|
|
1723
1725
|
onChange: (e) => setStatus(e.target.value),
|
|
1724
|
-
children:
|
|
1726
|
+
children: statusOptions.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: L.status[s] }, s))
|
|
1725
1727
|
}
|
|
1726
1728
|
)
|
|
1727
1729
|
] }),
|
|
@@ -1960,9 +1962,11 @@ function TaskListCore({
|
|
|
1960
1962
|
limit = 200,
|
|
1961
1963
|
selectable = false,
|
|
1962
1964
|
assigneeOptions,
|
|
1965
|
+
statuses,
|
|
1963
1966
|
className,
|
|
1964
1967
|
workspaceId: workspaceIdProp
|
|
1965
1968
|
}) {
|
|
1969
|
+
const statusOptions = statuses ?? TASK_STATUSES;
|
|
1966
1970
|
const ctx = usePlanMagnetContextSafe();
|
|
1967
1971
|
const workspaceId = workspaceIdProp ?? ctx?.workspaceId;
|
|
1968
1972
|
const { linksByItem } = useWorkItemLinks(workspaceId, linkSourceProduct);
|
|
@@ -2104,7 +2108,7 @@ function TaskListCore({
|
|
|
2104
2108
|
className: bulkFieldClass,
|
|
2105
2109
|
children: [
|
|
2106
2110
|
/* @__PURE__ */ jsx("option", { value: "", children: L.bulkSetStatus }),
|
|
2107
|
-
|
|
2111
|
+
statusOptions.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: L.status[s] }, s))
|
|
2108
2112
|
]
|
|
2109
2113
|
}
|
|
2110
2114
|
),
|
|
@@ -3523,6 +3527,7 @@ function TaskDetailCore({
|
|
|
3523
3527
|
id,
|
|
3524
3528
|
readonly,
|
|
3525
3529
|
hiddenFields,
|
|
3530
|
+
statuses,
|
|
3526
3531
|
hideHeader,
|
|
3527
3532
|
onUpdated,
|
|
3528
3533
|
onDeleted,
|
|
@@ -3574,6 +3579,8 @@ function TaskDetailCore({
|
|
|
3574
3579
|
const [description, setDescription] = useState("");
|
|
3575
3580
|
const [type, setType] = useState("TASK");
|
|
3576
3581
|
const [status, setStatus] = useState("BACKLOG");
|
|
3582
|
+
const allowedStatuses = statuses ?? TASK_STATUSES;
|
|
3583
|
+
const statusOptions = allowedStatuses.includes(status) ? allowedStatuses : [...allowedStatuses, status];
|
|
3577
3584
|
const [priority, setPriority] = useState("NONE");
|
|
3578
3585
|
const [assigneeId, setAssigneeId] = useState("");
|
|
3579
3586
|
const [dueDate, setDueDate] = useState("");
|
|
@@ -3890,7 +3897,7 @@ function TaskDetailCore({
|
|
|
3890
3897
|
className: cn(fieldClass3, "capitalize"),
|
|
3891
3898
|
value: status,
|
|
3892
3899
|
onChange: (e) => setStatus(e.target.value),
|
|
3893
|
-
children:
|
|
3900
|
+
children: statusOptions.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: L.status[s] }, s))
|
|
3894
3901
|
}
|
|
3895
3902
|
)
|
|
3896
3903
|
] }),
|
|
@@ -4362,6 +4369,7 @@ function TasksPageCore({
|
|
|
4362
4369
|
enableShortcuts,
|
|
4363
4370
|
className
|
|
4364
4371
|
}) {
|
|
4372
|
+
const allowedStatuses = columns?.map((c) => c.status);
|
|
4365
4373
|
const ctx = usePlanMagnetContextSafe();
|
|
4366
4374
|
const workspaceId = workspaceIdProp ?? ctx?.workspaceId;
|
|
4367
4375
|
const client = useApolloClient();
|
|
@@ -4602,6 +4610,7 @@ function TasksPageCore({
|
|
|
4602
4610
|
{
|
|
4603
4611
|
workspaceId,
|
|
4604
4612
|
projectId,
|
|
4613
|
+
statuses: allowedStatuses,
|
|
4605
4614
|
assigneeOptions,
|
|
4606
4615
|
hiddenFields,
|
|
4607
4616
|
defaultValues: createDefaults ?? void 0,
|
|
@@ -4614,6 +4623,7 @@ function TasksPageCore({
|
|
|
4614
4623
|
{
|
|
4615
4624
|
id: selectedId,
|
|
4616
4625
|
readonly,
|
|
4626
|
+
statuses: allowedStatuses,
|
|
4617
4627
|
hiddenFields,
|
|
4618
4628
|
resolveAssignee,
|
|
4619
4629
|
assigneeOptions,
|
|
@@ -4690,6 +4700,7 @@ function TasksPageCore({
|
|
|
4690
4700
|
{
|
|
4691
4701
|
workspaceId,
|
|
4692
4702
|
projectId: boardProjectId,
|
|
4703
|
+
statuses: allowedStatuses,
|
|
4693
4704
|
priority: listPriority,
|
|
4694
4705
|
type: listType,
|
|
4695
4706
|
search: search || void 0,
|