@burdenoff/microfe-planmagnet 2026.1126.1 → 2026.1127.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.
@@ -2798,6 +2798,24 @@ export type DeleteDependencyMutationVariables = Exact<{
2798
2798
  export type DeleteDependencyMutation = {
2799
2799
  planmagnetDeleteDependency: boolean;
2800
2800
  };
2801
+ export type WorkItemIssueLinkCreateMutationVariables = Exact<{
2802
+ input: Types.PlanmagnetCreateWorkItemLinkInput;
2803
+ }>;
2804
+ export type WorkItemIssueLinkCreateMutation = {
2805
+ planmagnetCreateWorkItemLinkRecord: {
2806
+ id: string;
2807
+ };
2808
+ };
2809
+ export type WorkItemIssueLinkUpdateMutationVariables = Exact<{
2810
+ id: string | number;
2811
+ input: Types.PlanmagnetUpdateWorkItemLinkInput;
2812
+ }>;
2813
+ export type WorkItemIssueLinkUpdateMutation = {
2814
+ planmagnetUpdateWorkItemLinkRecord: {
2815
+ id: string;
2816
+ relationType: Types.WorkItemLinkRelation;
2817
+ };
2818
+ };
2801
2819
  export type AdminPlanmagnetQuotaQueryVariables = Exact<{
2802
2820
  workspaceId: string | number;
2803
2821
  }>;
@@ -5443,6 +5461,8 @@ export declare const AssignWorkItemDocument: DocumentNode<AssignWorkItemMutation
5443
5461
  export declare const CreateDependencyDocument: DocumentNode<CreateDependencyMutation, CreateDependencyMutationVariables>;
5444
5462
  export declare const UpdateDependencyDocument: DocumentNode<UpdateDependencyMutation, UpdateDependencyMutationVariables>;
5445
5463
  export declare const DeleteDependencyDocument: DocumentNode<DeleteDependencyMutation, DeleteDependencyMutationVariables>;
5464
+ export declare const WorkItemIssueLinkCreateDocument: DocumentNode<WorkItemIssueLinkCreateMutation, WorkItemIssueLinkCreateMutationVariables>;
5465
+ export declare const WorkItemIssueLinkUpdateDocument: DocumentNode<WorkItemIssueLinkUpdateMutation, WorkItemIssueLinkUpdateMutationVariables>;
5446
5466
  export declare const AdminPlanmagnetQuotaDocument: DocumentNode<AdminPlanmagnetQuotaQuery, AdminPlanmagnetQuotaQueryVariables>;
5447
5467
  export declare const AdminPlanmagnetProjectsDocument: DocumentNode<AdminPlanmagnetProjectsQuery, AdminPlanmagnetProjectsQueryVariables>;
5448
5468
  export declare const AdminPlanmagnetAutomationRuleAuditDocument: DocumentNode<AdminPlanmagnetAutomationRuleAuditQuery, AdminPlanmagnetAutomationRuleAuditQueryVariables>;
@@ -90,6 +90,172 @@ var e = {
90
90
  }
91
91
  }]
92
92
  }, t = {
93
+ kind: "Document",
94
+ definitions: [{
95
+ kind: "OperationDefinition",
96
+ operation: "mutation",
97
+ name: {
98
+ kind: "Name",
99
+ value: "WorkItemIssueLinkCreate"
100
+ },
101
+ variableDefinitions: [{
102
+ kind: "VariableDefinition",
103
+ variable: {
104
+ kind: "Variable",
105
+ name: {
106
+ kind: "Name",
107
+ value: "input"
108
+ }
109
+ },
110
+ type: {
111
+ kind: "NonNullType",
112
+ type: {
113
+ kind: "NamedType",
114
+ name: {
115
+ kind: "Name",
116
+ value: "PlanmagnetCreateWorkItemLinkInput"
117
+ }
118
+ }
119
+ }
120
+ }],
121
+ selectionSet: {
122
+ kind: "SelectionSet",
123
+ selections: [{
124
+ kind: "Field",
125
+ name: {
126
+ kind: "Name",
127
+ value: "planmagnetCreateWorkItemLinkRecord"
128
+ },
129
+ arguments: [{
130
+ kind: "Argument",
131
+ name: {
132
+ kind: "Name",
133
+ value: "input"
134
+ },
135
+ value: {
136
+ kind: "Variable",
137
+ name: {
138
+ kind: "Name",
139
+ value: "input"
140
+ }
141
+ }
142
+ }],
143
+ selectionSet: {
144
+ kind: "SelectionSet",
145
+ selections: [{
146
+ kind: "Field",
147
+ name: {
148
+ kind: "Name",
149
+ value: "id"
150
+ }
151
+ }]
152
+ }
153
+ }]
154
+ }
155
+ }]
156
+ }, n = {
157
+ kind: "Document",
158
+ definitions: [{
159
+ kind: "OperationDefinition",
160
+ operation: "mutation",
161
+ name: {
162
+ kind: "Name",
163
+ value: "WorkItemIssueLinkUpdate"
164
+ },
165
+ variableDefinitions: [{
166
+ kind: "VariableDefinition",
167
+ variable: {
168
+ kind: "Variable",
169
+ name: {
170
+ kind: "Name",
171
+ value: "id"
172
+ }
173
+ },
174
+ type: {
175
+ kind: "NonNullType",
176
+ type: {
177
+ kind: "NamedType",
178
+ name: {
179
+ kind: "Name",
180
+ value: "ID"
181
+ }
182
+ }
183
+ }
184
+ }, {
185
+ kind: "VariableDefinition",
186
+ variable: {
187
+ kind: "Variable",
188
+ name: {
189
+ kind: "Name",
190
+ value: "input"
191
+ }
192
+ },
193
+ type: {
194
+ kind: "NonNullType",
195
+ type: {
196
+ kind: "NamedType",
197
+ name: {
198
+ kind: "Name",
199
+ value: "PlanmagnetUpdateWorkItemLinkInput"
200
+ }
201
+ }
202
+ }
203
+ }],
204
+ selectionSet: {
205
+ kind: "SelectionSet",
206
+ selections: [{
207
+ kind: "Field",
208
+ name: {
209
+ kind: "Name",
210
+ value: "planmagnetUpdateWorkItemLinkRecord"
211
+ },
212
+ arguments: [{
213
+ kind: "Argument",
214
+ name: {
215
+ kind: "Name",
216
+ value: "id"
217
+ },
218
+ value: {
219
+ kind: "Variable",
220
+ name: {
221
+ kind: "Name",
222
+ value: "id"
223
+ }
224
+ }
225
+ }, {
226
+ kind: "Argument",
227
+ name: {
228
+ kind: "Name",
229
+ value: "input"
230
+ },
231
+ value: {
232
+ kind: "Variable",
233
+ name: {
234
+ kind: "Name",
235
+ value: "input"
236
+ }
237
+ }
238
+ }],
239
+ selectionSet: {
240
+ kind: "SelectionSet",
241
+ selections: [{
242
+ kind: "Field",
243
+ name: {
244
+ kind: "Name",
245
+ value: "id"
246
+ }
247
+ }, {
248
+ kind: "Field",
249
+ name: {
250
+ kind: "Name",
251
+ value: "relationType"
252
+ }
253
+ }]
254
+ }
255
+ }]
256
+ }
257
+ }]
258
+ }, r = {
93
259
  kind: "Document",
94
260
  definitions: [{
95
261
  kind: "OperationDefinition",
@@ -204,7 +370,7 @@ var e = {
204
370
  }]
205
371
  }
206
372
  }]
207
- }, n = {
373
+ }, i = {
208
374
  kind: "Document",
209
375
  definitions: [{
210
376
  kind: "OperationDefinition",
@@ -403,7 +569,7 @@ var e = {
403
569
  }]
404
570
  }
405
571
  }]
406
- }, r = {
572
+ }, a = {
407
573
  kind: "Document",
408
574
  definitions: [{
409
575
  kind: "OperationDefinition",
@@ -611,4 +777,4 @@ var e = {
611
777
  }
612
778
  }]
613
779
  };
