@burdenoff/planmagnet-fe-sdk 2026.704.1 → 2026.704.3

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 CHANGED
@@ -992,6 +992,12 @@ interface TasksPageCoreProps {
992
992
  currentActorId?: string;
993
993
  /** Host-provided translations for every UI string (English defaults otherwise). */
994
994
  labels?: PartialTaskLabels;
995
+ /**
996
+ * Open a specific work item's detail on mount / when this changes — e.g. a
997
+ * deep-link from the calendar (`/tasks?item=<id>`). Cleared internally when
998
+ * the user closes the drawer; pass a new value to re-open.
999
+ */
1000
+ openItemId?: string;
995
1001
  /**
996
1002
  * Header/title slot rendered ABOVE the toolbar. Pass a string for the default
997
1003
  * heading, or any node to fully own the title area. Omit for no title (e.g.
@@ -1016,7 +1022,7 @@ interface TasksPageCoreProps {
1016
1022
  * BYO-Apollo: reads the ambient `<ApolloProvider>` and takes `workspaceId` from
1017
1023
  * a prop or the PlanMagnetProvider context. Semantic tokens only, farm-free.
1018
1024
  */
1019
- declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, labels, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
1025
+ declare function TasksPageCore({ workspaceId: workspaceIdProp, projectId, boardProjectId, columns, readonly, hiddenFields, views, defaultView, resolveAssignee, linkSourceProduct, renderLinkIcon, assigneeOptions, currentActorId, labels, openItemId, header, onTaskSaved, createSurface, detailSurface, className, }: TasksPageCoreProps): react.JSX.Element;
1020
1026
 
1021
1027
  interface TasksPageProps extends TasksPageCoreProps {
1022
1028
  /** Workspace API gateway URL (URL mode). */
package/dist/index.js CHANGED
@@ -521,6 +521,12 @@ function parseDate(iso) {
521
521
  const d = parseISO(iso);
522
522
  return isValid(d) ? d : null;
523
523
  }
524
+ function toIsoDate(value) {
525
+ if (!value) return void 0;
526
+ const iso = /^\d{4}-\d{2}-\d{2}$/.test(value) ? `${value}T00:00:00.000Z` : value;
527
+ const d = new Date(iso);
528
+ return Number.isNaN(d.getTime()) ? void 0 : d.toISOString();
529
+ }
524
530
  function formatDueDate(iso) {
525
531
  const d = parseDate(iso);
526
532
  if (!d) return null;
@@ -1317,7 +1323,7 @@ function CreateTaskCore({
1317
1323
  ...hidden.has("priority") ? {} : { priority },
1318
1324
  ...hidden.has("description") || !description.trim() ? {} : { description: description.trim() },
1319
1325
  ...hidden.has("assignee") || !assigneeId.trim() ? {} : { assigneeId: assigneeId.trim() },
1320
- ...hidden.has("dueDate") || !dueDate.trim() ? {} : { dueDate },
1326
+ ...hidden.has("dueDate") || !dueDate.trim() ? {} : { dueDate: toIsoDate(dueDate) },
1321
1327
  ...hidden.has("labels") || parsedLabels.length === 0 ? {} : { labels: parsedLabels },
1322
1328
  ...hidden.has("storyPoints") || parsedPoints == null || Number.isNaN(parsedPoints) ? {} : { storyPoints: parsedPoints }
1323
1329
  };
@@ -2474,7 +2480,7 @@ function TaskDetailCore({
2474
2480
  ...hidden.has("status") ? {} : { status },
2475
2481
  ...hidden.has("priority") ? {} : { priority },
2476
2482
  ...hidden.has("assignee") ? {} : { assigneeId: assigneeId.trim() },
2477
- ...hidden.has("dueDate") ? {} : { dueDate: dueDate || void 0 },
2483
+ ...hidden.has("dueDate") ? {} : { dueDate: toIsoDate(dueDate) },
2478
2484
  ...hidden.has("labels") ? {} : { labels: parsedLabels },
2479
2485
  ...hidden.has("storyPoints") || parsedPoints == null || Number.isNaN(parsedPoints) ? {} : { storyPoints: parsedPoints }
2480
2486
  };
@@ -2818,6 +2824,7 @@ function TasksPageCore({
2818
2824
  assigneeOptions,
2819
2825
  currentActorId,
2820
2826
  labels,
2827
+ openItemId,
2821
2828
  header,
2822
2829
  onTaskSaved,
2823
2830
  createSurface = "modal",
@@ -2835,6 +2842,9 @@ function TasksPageCore({
2835
2842
  const [mine, setMine] = useState(false);
2836
2843
  const [creating, setCreating] = useState(false);
2837
2844
  const [selectedId, setSelectedId] = useState(null);
2845
+ useEffect(() => {
2846
+ if (openItemId) setSelectedId(openItemId);
2847
+ }, [openItemId]);
2838
2848
  const refetchBoard = useCallback(() => {
2839
2849
  void client.refetchQueries({ include: [LIST_WORK_ITEMS] }).catch(() => {
2840
2850
  });