614
- export { e as AdminArchiveProjectDocument, r as AdminPlanmagnetAutomationRuleAuditDocument, n as AdminPlanmagnetProjectsDocument, t as AdminPlanmagnetQuotaDocument };
780
+ export { e as AdminArchiveProjectDocument, a as AdminPlanmagnetAutomationRuleAuditDocument, i as AdminPlanmagnetProjectsDocument, r as AdminPlanmagnetQuotaDocument, t as WorkItemIssueLinkCreateDocument, n as WorkItemIssueLinkUpdateDocument };
@@ -881,6 +881,8 @@ export type Mutation = {
881
881
  planmagnetCreateCustomerSatisfactionResponse: PlanmagnetCustomerSatisfactionResponse;
882
882
  /** Create a new dependency between work items */
883
883
  planmagnetCreateDependency: WorkItemDependency;
884
+ /** Create a dependency record between work items. */
885
+ planmagnetCreateDependencyRecord: PlanmagnetWorkItemDependency;
884
886
  planmagnetCreateDoc: PlanmagnetDoc;
885
887
  /** Create a new external sync configuration */
886
888
  planmagnetCreateExternalSync: ExternalSync;
@@ -948,6 +950,8 @@ export type Mutation = {
948
950
  planmagnetCreateWebhookSubscription: PlanmagnetWebhookSubscriptionWithSecret;
949
951
  /** Create a new work item */
950
952
  planmagnetCreateWorkItem: WorkItem;
953
+ /** Link a work item and return the prefixed federation type. */
954
+ planmagnetCreateWorkItemLinkRecord: PlanmagnetWorkItemLink;
951
955
  /**
952
956
  * Accept or reject an OPEN suggestion — the doc's `update` tier, because accepting one is a real edit to the doc
953
957
  * (a new revision, through the same write path `planmagnetUpdateDoc` uses, including its lock rule). Refused
@@ -1522,6 +1526,8 @@ export type Mutation = {
1522
1526
  planmagnetUpdateCustomerSatisfactionResponse: PlanmagnetCustomerSatisfactionResponse;
1523
1527
  /** Update an existing dependency */
1524
1528
  planmagnetUpdateDependency: WorkItemDependency;
1529
+ /** Update an existing dependency record. */
1530
+ planmagnetUpdateDependencyRecord: PlanmagnetWorkItemDependency;
1525
1531
  planmagnetUpdateDoc: PlanmagnetDoc;
1526
1532
  /** Update an expense */
1527
1533
  planmagnetUpdateExpense: BudgetExpense;
@@ -1596,6 +1602,8 @@ export type Mutation = {
1596
1602
  planmagnetUpdateWorkItem: WorkItem;
1597
1603
  /** Update an existing work item link */
1598
1604
  planmagnetUpdateWorkItemLink: WorkItemLink;
1605
+ /** Update a work item link and return the prefixed federation type. */
1606
+ planmagnetUpdateWorkItemLinkRecord: PlanmagnetWorkItemLink;
1599
1607
  /** Vote on a feature request */
1600
1608
  planmagnetVoteOnFeature: FeatureVote;
1601
1609
  /**
@@ -1758,6 +1766,9 @@ export type MutationPlanmagnetCreateCustomerSatisfactionResponseArgs = {
1758
1766
  export type MutationPlanmagnetCreateDependencyArgs = {
1759
1767
  input: PlanmagnetCreateDependencyInput;
1760
1768
  };
1769
+ export type MutationPlanmagnetCreateDependencyRecordArgs = {
1770
+ input: PlanmagnetCreateDependencyInput;
1771
+ };
1761
1772
  export type MutationPlanmagnetCreateDocArgs = {
1762
1773
  input: PlanmagnetCreateDocInput;
1763
1774
  };
@@ -1864,6 +1875,9 @@ export type MutationPlanmagnetCreateWebhookSubscriptionArgs = {
1864
1875
  export type MutationPlanmagnetCreateWorkItemArgs = {
1865
1876
  input: PlanmagnetCreateWorkItemInput;
1866
1877
  };
1878
+ export type MutationPlanmagnetCreateWorkItemLinkRecordArgs = {
1879
+ input: PlanmagnetCreateWorkItemLinkInput;
1880
+ };
1867
1881
  export type MutationPlanmagnetDecideDocSuggestionArgs = {
1868
1882
  accept: Scalars['Boolean']['input'];
1869
1883
  id: Scalars['ID']['input'];
@@ -2421,6 +2435,10 @@ export type MutationPlanmagnetUpdateDependencyArgs = {
2421
2435
  id: Scalars['ID']['input'];
2422
2436
  input: PlanmagnetUpdateDependencyInput;
2423
2437
  };
2438
+ export type MutationPlanmagnetUpdateDependencyRecordArgs = {
2439
+ id: Scalars['ID']['input'];
2440
+ input: PlanmagnetUpdateDependencyInput;
2441
+ };
2424
2442
  export type MutationPlanmagnetUpdateDocArgs = {
2425
2443
  id: Scalars['ID']['input'];
2426
2444
  input: PlanmagnetUpdateDocInput;
@@ -2557,6 +2575,10 @@ export type MutationPlanmagnetUpdateWorkItemLinkArgs = {
2557
2575
  id: Scalars['ID']['input'];
2558
2576
  input: PlanmagnetUpdateWorkItemLinkInput;
2559
2577
  };
2578
+ export type MutationPlanmagnetUpdateWorkItemLinkRecordArgs = {
2579
+ id: Scalars['ID']['input'];
2580
+ input: PlanmagnetUpdateWorkItemLinkInput;
2581
+ };
2560
2582
  export type MutationPlanmagnetVoteOnFeatureArgs = {
2561
2583
  featureRequestId: Scalars['ID']['input'];
2562
2584
  input?: InputMaybe<PlanmagnetVoteOnFeatureInput>;
@@ -9441,12 +9463,60 @@ export type PlanmagnetWorkItemCounts = {
9441
9463
  /** Every matching work item */
9442
9464
  total: Scalars['Int']['output'];
9443
9465
  };
9466
+ /** A work item dependency with the PlanMagnet federation name. */
9467
+ export type PlanmagnetWorkItemDependency = {
9468
+ __typename?: 'PlanmagnetWorkItemDependency';
9469
+ /** Creation timestamp */
9470
+ createdAt: Scalars['DateTime']['output'];
9471
+ /** Actor who created this dependency */
9472
+ createdBy: Scalars['String']['output'];
9473
+ /** Optional description */
9474
+ description?: Maybe<Scalars['String']['output']>;
9475
+ /** Unique identifier */
9476
+ id: Scalars['ID']['output'];
9477
+ /**
9478
+ * Offset applied to the constraint, in minutes. Negative means lead (overlap)
9479
+ * rather than lag. The column has always existed as `lagDays`; the SDL never
9480
+ * exposed it, so a lagged constraint could not be expressed at all.
9481
+ */
9482
+ lagMinutes?: Maybe<Scalars['Int']['output']>;
9483
+ /** Arbitrary metadata */
9484
+ metadata?: Maybe<Scalars['JSON']['output']>;
9485
+ /** Actor on whose behalf this was created */
9486
+ onBehalfOf?: Maybe<Scalars['String']['output']>;
9487
+ /** The constraining work item */
9488
+ predecessor?: Maybe<WorkItem>;
9489
+ /**
9490
+ * The work item that constrains the other. Renamed from `sourceWorkItemId`:
9491
+ * with `type` now purely a scheduling relationship, source/target read as a
9492
+ * generic graph edge while predecessor/successor state the actual meaning.
9493
+ */
9494
+ predecessorId: Scalars['String']['output'];
9495
+ /** Current status */
9496
+ status: DependencyStatus;
9497
+ /** The constrained work item */
9498
+ successor?: Maybe<WorkItem>;
9499
+ /** The work item whose schedule is constrained. Renamed from `targetWorkItemId`. */
9500
+ successorId: Scalars['String']['output'];
9501
+ /** Type of dependency */
9502
+ type: DependencyType;
9503
+ /** Last update timestamp */
9504
+ updatedAt: Scalars['DateTime']['output'];
9505
+ /** Associated workspace ID */
9506
+ workspaceId: Scalars['String']['output'];
9507
+ };
9444
9508
  export type PlanmagnetWorkItemDependencyList = {
9445
9509
  __typename?: 'PlanmagnetWorkItemDependencyList';
9446
9510
  items: Array<WorkItemDependency>;
9447
9511
  pageInfo: PlanmagnetPageInfo;
9448
9512
  totalCount: Scalars['Int']['output'];
9449
9513
  };
9514
+ export type PlanmagnetWorkItemDependencyRecordList = {
9515
+ __typename?: 'PlanmagnetWorkItemDependencyRecordList';
9516
+ items: Array<PlanmagnetWorkItemDependency>;
9517
+ pageInfo: PlanmagnetPageInfo;
9518
+ totalCount: Scalars['Int']['output'];
9519
+ };
9450
9520
  /**
9451
9521
  * A thin, workspace-scoped real-time notification that a work item changed
9452
9522
  * (PDM-11). Carries identifiers and the names of the fields that changed —
@@ -9513,6 +9583,40 @@ export type PlanmagnetWorkItemIssueLink = {
9513
9583
  /** The other work item */
9514
9584
  workItem?: Maybe<WorkItem>;
9515
9585
  };
9586
+ /** A work item link with the PlanMagnet federation name. */
9587
+ export type PlanmagnetWorkItemLink = {
9588
+ __typename?: 'PlanmagnetWorkItemLink';
9589
+ /** Creation timestamp */
9590
+ createdAt: Scalars['DateTime']['output'];
9591
+ /** Actor who created this link */
9592
+ createdBy: Scalars['String']['output'];
9593
+ /** Deep link to the entity captured at link time */
9594
+ deepLinkSnapshot?: Maybe<Scalars['String']['output']>;
9595
+ /** Human label captured at link time; shown if the entity can't be resolved */
9596
+ displayNameSnapshot?: Maybe<Scalars['String']['output']>;
9597
+ /** Primary key of the linked entity within the source product */
9598
+ entityId: Scalars['String']['output'];
9599
+ /** Entity type within the source product, e.g. "FIELD" | "CROP" | "ANIMAL" */
9600
+ entityType: Scalars['String']['output'];
9601
+ /** Unique identifier */
9602
+ id: Scalars['ID']['output'];
9603
+ /** Arbitrary metadata */
9604
+ metadata?: Maybe<Scalars['JSON']['output']>;
9605
+ /** Actor on whose behalf this was created */
9606
+ onBehalfOf?: Maybe<Scalars['String']['output']>;
9607
+ /** Semantic of the link */
9608
+ relationType: WorkItemLinkRelation;
9609
+ /** Owning product of the linked entity, e.g. "healthybowl" */
9610
+ sourceProduct: Scalars['String']['output'];
9611
+ /** Last update timestamp */
9612
+ updatedAt: Scalars['DateTime']['output'];
9613
+ /** Linked work item */
9614
+ workItem?: Maybe<WorkItem>;
9615
+ /** Linked work item ID */
9616
+ workItemId: Scalars['String']['output'];
9617
+ /** Associated workspace ID */
9618
+ workspaceId: Scalars['String']['output'];
9619
+ };
9516
9620
  export type PlanmagnetWorkItemLinkFilter = {
9517
9621
  entityId?: InputMaybe<Scalars['String']['input']>;
9518
9622
  entityType?: InputMaybe<Scalars['String']['input']>;
@@ -9526,6 +9630,12 @@ export type PlanmagnetWorkItemLinkList = {
9526
9630
  pageInfo: PlanmagnetPageInfo;
9527
9631
  totalCount: Scalars['Int']['output'];
9528
9632
  };
9633
+ export type PlanmagnetWorkItemLinkRecordList = {
9634
+ __typename?: 'PlanmagnetWorkItemLinkRecordList';
9635
+ items: Array<PlanmagnetWorkItemLink>;
9636
+ pageInfo: PlanmagnetPageInfo;
9637
+ totalCount: Scalars['Int']['output'];
9638
+ };
9529
9639
  export type PlanmagnetWorkItemList = {
9530
9640
  __typename?: 'PlanmagnetWorkItemList';
9531
9641
  items: Array<WorkItem>;
@@ -10046,6 +10156,10 @@ export type Query = {
10046
10156
  * an empty array when the graph is acyclic.
10047
10157
  */
10048
10158
  planmagnetDependencyCycles: Array<PlanmagnetDependencyCycle>;
10159
+ /** Get a dependency record by ID. */
10160
+ planmagnetDependencyRecord?: Maybe<PlanmagnetWorkItemDependency>;
10161
+ /** List dependency records in a workspace. */
10162
+ planmagnetDependencyRecords: PlanmagnetWorkItemDependencyRecordList;
10049
10163
  planmagnetDoc?: Maybe<PlanmagnetDoc>;
10050
10164
  /**
10051
10165
  * Top-level comments on a doc, oldest first, cursor-paged; each carries its own replies (CWF-12, bounded — see
@@ -10444,6 +10558,10 @@ export type Query = {
10444
10558
  planmagnetWorkItemIssueLinks: Array<PlanmagnetWorkItemIssueLink>;
10445
10559
  /** Get a single work item link by ID */
10446
10560
  planmagnetWorkItemLink?: Maybe<WorkItemLink>;
10561
+ /** Get a single work item link using the prefixed federation type. */
10562
+ planmagnetWorkItemLinkRecord?: Maybe<PlanmagnetWorkItemLink>;
10563
+ /** List work item links using the prefixed federation type. */
10564
+ planmagnetWorkItemLinkRecords: PlanmagnetWorkItemLinkRecordList;
10447
10565
  /** List work item links in a workspace (filter by work item or source entity) */
10448
10566
  planmagnetWorkItemLinks: PlanmagnetWorkItemLinkList;
10449
10567
  /** List work items in a workspace */
@@ -10605,6 +10723,14 @@ export type QueryPlanmagnetDependencyCyclesArgs = {
10605
10723
  projectId?: InputMaybe<Scalars['ID']['input']>;
10606
10724
  workspaceId: Scalars['ID']['input'];
10607
10725
  };
10726
+ export type QueryPlanmagnetDependencyRecordArgs = {
10727
+ id: Scalars['ID']['input'];
10728
+ };
10729
+ export type QueryPlanmagnetDependencyRecordsArgs = {
10730
+ filter?: InputMaybe<PlanmagnetDependencyFilter>;
10731
+ pagination?: InputMaybe<PlanmagnetPaginationInput>;
10732
+ workspaceId: Scalars['ID']['input'];
10733
+ };
10608
10734
  export type QueryPlanmagnetDocArgs = {
10609
10735
  id: Scalars['ID']['input'];
10610
10736
  };
@@ -11070,6 +11196,14 @@ export type QueryPlanmagnetWorkItemIssueLinksArgs = {
11070
11196
  export type QueryPlanmagnetWorkItemLinkArgs = {
11071
11197
  id: Scalars['ID']['input'];
11072
11198
  };
11199
+ export type QueryPlanmagnetWorkItemLinkRecordArgs = {
11200
+ id: Scalars['ID']['input'];
11201
+ };
11202
+ export type QueryPlanmagnetWorkItemLinkRecordsArgs = {
11203
+ filter?: InputMaybe<PlanmagnetWorkItemLinkFilter>;
11204
+ pagination?: InputMaybe<PlanmagnetPaginationInput>;
11205
+ workspaceId: Scalars['ID']['input'];
11206
+ };
11073
11207
  export type QueryPlanmagnetWorkItemLinksArgs = {
11074
11208
  filter?: InputMaybe<PlanmagnetWorkItemLinkFilter>;
11075
11209
  pagination?: InputMaybe<PlanmagnetPaginationInput>;
@@ -11737,6 +11871,8 @@ export type WorkItem = {
11737
11871
  deletedAt?: Maybe<Scalars['DateTime']['output']>;
11738
11872
  /** Dependencies where this item is the source */
11739
11873
  dependencies: Array<WorkItemDependency>;
11874
+ /** Scheduling dependencies with PlanMagnet federation names. */
11875
+ dependencyRecords: Array<PlanmagnetWorkItemDependency>;
11740
11876
  /** Detailed description */
11741
11877
  description?: Maybe<Scalars['String']['output']>;
11742
11878
  /**
@@ -0,0 +1,5 @@
1
+ // src/generated/wspace-types.ts
2
+ var e = /* @__PURE__ */ function(e) {
3
+ return e.Affects = "AFFECTS", e.BlockedBy = "BLOCKED_BY", e.Blocks = "BLOCKS", e.CausedBy = "CAUSED_BY", e.Causes = "CAUSES", e.DuplicatedBy = "DUPLICATED_BY", e.Duplicates = "DUPLICATES", e.Inspects = "INSPECTS", e.Produces = "PRODUCES", e.RelatedTo = "RELATED_TO", e.WorksOn = "WORKS_ON", e;
4
+ }({});
5
+ export { e as WorkItemLinkRelation };
@@ -1,13 +1,15 @@
1
- import { isForbidden as e } from "../utils/graphqlErrors.js";
2
- import { useState as t } from "react";
3
- import { CalendarRange as n } from "lucide-react";
4
- import { gql as r } from "@apollo/client";
5
- import { useQuery as i } from "@apollo/client/react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- import { Card as s, CardContent as c, CardHeader as l, CardTitle as u, Checkbox as d } from "@burdenoff/fe-libs/ui";
8
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
1
+ import { resolvePlanMagnetPath as e, usePlanMagnet as t, usePlanMagnetNavigate as n } from "../providers/PlanMagnetProvider.js";
2
+ import { isForbidden as r } from "../utils/graphqlErrors.js";
3
+ import { detailPath as i } from "../utils/rowNavigation.js";
4
+ import { useState as a } from "react";
5
+ import { CalendarRange as o } from "lucide-react";
6
+ import { gql as s } from "@apollo/client";
7
+ import { useQuery as c } from "@apollo/client/react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ import { Card as d, CardContent as f, CardHeader as p, CardTitle as m, Checkbox as h } from "@burdenoff/fe-libs/ui";
10
+ import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
11
  // src/planmagnet/forecast/DeliveryForecastCard.tsx
10
- var p = r`
12
+ var _ = s`
11
13
  query PlanmagnetDeliveryForecast(
12
14
  $workspaceId: ID!
13
15
  $projectId: ID!
@@ -40,7 +42,7 @@ var p = r`
40
42
  }
41
43
  }
42
44
  `;
43
- function m(e) {
45
+ function v(e) {
44
46
  return new Date(e).toLocaleDateString(void 0, {
45
47
  timeZone: "UTC",
46
48
  year: "numeric",
@@ -48,158 +50,165 @@ function m(e) {
48
50
  day: "numeric"
49
51
  });
50
52
  }
51
- function h({ workspaceId: r, projectId: h, sprintId: g, sprintName: _ }) {
52
- let { t: v } = f(), [y, b] = t(!1), x = y && !!g, { data: S, loading: C, error: w } = i(p, {
53
+ function y({ workspaceId: s, projectId: y, sprintId: b, sprintName: x }) {
54
+ let { t: S } = g(), { basePath: C } = t(), w = n(), [T, E] = a(!1), D = T && !!b, { data: O, loading: k, error: A } = c(_, {
53
55
  variables: {
54
- workspaceId: r,
55
- projectId: h,
56
- scope: x && g ? { sprintId: g } : void 0
56
+ workspaceId: s,
57
+ projectId: y,
58
+ scope: D && b ? { sprintId: b } : void 0
57
59
  },
58
- skip: !r || !h
59
- }), T = S?.planmagnetForecastDelivery;
60
- return /* @__PURE__ */ o(s, {
60
+ skip: !s || !y
61
+ }), j = O?.planmagnetForecastDelivery;
62
+ return /* @__PURE__ */ u(d, {
61
63
  "data-testid": "forecast-card",
62
- children: [/* @__PURE__ */ o(l, { children: [
63
- /* @__PURE__ */ o(u, {
64
+ children: [/* @__PURE__ */ u(p, { children: [
65
+ /* @__PURE__ */ u(m, {
64
66
  className: "flex items-center gap-2",
65
- children: [/* @__PURE__ */ a(n, { className: "h-4 w-4" }), v("planmagnet.forecast.delivery.title", "Delivery forecast")]
67
+ children: [/* @__PURE__ */ l(o, { className: "h-4 w-4" }), S("planmagnet.forecast.delivery.title", "Delivery forecast")]
66
68
  }),
67
- /* @__PURE__ */ a("p", {
69
+ /* @__PURE__ */ l("p", {
68
70
  className: "text-xs text-muted-foreground",
69
- children: x ? v("planmagnet.forecast.delivery.subtitleSprint", "For the open items of {{sprint}} only.", { sprint: _ ?? v("planmagnet.forecast.delivery.thisSprint", "this sprint") }) : v("planmagnet.forecast.delivery.subtitle", "For this project's own open, estimated work items.")
71
+ children: D ? S("planmagnet.forecast.delivery.subtitleSprint", "For the open items of {{sprint}} only.", { sprint: x ?? S("planmagnet.forecast.delivery.thisSprint", "this sprint") }) : S("planmagnet.forecast.delivery.subtitle", "For this project's own open, estimated work items.")
70
72
  }),
71
- g && /* @__PURE__ */ o("label", {
72
- htmlFor: `forecast-scope-sprint-${h}`,
73
+ b && /* @__PURE__ */ u("label", {
74
+ htmlFor: `forecast-scope-sprint-${y}`,
73
75
  className: "flex items-center gap-2 pt-1 text-xs font-normal text-muted-foreground",
74
- children: [/* @__PURE__ */ a(d, {
75
- id: `forecast-scope-sprint-${h}`,
76
- checked: y,
77
- onCheckedChange: (e) => b(e === !0)
78
- }), v("planmagnet.forecast.delivery.scopeToggle", "Only this sprint's items ({{sprint}})", { sprint: _ ?? v("planmagnet.forecast.delivery.thisSprint", "this sprint") })]
76
+ children: [/* @__PURE__ */ l(h, {
77
+ id: `forecast-scope-sprint-${y}`,
78
+ checked: T,
79
+ onCheckedChange: (e) => E(e === !0)
80
+ }), S("planmagnet.forecast.delivery.scopeToggle", "Only this sprint's items ({{sprint}})", { sprint: x ?? S("planmagnet.forecast.delivery.thisSprint", "this sprint") })]
79
81
  })
80
- ] }), /* @__PURE__ */ a(c, { children: h ? C && !S ? /* @__PURE__ */ a("div", {
82
+ ] }), /* @__PURE__ */ l(f, { children: y ? k && !O ? /* @__PURE__ */ l("div", {
81
83
  className: "flex justify-center py-8",
82
- children: /* @__PURE__ */ a("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
83
- }) : w ? /* @__PURE__ */ a("p", {
84
+ children: /* @__PURE__ */ l("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
85
+ }) : A ? /* @__PURE__ */ l("p", {
84
86
  className: "text-sm text-status-error-text",
85
- children: e(w) ? v("planmagnet.forecast.delivery.forbidden", "You do not have access to the delivery forecast for this project.") : `${v("planmagnet.forecast.delivery.error", "Delivery forecast could not be loaded")}: ${w.message}`
86
- }) : T ? T.insufficientHistory ? /* @__PURE__ */ o("div", {
87
+ children: r(A) ? S("planmagnet.forecast.delivery.forbidden", "You do not have access to the delivery forecast for this project.") : `${S("planmagnet.forecast.delivery.error", "Delivery forecast could not be loaded")}: ${A.message}`
88
+ }) : j ? j.insufficientHistory ? /* @__PURE__ */ u("div", {
87
89
  className: "space-y-2",
88
90
  "data-testid": "forecast-insufficient",
89
- children: [/* @__PURE__ */ a("p", {
91
+ children: [/* @__PURE__ */ l("p", {
90
92
  className: "text-sm text-muted-foreground",
91
- children: T.reason ?? v("planmagnet.forecast.delivery.insufficientFallback", "Not enough completed-sprint history yet to forecast a delivery date.")
92
- }), /* @__PURE__ */ a("p", {
93
+ children: j.reason ?? S("planmagnet.forecast.delivery.insufficientFallback", "Not enough completed-sprint history yet to forecast a delivery date.")
94
+ }), /* @__PURE__ */ l("p", {
93
95
  className: "text-xs text-muted-foreground",
94
- children: T.confidenceNote
96
+ children: j.confidenceNote
95
97
  })]
96
- }) : /* @__PURE__ */ o("div", {
98
+ }) : /* @__PURE__ */ u("div", {
97
99
  className: "space-y-4",
98
100
  children: [
99
- /* @__PURE__ */ o("dl", {
101
+ /* @__PURE__ */ u("dl", {
100
102
  className: "grid grid-cols-3 gap-3 text-center",
101
103
  "data-testid": "forecast-dates",
102
104
  children: [
103
- /* @__PURE__ */ o("div", {
105
+ /* @__PURE__ */ u("div", {
104
106
  className: "rounded-md border p-2.5",
105
107
  children: [
106
- /* @__PURE__ */ a("dt", {
108
+ /* @__PURE__ */ l("dt", {
107
109
  className: "text-xs text-muted-foreground",
108
- children: v("planmagnet.forecast.delivery.p50Label", "Likely by (p50)")
110
+ children: S("planmagnet.forecast.delivery.p50Label", "Likely by (p50)")
109
111
  }),
110
- /* @__PURE__ */ a("dd", {
112
+ /* @__PURE__ */ l("dd", {
111
113
  className: "mt-1 text-sm font-semibold",
112
- children: T.dates ? m(T.dates.p50) : "—"
114
+ children: j.dates ? v(j.dates.p50) : "—"
113
115
  }),
114
- /* @__PURE__ */ a("dd", {
116
+ /* @__PURE__ */ l("dd", {
115
117
  className: "text-xs text-muted-foreground",
116
- children: T.sprintsNeeded ? v("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: T.sprintsNeeded.p50 }) : "—"
118
+ children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p50 }) : "—"
117
119
  })
118
120
  ]
119
121
  }),
120
- /* @__PURE__ */ o("div", {
122
+ /* @__PURE__ */ u("div", {
121
123
  className: "rounded-md border p-2.5",
122
124
  children: [
123
- /* @__PURE__ */ a("dt", {
125
+ /* @__PURE__ */ l("dt", {
124
126
  className: "text-xs text-muted-foreground",
125
- children: v("planmagnet.forecast.delivery.p85Label", "Confident by (p85)")
127
+ children: S("planmagnet.forecast.delivery.p85Label", "Confident by (p85)")
126
128
  }),
127
- /* @__PURE__ */ a("dd", {
129
+ /* @__PURE__ */ l("dd", {
128
130
  className: "mt-1 text-sm font-semibold",
129
- children: T.dates ? m(T.dates.p85) : "—"
131
+ children: j.dates ? v(j.dates.p85) : "—"
130
132
  }),
131
- /* @__PURE__ */ a("dd", {
133
+ /* @__PURE__ */ l("dd", {
132
134
  className: "text-xs text-muted-foreground",
133
- children: T.sprintsNeeded ? v("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: T.sprintsNeeded.p85 }) : "—"
135
+ children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p85 }) : "—"
134
136
  })
135
137
  ]
136
138
  }),
137
- /* @__PURE__ */ o("div", {
139
+ /* @__PURE__ */ u("div", {
138
140
  className: "rounded-md border p-2.5",
139
141
  children: [
140
- /* @__PURE__ */ a("dt", {
142
+ /* @__PURE__ */ l("dt", {
141
143
  className: "text-xs text-muted-foreground",
142
- children: v("planmagnet.forecast.delivery.p95Label", "Very confident by (p95)")
144
+ children: S("planmagnet.forecast.delivery.p95Label", "Very confident by (p95)")
143
145
  }),
144
- /* @__PURE__ */ a("dd", {
146
+ /* @__PURE__ */ l("dd", {
145
147
  className: "mt-1 text-sm font-semibold",
146
- children: T.dates ? m(T.dates.p95) : "—"
148
+ children: j.dates ? v(j.dates.p95) : "—"
147
149
  }),
148
- /* @__PURE__ */ a("dd", {
150
+ /* @__PURE__ */ l("dd", {
149
151
  className: "text-xs text-muted-foreground",
150
- children: T.sprintsNeeded ? v("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: T.sprintsNeeded.p95 }) : "—"
152
+ children: j.sprintsNeeded ? S("planmagnet.forecast.delivery.sprints", "{{count}} sprint(s)", { count: j.sprintsNeeded.p95 }) : "—"
151
153
  })
152
154
  ]
153
155
  })
154
156
  ]
155
157
  }),
156
- /* @__PURE__ */ o("div", {
158
+ /* @__PURE__ */ u("div", {
157
159
  className: "flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",
158
- children: [/* @__PURE__ */ a("span", { children: v("planmagnet.forecast.delivery.remaining", "Remaining: {{points}} pts", { points: T.remainingPoints }) }), T.unestimatedItems > 0 && /* @__PURE__ */ a("span", {
160
+ children: [/* @__PURE__ */ l("span", { children: S("planmagnet.forecast.delivery.remaining", "Remaining: {{points}} pts", { points: j.remainingPoints }) }), j.unestimatedItems > 0 && /* @__PURE__ */ l("span", {
159
161
  className: "text-status-warning-text",
160
- children: v("planmagnet.forecast.delivery.unestimated", "{{count}} open item(s) have no estimate (counted as 0 pts)", { count: T.unestimatedItems })
162
+ children: S("planmagnet.forecast.delivery.unestimated", "{{count}} open item(s) have no estimate (counted as 0 pts)", { count: j.unestimatedItems })
161
163
  })]
162
164
  }),
163
- T.scopeTruncated && /* @__PURE__ */ a("p", {
165
+ j.scopeTruncated && /* @__PURE__ */ l("p", {
164
166
  className: "text-xs text-status-warning-text",
165
- children: v("planmagnet.forecast.delivery.truncated", "This scope is large enough that the scan stopped early — remaining points and unestimated items reflect only the first items found, not the whole project.")
167
+ children: S("planmagnet.forecast.delivery.truncated", "This scope is large enough that the scan stopped early — remaining points and unestimated items reflect only the first items found, not the whole project.")
166
168
  }),
167
- /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h3", {
169
+ /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h3", {
168
170
  className: "mb-1 text-sm font-medium",
169
- children: v("planmagnet.forecast.delivery.evidence", "Based on")
170
- }), /* @__PURE__ */ o("ul", {
171
+ children: S("planmagnet.forecast.delivery.evidence", "Based on")
172
+ }), /* @__PURE__ */ u("ul", {
171
173
  className: "space-y-1 text-xs text-muted-foreground",
172
174
  "data-testid": "forecast-inputs",
173
- children: [T.inputRefs.map((e) => /* @__PURE__ */ o("li", {
174
- className: "flex items-center justify-between gap-2",
175
- children: [/* @__PURE__ */ a("span", {
176
- className: "truncate",
177
- children: e.name
178
- }), /* @__PURE__ */ o("span", {
179
- className: "shrink-0 tabular-nums",
180
- children: [v("planmagnet.forecast.delivery.evidenceRow", "{{points}} pts", { points: e.completedPoints }), e.endDate ? ` · ${m(e.endDate)}` : ""]
181
- })]
182
- }, e.sprintId)), T.inputRefs.length === 0 && /* @__PURE__ */ a("li", { children: v("planmagnet.forecast.delivery.noInputs", "No sprint history available.") })]
175
+ children: [j.inputRefs.map((t) => {
176
+ let n = i("/projects/planning-detail-page", t.sprintId);
177
+ return /* @__PURE__ */ u("li", {
178
+ className: "flex items-center justify-between gap-2",
179
+ children: [/* @__PURE__ */ l("a", {
180
+ className: "truncate text-foreground underline underline-offset-2",
181
+ href: e(n, C),
182
+ onClick: (e) => {
183
+ e.defaultPrevented || e.button !== 0 || e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || (e.preventDefault(), w(n));
184
+ },
185
+ children: t.name
186
+ }), /* @__PURE__ */ u("span", {
187
+ className: "shrink-0 tabular-nums",
188
+ children: [S("planmagnet.forecast.delivery.evidenceRow", "{{points}} pts", { points: t.completedPoints }), t.endDate ? ` · ${v(t.endDate)}` : ""]
189
+ })]
190
+ }, t.sprintId);
191
+ }), j.inputRefs.length === 0 && /* @__PURE__ */ l("li", { children: S("planmagnet.forecast.delivery.noInputs", "No sprint history available.") })]
183
192
  })] }),
184
- /* @__PURE__ */ a("p", {
193
+ /* @__PURE__ */ l("p", {
185
194
  className: "text-xs text-muted-foreground",
186
- children: T.confidenceNote
195
+ children: j.confidenceNote
187
196
  }),
188
- /* @__PURE__ */ o("details", {
197
+ /* @__PURE__ */ u("details", {
189
198
  className: "text-xs text-muted-foreground",
190
- children: [/* @__PURE__ */ a("summary", {
199
+ children: [/* @__PURE__ */ l("summary", {
191
200
  className: "cursor-pointer select-none font-medium text-foreground",
192
- children: v("planmagnet.forecast.whatIsThis", "What is this?")
193
- }), /* @__PURE__ */ a("p", {
201
+ children: S("planmagnet.forecast.whatIsThis", "What is this?")
202
+ }), /* @__PURE__ */ l("p", {
194
203
  className: "mt-1",
195
- children: v("planmagnet.forecast.delivery.explainer", "Statistical forecast (Monte Carlo over past sprints): a simulation that resamples this project’s trailing completed sprints’ real velocities thousands of times to see how many more sprints the remaining work is likely to take. It is never an AI/LLM call, and it never invents a date from a sample it doesn’t trust — when history is too thin, it says so instead of guessing.")
204
+ children: S("planmagnet.forecast.delivery.explainer", "Statistical forecast (Monte Carlo over past sprints): a simulation that resamples this project’s trailing completed sprints’ real velocities thousands of times to see how many more sprints the remaining work is likely to take. It is never an AI/LLM call, and it never invents a date from a sample it doesn’t trust — when history is too thin, it says so instead of guessing.")
196
205
  })]
197
206
  })
198
207
  ]
199
- }) : null : /* @__PURE__ */ a("p", {
208
+ }) : null : /* @__PURE__ */ l("p", {
200
209
  className: "text-sm text-muted-foreground",
201
- children: v("planmagnet.forecast.delivery.noProject", "Select a project to see its forecast.")
210
+ children: S("planmagnet.forecast.delivery.noProject", "Select a project to see its forecast.")
202
211
  }) })]
203
212
  });
204
213
  }
205
- export { h as DeliveryForecastCard };
214
+ export { y as DeliveryForecastCard };
@@ -1,5 +1,6 @@
1
+ import { WorkItemLinkRelation } from '../../generated/wspace-types';
1
2
  /** The relations, in the order they are shown, with how each reads on this item. */
2
- export declare const ISSUE_RELATIONS: readonly [readonly ["BLOCKS", "Blocks"], readonly ["BLOCKED_BY", "Is blocked by"], readonly ["DUPLICATES", "Duplicates"], readonly ["DUPLICATED_BY", "Is duplicated by"], readonly ["CAUSES", "Causes"], readonly ["CAUSED_BY", "Is caused by"], readonly ["RELATED_TO", "Relates to"]];
3
+ export declare const ISSUE_RELATIONS: readonly [readonly [WorkItemLinkRelation.Blocks, "Blocks"], readonly [WorkItemLinkRelation.BlockedBy, "Is blocked by"], readonly [WorkItemLinkRelation.Duplicates, "Duplicates"], readonly [WorkItemLinkRelation.DuplicatedBy, "Is duplicated by"], readonly [WorkItemLinkRelation.Causes, "Causes"], readonly [WorkItemLinkRelation.CausedBy, "Is caused by"], readonly [WorkItemLinkRelation.RelatedTo, "Relates to"]];
3
4
  type Relation = (typeof ISSUE_RELATIONS)[number][0];
4
5
  /** The same fact read from the other item's side — mirrors the server's ISSUE_LINK_INVERSE. */
5
6
  export declare const INVERSE: Record<Relation, Relation>;
@@ -1,15 +1,17 @@
1
- import { WorkItemSearchSelect as e } from "../controls/Pickers.js";
2
- import { ErrorLine as t } from "../controls/ConfirmButton.js";
3
- import { usePlanMagnetNavigate as n } from "../providers/PlanMagnetProvider.js";
4
- import { throwOnError as r } from "../utils/mutationResult.js";
5
- import { useState as i } from "react";
6
- import { Plus as a, X as o } from "lucide-react";
7
- import { gql as s } from "@apollo/client";
8
- import { useMutation as c, useQuery as l } from "@apollo/client/react";
9
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
10
- import { Badge as f, Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _ } from "@burdenoff/fe-libs/ui";
1
+ import { WorkItemIssueLinkCreateDocument as e, WorkItemIssueLinkUpdateDocument as t } from "../../generated/wspace-operations.js";
2
+ import { WorkItemLinkRelation as n } from "../../generated/wspace-types.js";
3
+ import { WorkItemSearchSelect as r } from "../controls/Pickers.js";
4
+ import { ErrorLine as i } from "../controls/ConfirmButton.js";
5
+ import { usePlanMagnetNavigate as a } from "../providers/PlanMagnetProvider.js";
6
+ import { throwOnError as o } from "../utils/mutationResult.js";
7
+ import { useState as s } from "react";
8
+ import { Plus as c, X as l } from "lucide-react";
9
+ import { gql as u } from "@apollo/client";
10
+ import { useMutation as d, useQuery as f } from "@apollo/client/react";
11
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
12
+ import { Badge as h, Button as g, Card as _, CardContent as v, CardHeader as y, CardTitle as b } from "@burdenoff/fe-libs/ui";
11
13
  // src/planmagnet/links/IssueLinksPanel.tsx
12
- var v = s`
14
+ var x = u`
13
15
  query WorkItemIssueLinks($workItemId: ID!) {
14
16
  planmagnetWorkItemIssueLinks(workItemId: $workItemId) {
15
17
  linkId
@@ -23,127 +25,114 @@ var v = s`
23
25
  }
24
26
  }
25
27
  }
26
- `, y = s`
27
- mutation WorkItemIssueLinkCreate($input: PlanmagnetCreateWorkItemLinkInput!) {
28
- planmagnetLinkWorkItem(input: $input) {
29
- id
30
- }
31
- }
32
- `, b = s`
33
- mutation WorkItemIssueLinkUpdate($id: ID!, $input: PlanmagnetUpdateWorkItemLinkInput!) {
34
- planmagnetUpdateWorkItemLink(id: $id, input: $input) {
35
- id
36
- relationType
37
- }
38
- }
39
- `, x = s`
28
+ `, S = u`
40
29
  mutation WorkItemIssueLinkRemove($id: ID!) {
41
30
  planmagnetUnlinkWorkItem(id: $id)
42
31
  }
43
- `, S = [
44
- ["BLOCKS", "Blocks"],
45
- ["BLOCKED_BY", "Is blocked by"],
46
- ["DUPLICATES", "Duplicates"],
47
- ["DUPLICATED_BY", "Is duplicated by"],
48
- ["CAUSES", "Causes"],
49
- ["CAUSED_BY", "Is caused by"],
50
- ["RELATED_TO", "Relates to"]
51
- ], C = {
52
- BLOCKS: "BLOCKED_BY",
53
- BLOCKED_BY: "BLOCKS",
54
- DUPLICATES: "DUPLICATED_BY",
55
- DUPLICATED_BY: "DUPLICATES",
56
- CAUSES: "CAUSED_BY",
57
- CAUSED_BY: "CAUSES",
58
- RELATED_TO: "RELATED_TO"
59
- }, w = (e) => S.find(([t]) => t === e)?.[1] ?? e.toLowerCase(), T = "rounded-md border border-input bg-background px-2 py-1 text-sm disabled:opacity-60";
60
- function E({ workItemId: s }) {
61
- let E = n(), { data: D, loading: O, error: k } = l(v, {
62
- variables: { workItemId: s },
63
- skip: !s
64
- }), A = {
32
+ `, C = [
33
+ [n.Blocks, "Blocks"],
34
+ [n.BlockedBy, "Is blocked by"],
35
+ [n.Duplicates, "Duplicates"],
36
+ [n.DuplicatedBy, "Is duplicated by"],
37
+ [n.Causes, "Causes"],
38
+ [n.CausedBy, "Is caused by"],
39
+ [n.RelatedTo, "Relates to"]
40
+ ], w = {
41
+ BLOCKS: n.BlockedBy,
42
+ BLOCKED_BY: n.Blocks,
43
+ DUPLICATES: n.DuplicatedBy,
44
+ DUPLICATED_BY: n.Duplicates,
45
+ CAUSES: n.CausedBy,
46
+ CAUSED_BY: n.Causes,
47
+ RELATED_TO: n.RelatedTo
48
+ }, T = (e) => C.find(([t]) => t === e)?.[1] ?? e.toLowerCase(), E = "rounded-md border border-input bg-background px-2 py-1 text-sm disabled:opacity-60";
49
+ function D({ workItemId: u }) {
50
+ let D = a(), { data: O, loading: k, error: A } = f(x, {
51
+ variables: { workItemId: u },
52
+ skip: !u
53
+ }), j = {
65
54
  refetchQueries: ["WorkItemIssueLinks", "WorkItemActivity"],
66
55
  awaitRefetchQueries: !0
67
- }, [j, M] = c(y, A), [N, P] = c(b, A), [F, I] = c(x, A), [L, R] = i(!1), [z, B] = i("BLOCKS"), [V, H] = i(""), [U, W] = i(null), G = M.loading || P.loading || I.loading, K = (D?.planmagnetWorkItemIssueLinks ?? []).filter((e) => e.workItem), q = K.map((e) => e.workItem?.id ?? ""), J = async (e, t) => {
68
- W(null);
56
+ }, [M, N] = d(e, j), [P, F] = d(t, j), [I, L] = d(S, j), [R, z] = s(!1), [B, V] = s(n.Blocks), [H, U] = s(""), [W, G] = s(null), K = N.loading || F.loading || L.loading, q = (O?.planmagnetWorkItemIssueLinks ?? []).filter((e) => e.workItem), J = q.map((e) => e.workItem?.id ?? ""), Y = async (e, t) => {
57
+ G(null);
69
58
  try {
70
- return await r(e()), !0;
59
+ return await o(e()), !0;
71
60
  } catch (e) {
72
- return W(e instanceof Error ? e.message : t), !1;
61
+ return G(e instanceof Error ? e.message : t), !1;
73
62
  }
74
- }, Y = async () => {
75
- await J(() => j({ variables: { input: {
76
- workItemId: s,
63
+ }, X = async () => {
64
+ await Y(() => M({ variables: { input: {
65
+ workItemId: u,
77
66
  sourceProduct: "planmagnet",
78
67
  entityType: "WorkItem",
79
- entityId: V,
80
- relationType: z
81
- } } }), "The link could not be added.") && (H(""), R(!1));
82
- }, X = (e, t) => J(() => N({ variables: {
68
+ entityId: H,
69
+ relationType: B
70
+ } } }), "The link could not be added.") && (U(""), z(!1));
71
+ }, Z = (e, t) => Y(() => P({ variables: {
83
72
  id: e.linkId,
84
- input: { relationType: e.direction === "OUTGOING" ? t : C[t] }
73
+ input: { relationType: e.direction === "OUTGOING" ? t : w[t] }
85
74
  } }), "The link could not be changed.");
86
- return /* @__PURE__ */ d(m, {
75
+ return /* @__PURE__ */ m(_, {
87
76
  "data-testid": "issue-links",
88
- children: [/* @__PURE__ */ d(g, {
77
+ children: [/* @__PURE__ */ m(y, {
89
78
  className: "flex flex-row items-center justify-between space-y-0",
90
- children: [/* @__PURE__ */ d(_, { children: [
79
+ children: [/* @__PURE__ */ m(b, { children: [
91
80
  "Linked issues (",
92
- K.length,
81
+ q.length,
93
82
  ")"
94
- ] }), !L && /* @__PURE__ */ d(p, {
83
+ ] }), !R && /* @__PURE__ */ m(g, {
95
84
  size: "sm",
96
85
  variant: "outline",
97
- onClick: () => R(!0),
86
+ onClick: () => z(!0),
98
87
  "data-testid": "issue-links-add",
99
- children: [/* @__PURE__ */ u(a, { className: "mr-1 h-4 w-4" }), " Link issue"]
88
+ children: [/* @__PURE__ */ p(c, { className: "mr-1 h-4 w-4" }), " Link issue"]
100
89
  })]
101
- }), /* @__PURE__ */ d(h, {
90
+ }), /* @__PURE__ */ m(v, {
102
91
  className: "space-y-2",
103
92
  children: [
104
- /* @__PURE__ */ u("p", {
93
+ /* @__PURE__ */ p("p", {
105
94
  className: "text-xs text-muted-foreground",
106
95
  children: "What this task blocks, duplicates or causes. These links do not schedule anything — scheduling constraints are under Dependencies."
107
96
  }),
108
- U && /* @__PURE__ */ u(t, { message: U }),
109
- O && !D && /* @__PURE__ */ u("p", {
97
+ W && /* @__PURE__ */ p(i, { message: W }),
98
+ k && !O && /* @__PURE__ */ p("p", {
110
99
  className: "text-sm text-muted-foreground",
111
100
  children: "Loading…"
112
101
  }),
113
- k && /* @__PURE__ */ d("p", {
102
+ A && /* @__PURE__ */ m("p", {
114
103
  role: "alert",
115
104
  className: "text-sm text-destructive",
116
- children: ["Linked issues could not be loaded: ", k.message]
105
+ children: ["Linked issues could not be loaded: ", A.message]
117
106
  }),
118
- D && K.length === 0 && !L && /* @__PURE__ */ u("p", {
107
+ O && q.length === 0 && !R && /* @__PURE__ */ p("p", {
119
108
  className: "text-sm text-muted-foreground",
120
109
  children: "No linked issues."
121
110
  }),
122
- K.map((e) => /* @__PURE__ */ d("div", {
111
+ q.map((e) => /* @__PURE__ */ m("div", {
123
112
  className: "flex items-center justify-between gap-2 rounded-md border p-2",
124
113
  "data-testid": "issue-link",
125
- children: [/* @__PURE__ */ d("div", {
114
+ children: [/* @__PURE__ */ m("div", {
126
115
  className: "flex min-w-0 items-center gap-2",
127
- children: [/* @__PURE__ */ u("select", {
116
+ children: [/* @__PURE__ */ p("select", {
128
117
  "aria-label": `How this task relates to ${e.workItem?.key ?? "the linked task"}`,
129
- className: T,
118
+ className: E,
130
119
  value: e.relation,
131
- disabled: G,
120
+ disabled: K,
132
121
  onChange: (t) => {
133
122
  let n = t.target.value;
134
- n !== e.relation && X(e, n);
123
+ n !== e.relation && Z(e, n);
135
124
  },
136
125
  "data-testid": "issue-link-relation",
137
- children: S.map(([e, t]) => /* @__PURE__ */ u("option", {
126
+ children: C.map(([e, t]) => /* @__PURE__ */ p("option", {
138
127
  value: e,
139
128
  children: t
140
129
  }, e))
141
- }), /* @__PURE__ */ d("button", {
130
+ }), /* @__PURE__ */ m("button", {
142
131
  type: "button",
143
132
  className: "min-w-0 truncate text-left text-sm hover:underline",
144
- onClick: () => e.workItem && E(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.workItem.id)}`),
133
+ onClick: () => e.workItem && D(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.workItem.id)}`),
145
134
  children: [
146
- /* @__PURE__ */ u("span", {
135
+ /* @__PURE__ */ p("span", {
147
136
  className: "text-muted-foreground",
148
137
  children: e.workItem?.key
149
138
  }),
@@ -151,60 +140,60 @@ function E({ workItemId: s }) {
151
140
  e.workItem?.title
152
141
  ]
153
142
  })]
154
- }), /* @__PURE__ */ d("span", {
143
+ }), /* @__PURE__ */ m("span", {
155
144
  className: "flex shrink-0 items-center gap-1",
156
- children: [/* @__PURE__ */ u(f, {
145
+ children: [/* @__PURE__ */ p(h, {
157
146
  variant: "outline",
158
147
  className: "text-xs capitalize",
159
148
  children: e.workItem?.status.toLowerCase().replace("_", " ")
160
- }), /* @__PURE__ */ u(p, {
149
+ }), /* @__PURE__ */ p(g, {
161
150
  size: "icon",
162
151
  variant: "ghost",
163
- "aria-label": `Remove the "${w(e.relation)}" link to ${e.workItem?.key ?? "this task"}`,
164
- disabled: G,
165
- onClick: () => void J(() => F({ variables: { id: e.linkId } }), "The link could not be removed."),
166
- children: /* @__PURE__ */ u(o, { className: "h-4 w-4" })
152
+ "aria-label": `Remove the "${T(e.relation)}" link to ${e.workItem?.key ?? "this task"}`,
153
+ disabled: K,
154
+ onClick: () => void Y(() => I({ variables: { id: e.linkId } }), "The link could not be removed."),
155
+ children: /* @__PURE__ */ p(l, { className: "h-4 w-4" })
167
156
  })]
168
157
  })]
169
158
  }, e.linkId)),
170
- L && /* @__PURE__ */ d("div", {
159
+ R && /* @__PURE__ */ m("div", {
171
160
  className: "space-y-2 border-t pt-3",
172
161
  "data-testid": "issue-link-form",
173
162
  children: [
174
- /* @__PURE__ */ u("label", {
163
+ /* @__PURE__ */ p("label", {
175
164
  htmlFor: "issue-link-relation-new",
176
165
  className: "text-xs text-muted-foreground",
177
166
  children: "This task…"
178
167
  }),
179
- /* @__PURE__ */ u("select", {
168
+ /* @__PURE__ */ p("select", {
180
169
  id: "issue-link-relation-new",
181
- className: `${T} w-full`,
182
- value: z,
183
- onChange: (e) => B(e.target.value),
184
- children: S.map(([e, t]) => /* @__PURE__ */ u("option", {
170
+ className: `${E} w-full`,
171
+ value: B,
172
+ onChange: (e) => V(e.target.value),
173
+ children: C.map(([e, t]) => /* @__PURE__ */ p("option", {
185
174
  value: e,
186
175
  children: t.toLowerCase()
187
176
  }, e))
188
177
  }),
189
- /* @__PURE__ */ u(e, {
178
+ /* @__PURE__ */ p(r, {
190
179
  id: "issue-link-target",
191
- value: V,
192
- onChange: H,
193
- exclude: [s, ...q]
180
+ value: H,
181
+ onChange: U,
182
+ exclude: [u, ...J]
194
183
  }),
195
- /* @__PURE__ */ d("div", {
184
+ /* @__PURE__ */ m("div", {
196
185
  className: "flex justify-end gap-2",
197
- children: [/* @__PURE__ */ u(p, {
186
+ children: [/* @__PURE__ */ p(g, {
198
187
  size: "sm",
199
188
  variant: "ghost",
200
189
  onClick: () => {
201
- R(!1), H(""), W(null);
190
+ z(!1), U(""), G(null);
202
191
  },
203
192
  children: "Cancel"
204
- }), /* @__PURE__ */ u(p, {
193
+ }), /* @__PURE__ */ p(g, {
205
194
  size: "sm",
206
- disabled: !V || G,
207
- onClick: () => void Y(),
195
+ disabled: !H || K,
196
+ onClick: () => void X(),
208
197
  "data-testid": "issue-link-save",
209
198
  children: "Link"
210
199
  })]
@@ -215,4 +204,4 @@ function E({ workItemId: s }) {
215
204
  })]
216
205
  });
217
206
  }
218
- export { C as INVERSE, S as ISSUE_RELATIONS, E as IssueLinksPanel };
207
+ export { w as INVERSE, C as ISSUE_RELATIONS, D as IssueLinksPanel };
@@ -4,6 +4,7 @@ import { PlanMagnetRootProps } from '../types';
4
4
  * Hook to access PlanMagnet context
5
5
  */
6
6
  export declare const usePlanMagnet: () => PlanMagnetRootProps;
7
+ export declare function resolvePlanMagnetPath(path: string, basePath?: string): string;
7
8
  /**
8
9
  * Hook for navigation within the PlanMagnet microfrontend.
9
10
  * Uses the shell's navigate function if available, falling back to
@@ -34,17 +34,21 @@ var C = (e) => e.stop(), w = (e) => e.clear(), T = n(null), E = () => {
34
34
  let e = i(T);
35
35
  if (!e) throw Error("usePlanMagnet must be used within PlanMagnetProvider");
36
36
  return e;
37
- }, D = () => {
37
+ };
38
+ function D(e, t) {
39
+ return t && t !== "/" ? `${t}${e}` : e;
40
+ }
41
+ var O = () => {
38
42
  let { navigate: e, basePath: t } = E(), n = l();
39
43
  return r((r) => {
40
- let i = t && t !== "/" ? `${t}${r}` : r;
44
+ let i = D(r, t);
41
45
  e ? e(i) : n(i);
42
46
  }, [
43
47
  e,
44
48
  t,
45
49
  n
46
50
  ]);
47
- }, O = ({ children: n, basePath: r, navigate: i, currentUser: a, workspaceId: s, tenantId: l, organizationId: _, apiGatewayUrl: E, authToken: D, workspaceToken: O, registerNavItems: k, registerFooterItems: A, onAuthError: j, isolateRequests: M = !1 }) => {
51
+ }, k = ({ children: n, basePath: r, navigate: i, currentUser: a, workspaceId: s, tenantId: l, organizationId: _, apiGatewayUrl: E, authToken: D, workspaceToken: O, registerNavItems: k, registerFooterItems: A, onAuthError: j, isolateRequests: M = !1 }) => {
48
52
  let N = o(() => M ? b() : x, [M]), P = o(() => {
49
53
  let n = m(({ error: n }) => {
50
54
  if (e.is(n)) for (let e of n.errors) {
@@ -140,4 +144,4 @@ var C = (e) => e.stop(), w = (e) => e.clear(), T = n(null), E = () => {
140
144
  children: R
141
145
  }) : R;
142
146
  };
143
- export { O as PlanMagnetProvider, E as usePlanMagnet, D as usePlanMagnetNavigate };
147
+ export { k as PlanMagnetProvider, D as resolvePlanMagnetPath, E as usePlanMagnet, O as usePlanMagnetNavigate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-planmagnet",
3
- "version": "2026.1126.1",
3
+ "version": "2026.1127.1",
4
4
  "description": "Burdenoff PlanMagnet Microfrontend",
5
5
  "type": "module",
6
6
  "files": [