@burdenoff/microfe-planmagnet 2026.930.13 → 2026.930.14

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.
Files changed (56) hide show
  1. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  2. package/dist/planmagnet/PlanMagnetRoot.js +133 -126
  3. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  4. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  5. package/dist/planmagnet/PlanMagnetRoutes.js +9 -5
  6. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  7. package/dist/planmagnet/activity/activityDescribe.d.ts +38 -0
  8. package/dist/planmagnet/activity/activityDescribe.d.ts.map +1 -0
  9. package/dist/planmagnet/activity/activityDescribe.js +123 -0
  10. package/dist/planmagnet/activity/activityDescribe.js.map +1 -0
  11. package/dist/planmagnet/activity/relativeTime.d.ts +8 -0
  12. package/dist/planmagnet/activity/relativeTime.d.ts.map +1 -0
  13. package/dist/planmagnet/activity/relativeTime.js +38 -0
  14. package/dist/planmagnet/activity/relativeTime.js.map +1 -0
  15. package/dist/planmagnet/comments/WorkItemActivity.d.ts.map +1 -1
  16. package/dist/planmagnet/comments/WorkItemActivity.js +35 -38
  17. package/dist/planmagnet/comments/WorkItemActivity.js.map +1 -1
  18. package/dist/planmagnet/controls/FeatureControls.js +25 -25
  19. package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
  20. package/dist/planmagnet/controls/ProjectControls.js +53 -46
  21. package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
  22. package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts +2 -0
  23. package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts.map +1 -0
  24. package/dist/planmagnet/pages/ActivityActivityPagePage.js +291 -0
  25. package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -0
  26. package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +15 -15
  27. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +9 -9
  28. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +4 -4
  29. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +4 -4
  30. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -4
  31. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
  32. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +118 -109
  33. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
  34. package/dist/planmagnet/pages/ProgramsEditProgramPagePage.js +4 -4
  35. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +6 -6
  36. package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +4 -4
  37. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +4 -4
  38. package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +6 -6
  39. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +13 -13
  40. package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +4 -4
  41. package/dist/planmagnet/pages/TeamCreateTeamPagePage.js +4 -4
  42. package/dist/planmagnet/pages/TeamTeamDetailPagePage.js +6 -6
  43. package/dist/planmagnet/pages/TeamTeamEditPagePage.js +6 -6
  44. package/dist/planmagnet/roadmaps/RoadmapControls.js +21 -21
  45. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts +29 -0
  46. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
  47. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +1 -1
  48. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
  49. package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts +37 -0
  50. package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts.map +1 -0
  51. package/dist/planmagnet/roadmaps/RoadmapPresentation.js +210 -0
  52. package/dist/planmagnet/roadmaps/RoadmapPresentation.js.map +1 -0
  53. package/dist/planmagnet/team/TeamControls.d.ts.map +1 -1
  54. package/dist/planmagnet/team/TeamControls.js +134 -124
  55. package/dist/planmagnet/team/TeamControls.js.map +1 -1
  56. package/package.json +1 -1
@@ -4,70 +4,80 @@ import { LEAVES_PAGE_CONTEXT as i, throwOnError as a } from "../utils/mutationRe
4
4
  import { ConfirmButton as o, ErrorLine as s } from "../controls/ConfirmButton.js";
5
5
  import { detailPath as c } from "../utils/rowNavigation.js";
6
6
  import { useDeferredValue as l, useEffect as u, useState as d } from "react";
7
- import { Pencil as f, Plus as p, Trash2 as m, X as h } from "lucide-react";
8
- import { gql as g } from "@apollo/client";
9
- import { useMutation as _, useQuery as v } from "@apollo/client/react";
10
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
11
- import { Button as x, Checkbox as S, Input as C, ResponsiveDialog as w, ResponsiveDialogContent as T, ResponsiveDialogDescription as E, ResponsiveDialogFooter as D, ResponsiveDialogHeader as O, ResponsiveDialogTitle as k, ResponsiveDialogTrigger as A } from "@burdenoff/fe-libs/ui";
12
- import { useWorkspaceDirectory as j } from "@burdenoff/fe-libs/sharing";
7
+ import { History as f, Pencil as p, Plus as m, Trash2 as h, X as g } from "lucide-react";
8
+ import { gql as _ } from "@apollo/client";
9
+ import { useMutation as v, useQuery as y } from "@apollo/client/react";
10
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
+ import { Button as S, Checkbox as C, Input as w, ResponsiveDialog as T, ResponsiveDialogContent as E, ResponsiveDialogDescription as D, ResponsiveDialogFooter as O, ResponsiveDialogHeader as k, ResponsiveDialogTitle as A, ResponsiveDialogTrigger as j } from "@burdenoff/fe-libs/ui";
12
+ import { useWorkspaceDirectory as M } from "@burdenoff/fe-libs/sharing";
13
13
  //#region src/planmagnet/team/TeamControls.tsx
14
- var M = ["GetTeams", "GetTeamDetail"], N = g`
14
+ var N = ["GetTeams", "GetTeamDetail"], P = _`
15
15
  mutation TeamControlsDelete($id: ID!) {
16
16
  planmagnetDeleteTeam(id: $id)
17
17
  }
18
18
  `;
19
- function P({ teamId: e, name: n }) {
20
- let r = t(), [l, u] = _(N, {
21
- refetchQueries: M,
19
+ function F({ teamId: e, name: n }) {
20
+ let r = t(), [l, u] = v(P, {
21
+ refetchQueries: N,
22
22
  context: i
23
- }), [p, h] = d(null), g = async () => {
24
- h(null);
23
+ }), [m, g] = d(null), _ = async () => {
24
+ g(null);
25
25
  try {
26
26
  await a(l({ variables: { id: e } })), r("/team/teams-page");
27
27
  } catch (e) {
28
- h(e instanceof Error ? e.message : "The team could not be deleted.");
28
+ g(e instanceof Error ? e.message : "The team could not be deleted.");
29
29
  }
30
30
  };
31
- return /* @__PURE__ */ b("div", {
31
+ return /* @__PURE__ */ x("div", {
32
32
  className: "flex flex-col items-end gap-2",
33
- children: [/* @__PURE__ */ b("div", {
33
+ children: [/* @__PURE__ */ x("div", {
34
34
  className: "flex flex-wrap items-center justify-end gap-2",
35
- children: [/* @__PURE__ */ b(x, {
36
- size: "sm",
37
- variant: "outline",
38
- "data-testid": "team-edit",
39
- onClick: () => r(c("/team/team-edit-page", e)),
40
- children: [/* @__PURE__ */ y(f, { className: "mr-1 h-4 w-4" }), "Edit"]
41
- }), /* @__PURE__ */ y(o, {
42
- label: "Delete",
43
- variant: "outline",
44
- icon: /* @__PURE__ */ y(m, { className: "mr-1 h-4 w-4" }),
45
- title: `Delete ${n}?`,
46
- description: "The team is deleted. Its team-scoped sprints disappear from every list — the same way a deleted project's sprints do. Its projects and members are unaffected; nothing about them is deleted. This cannot be undone here.",
47
- confirmLabel: "Delete team",
48
- destructive: !0,
49
- disabled: u.loading,
50
- onConfirm: () => void g()
51
- })]
52
- }), p && /* @__PURE__ */ y(s, { message: p })]
35
+ children: [
36
+ /* @__PURE__ */ x(S, {
37
+ size: "sm",
38
+ variant: "outline",
39
+ "data-testid": "team-edit",
40
+ onClick: () => r(c("/team/team-edit-page", e)),
41
+ children: [/* @__PURE__ */ b(p, { className: "mr-1 h-4 w-4" }), "Edit"]
42
+ }),
43
+ /* @__PURE__ */ x(S, {
44
+ size: "sm",
45
+ variant: "outline",
46
+ "data-testid": "team-activity-link",
47
+ onClick: () => r(`/activity/activity-page?teamId=${encodeURIComponent(e)}`),
48
+ children: [/* @__PURE__ */ b(f, { className: "mr-1 h-4 w-4" }), "Activity"]
49
+ }),
50
+ /* @__PURE__ */ b(o, {
51
+ label: "Delete",
52
+ variant: "outline",
53
+ icon: /* @__PURE__ */ b(h, { className: "mr-1 h-4 w-4" }),
54
+ title: `Delete ${n}?`,
55
+ description: "The team is deleted. Its team-scoped sprints disappear from every list — the same way a deleted project's sprints do. Its projects and members are unaffected; nothing about them is deleted. This cannot be undone here.",
56
+ confirmLabel: "Delete team",
57
+ destructive: !0,
58
+ disabled: u.loading,
59
+ onConfirm: () => void _()
60
+ })
61
+ ]
62
+ }), m && /* @__PURE__ */ b(s, { message: m })]
53
63
  });
54
64
  }
55
- var F = g`
65
+ var I = _`
56
66
  mutation TeamControlsAddMembers($id: ID!, $input: PlanmagnetTeamMembersInput!) {
57
67
  planmagnetAddTeamMembers(id: $id, input: $input) {
58
68
  id
59
69
  }
60
70
  }
61
- `, I = g`
71
+ `, L = _`
62
72
  mutation TeamControlsRemoveMembers($id: ID!, $input: PlanmagnetTeamMembersInput!) {
63
73
  planmagnetRemoveTeamMembers(id: $id, input: $input) {
64
74
  id
65
75
  }
66
76
  }
67
77
  `;
68
- function L({ teamId: e, members: t }) {
69
- let [i, o] = _(I, {
70
- refetchQueries: M,
78
+ function R({ teamId: e, members: t }) {
79
+ let [i, o] = v(L, {
80
+ refetchQueries: N,
71
81
  awaitRefetchQueries: !0
72
82
  }), [c, l] = d(null), [u, f] = d(null), p = async (t) => {
73
83
  l(null), f(t);
@@ -82,56 +92,56 @@ function L({ teamId: e, members: t }) {
82
92
  f(null);
83
93
  }
84
94
  };
85
- return /* @__PURE__ */ b("div", {
95
+ return /* @__PURE__ */ x("div", {
86
96
  className: "space-y-3",
87
97
  "data-testid": "team-members",
88
98
  children: [
89
- /* @__PURE__ */ b("div", {
99
+ /* @__PURE__ */ x("div", {
90
100
  className: "flex items-center justify-between",
91
- children: [/* @__PURE__ */ b("p", {
101
+ children: [/* @__PURE__ */ x("p", {
92
102
  className: "text-sm text-muted-foreground",
93
103
  children: [
94
104
  t.length,
95
105
  " member",
96
106
  t.length === 1 ? "" : "s"
97
107
  ]
98
- }), /* @__PURE__ */ y(R, {
108
+ }), /* @__PURE__ */ b(z, {
99
109
  teamId: e,
100
110
  existingActorIds: t.map((e) => e.actorId)
101
111
  })]
102
112
  }),
103
- c && /* @__PURE__ */ y(s, { message: c }),
104
- t.length === 0 ? /* @__PURE__ */ y("p", {
113
+ c && /* @__PURE__ */ b(s, { message: c }),
114
+ t.length === 0 ? /* @__PURE__ */ b("p", {
105
115
  className: "text-sm text-muted-foreground text-center py-4",
106
116
  children: "No members on this team yet."
107
- }) : /* @__PURE__ */ y("ul", {
117
+ }) : /* @__PURE__ */ b("ul", {
108
118
  className: "space-y-1",
109
- children: t.map((e) => /* @__PURE__ */ b("li", {
119
+ children: t.map((e) => /* @__PURE__ */ x("li", {
110
120
  className: "flex items-center justify-between gap-2 border rounded-md p-2 text-sm",
111
- children: [/* @__PURE__ */ b("span", {
121
+ children: [/* @__PURE__ */ x("span", {
112
122
  className: "flex items-center gap-2 min-w-0",
113
- children: [/* @__PURE__ */ y(n, {
123
+ children: [/* @__PURE__ */ b(n, {
114
124
  id: e.actorId,
115
125
  className: "h-7 w-7 shrink-0 rounded-full bg-primary/10 flex items-center justify-center text-[10px] font-medium text-primary"
116
- }), /* @__PURE__ */ y(r, {
126
+ }), /* @__PURE__ */ b(r, {
117
127
  id: e.actorId,
118
128
  className: "truncate"
119
129
  })]
120
- }), /* @__PURE__ */ y(x, {
130
+ }), /* @__PURE__ */ b(S, {
121
131
  size: "sm",
122
132
  variant: "ghost",
123
133
  "aria-label": "Remove member",
124
134
  disabled: o.loading,
125
135
  onClick: () => p(e.actorId),
126
- children: u === e.actorId ? "…" : /* @__PURE__ */ y(h, { className: "h-4 w-4" })
136
+ children: u === e.actorId ? "…" : /* @__PURE__ */ b(g, { className: "h-4 w-4" })
127
137
  })]
128
138
  }, e.id))
129
139
  })
130
140
  ]
131
141
  });
132
142
  }
133
- function R({ teamId: t, existingActorIds: n }) {
134
- let { workspaceId: r, authToken: i, apiGatewayUrl: o } = e(), [c, f] = d(!1), [m, h] = d(""), g = l(m.trim()), [v, N] = d(/* @__PURE__ */ new Set()), [P, I] = d(null), L = j({
143
+ function z({ teamId: t, existingActorIds: n }) {
144
+ let { workspaceId: r, authToken: i, apiGatewayUrl: o } = e(), [c, f] = d(!1), [p, h] = d(""), g = l(p.trim()), [_, y] = d(/* @__PURE__ */ new Set()), [P, F] = d(null), L = M({
135
145
  workspaceId: r ?? "",
136
146
  authToken: i ?? void 0,
137
147
  apiGatewayUrl: o ?? void 0
@@ -139,69 +149,69 @@ function R({ teamId: t, existingActorIds: n }) {
139
149
  u(() => {
140
150
  R(g);
141
151
  }, [g, R]);
142
- let z = L.members.filter((e) => !n.includes(e.id)), [B, V] = _(F, {
143
- refetchQueries: M,
152
+ let z = L.members.filter((e) => !n.includes(e.id)), [B, V] = v(I, {
153
+ refetchQueries: N,
144
154
  awaitRefetchQueries: !0
145
- }), H = (e, t) => N((n) => {
155
+ }), H = (e, t) => y((n) => {
146
156
  let r = new Set(n);
147
157
  return t ? r.add(e) : r.delete(e), r;
148
158
  }), U = () => {
149
- N(/* @__PURE__ */ new Set()), h(""), I(null);
159
+ y(/* @__PURE__ */ new Set()), h(""), F(null);
150
160
  };
151
- return /* @__PURE__ */ b(w, {
161
+ return /* @__PURE__ */ x(T, {
152
162
  open: c,
153
163
  onOpenChange: (e) => {
154
164
  f(e), e || U();
155
165
  },
156
- children: [/* @__PURE__ */ y(A, {
166
+ children: [/* @__PURE__ */ b(j, {
157
167
  asChild: !0,
158
- children: /* @__PURE__ */ b(x, {
168
+ children: /* @__PURE__ */ x(S, {
159
169
  size: "sm",
160
170
  variant: "outline",
161
171
  "data-testid": "team-add-members",
162
- children: [/* @__PURE__ */ y(p, { className: "mr-1 h-4 w-4" }), "Add members"]
172
+ children: [/* @__PURE__ */ b(m, { className: "mr-1 h-4 w-4" }), "Add members"]
163
173
  })
164
- }), /* @__PURE__ */ b(T, {
174
+ }), /* @__PURE__ */ x(E, {
165
175
  className: "max-w-lg",
166
176
  children: [
167
- /* @__PURE__ */ b(O, { children: [/* @__PURE__ */ y(k, { children: "Add members" }), /* @__PURE__ */ y(E, { children: "Adding someone to the team does not grant them access to the team's projects — project access is still controlled by each person's own workspace role." })] }),
168
- /* @__PURE__ */ y(C, {
169
- value: m,
177
+ /* @__PURE__ */ x(k, { children: [/* @__PURE__ */ b(A, { children: "Add members" }), /* @__PURE__ */ b(D, { children: "Adding someone to the team does not grant them access to the team's projects — project access is still controlled by each person's own workspace role." })] }),
178
+ /* @__PURE__ */ b(w, {
179
+ value: p,
170
180
  onChange: (e) => h(e.target.value),
171
181
  placeholder: "Search workspace members",
172
182
  "aria-label": "Search workspace members"
173
183
  }),
174
- /* @__PURE__ */ b("div", {
184
+ /* @__PURE__ */ x("div", {
175
185
  className: "max-h-80 overflow-y-auto space-y-1",
176
186
  "data-testid": "team-add-candidates",
177
187
  children: [
178
- L.loading && z.length === 0 && /* @__PURE__ */ y("p", {
188
+ L.loading && z.length === 0 && /* @__PURE__ */ b("p", {
179
189
  className: "text-sm text-muted-foreground py-4 text-center",
180
190
  children: "Loading…"
181
191
  }),
182
- !L.loading && z.length === 0 && /* @__PURE__ */ y("p", {
192
+ !L.loading && z.length === 0 && /* @__PURE__ */ b("p", {
183
193
  className: "text-sm text-muted-foreground py-4 text-center",
184
194
  children: g ? "No matching members." : "Everyone in the workspace is already on this team."
185
195
  }),
186
196
  z.map((e) => {
187
197
  let t = `team-add-member-${e.id}`;
188
- return /* @__PURE__ */ b("label", {
198
+ return /* @__PURE__ */ x("label", {
189
199
  htmlFor: t,
190
200
  className: "flex items-center gap-3 border rounded-md p-2 text-sm cursor-pointer hover:bg-muted",
191
- children: [/* @__PURE__ */ y(S, {
201
+ children: [/* @__PURE__ */ b(C, {
192
202
  id: t,
193
- checked: v.has(e.id),
203
+ checked: _.has(e.id),
194
204
  onCheckedChange: (t) => H(e.id, t === !0)
195
- }), /* @__PURE__ */ b("span", {
205
+ }), /* @__PURE__ */ x("span", {
196
206
  className: "min-w-0 flex-1 truncate",
197
- children: [e.name, e.email && /* @__PURE__ */ b("span", {
207
+ children: [e.name, e.email && /* @__PURE__ */ x("span", {
198
208
  className: "text-muted-foreground",
199
209
  children: [" · ", e.email]
200
210
  })]
201
211
  })]
202
212
  }, e.id);
203
213
  }),
204
- L.hasMore && /* @__PURE__ */ y("button", {
214
+ L.hasMore && /* @__PURE__ */ b("button", {
205
215
  type: "button",
206
216
  className: "w-full py-1 text-xs text-primary hover:underline",
207
217
  onClick: L.fetchMore,
@@ -209,40 +219,40 @@ function R({ teamId: t, existingActorIds: n }) {
209
219
  })
210
220
  ]
211
221
  }),
212
- P && /* @__PURE__ */ y(s, { message: P }),
213
- /* @__PURE__ */ y(D, { children: /* @__PURE__ */ y(x, {
222
+ P && /* @__PURE__ */ b(s, { message: P }),
223
+ /* @__PURE__ */ b(O, { children: /* @__PURE__ */ b(S, {
214
224
  onClick: async () => {
215
- I(null);
225
+ F(null);
216
226
  try {
217
227
  await a(B({ variables: {
218
228
  id: t,
219
- input: { actorIds: [...v] }
229
+ input: { actorIds: [..._] }
220
230
  } })), U(), f(!1);
221
231
  } catch (e) {
222
- I(e instanceof Error ? e.message : "The members could not be added.");
232
+ F(e instanceof Error ? e.message : "The members could not be added.");
223
233
  }
224
234
  },
225
- disabled: v.size === 0 || V.loading,
235
+ disabled: _.size === 0 || V.loading,
226
236
  "data-testid": "team-add-members-confirm",
227
- children: V.loading ? "Adding…" : `Add ${v.size} member${v.size === 1 ? "" : "s"}`
237
+ children: V.loading ? "Adding…" : `Add ${_.size} member${_.size === 1 ? "" : "s"}`
228
238
  }) })
229
239
  ]
230
240
  })]
231
241
  });
232
242
  }
233
- var z = g`
243
+ var B = _`
234
244
  mutation TeamControlsAddProjects($id: ID!, $input: PlanmagnetTeamProjectsInput!) {
235
245
  planmagnetAddTeamProjects(id: $id, input: $input) {
236
246
  id
237
247
  }
238
248
  }
239
- `, B = g`
249
+ `, V = _`
240
250
  mutation TeamControlsRemoveProjects($id: ID!, $input: PlanmagnetTeamProjectsInput!) {
241
251
  planmagnetRemoveTeamProjects(id: $id, input: $input) {
242
252
  id
243
253
  }
244
254
  }
245
- `, V = g`
255
+ `, H = _`
246
256
  query TeamControlsCandidateProjects($workspaceId: ID!) {
247
257
  planmagnetProjects(workspaceId: $workspaceId, pagination: { first: 100 }) {
248
258
  items {
@@ -254,9 +264,9 @@ var z = g`
254
264
  }
255
265
  }
256
266
  `;
257
- function H({ teamId: e, projects: n }) {
258
- let r = t(), [i, o] = _(B, {
259
- refetchQueries: M,
267
+ function U({ teamId: e, projects: n }) {
268
+ let r = t(), [i, o] = v(V, {
269
+ refetchQueries: N,
260
270
  awaitRefetchQueries: !0
261
271
  }), [l, u] = d(null), [f, p] = d(null), m = async (t) => {
262
272
  u(null), p(t);
@@ -271,107 +281,107 @@ function H({ teamId: e, projects: n }) {
271
281
  p(null);
272
282
  }
273
283
  };
274
- return /* @__PURE__ */ b("div", {
284
+ return /* @__PURE__ */ x("div", {
275
285
  className: "space-y-3",
276
286
  "data-testid": "team-projects",
277
287
  children: [
278
- /* @__PURE__ */ b("div", {
288
+ /* @__PURE__ */ x("div", {
279
289
  className: "flex items-center justify-between",
280
- children: [/* @__PURE__ */ b("p", {
290
+ children: [/* @__PURE__ */ x("p", {
281
291
  className: "text-sm text-muted-foreground",
282
292
  children: [
283
293
  n.length,
284
294
  " project",
285
295
  n.length === 1 ? "" : "s"
286
296
  ]
287
- }), /* @__PURE__ */ y(U, {
297
+ }), /* @__PURE__ */ b(W, {
288
298
  teamId: e,
289
299
  existingProjectIds: n.map((e) => e.id)
290
300
  })]
291
301
  }),
292
- l && /* @__PURE__ */ y(s, { message: l }),
293
- n.length === 0 ? /* @__PURE__ */ y("p", {
302
+ l && /* @__PURE__ */ b(s, { message: l }),
303
+ n.length === 0 ? /* @__PURE__ */ b("p", {
294
304
  className: "text-sm text-muted-foreground text-center py-4",
295
305
  children: "No projects on this team yet. Team sprints can only draw work items from these."
296
- }) : /* @__PURE__ */ y("ul", {
306
+ }) : /* @__PURE__ */ b("ul", {
297
307
  className: "space-y-1",
298
- children: n.map((e) => /* @__PURE__ */ b("li", {
308
+ children: n.map((e) => /* @__PURE__ */ x("li", {
299
309
  className: "flex items-center justify-between gap-2 border rounded-md p-2 text-sm",
300
- children: [/* @__PURE__ */ b("button", {
310
+ children: [/* @__PURE__ */ x("button", {
301
311
  type: "button",
302
312
  className: "min-w-0 truncate text-left hover:underline",
303
313
  onClick: () => r(c("/projects/project-detail-page", e.id)),
304
- children: [/* @__PURE__ */ y("span", {
314
+ children: [/* @__PURE__ */ b("span", {
305
315
  className: "text-muted-foreground mr-2",
306
316
  children: e.key
307
317
  }), e.name]
308
- }), /* @__PURE__ */ y(x, {
318
+ }), /* @__PURE__ */ b(S, {
309
319
  size: "sm",
310
320
  variant: "ghost",
311
321
  "aria-label": `Remove ${e.name} from team`,
312
322
  disabled: o.loading,
313
323
  onClick: () => m(e.id),
314
- children: f === e.id ? "…" : /* @__PURE__ */ y(h, { className: "h-4 w-4" })
324
+ children: f === e.id ? "…" : /* @__PURE__ */ b(g, { className: "h-4 w-4" })
315
325
  })]
316
326
  }, e.id))
317
327
  })
318
328
  ]
319
329
  });
320
330
  }
321
- function U({ teamId: t, existingProjectIds: n }) {
322
- let { workspaceId: r } = e(), [i, o] = d(!1), [c, l] = d(/* @__PURE__ */ new Set()), [u, f] = d(null), { data: m, loading: h } = v(V, {
331
+ function W({ teamId: t, existingProjectIds: n }) {
332
+ let { workspaceId: r } = e(), [i, o] = d(!1), [c, l] = d(/* @__PURE__ */ new Set()), [u, f] = d(null), { data: p, loading: h } = y(H, {
323
333
  variables: { workspaceId: r ?? "" },
324
334
  skip: !i || !r
325
- }), g = (m?.planmagnetProjects.items ?? []).filter((e) => !n.includes(e.id)), [C, j] = _(z, {
326
- refetchQueries: M,
335
+ }), g = (p?.planmagnetProjects.items ?? []).filter((e) => !n.includes(e.id)), [_, w] = v(B, {
336
+ refetchQueries: N,
327
337
  awaitRefetchQueries: !0
328
- }), N = (e, t) => l((n) => {
338
+ }), M = (e, t) => l((n) => {
329
339
  let r = new Set(n);
330
340
  return t ? r.add(e) : r.delete(e), r;
331
341
  }), P = () => {
332
342
  l(/* @__PURE__ */ new Set()), f(null);
333
343
  };
334
- return /* @__PURE__ */ b(w, {
344
+ return /* @__PURE__ */ x(T, {
335
345
  open: i,
336
346
  onOpenChange: (e) => {
337
347
  o(e), e || P();
338
348
  },
339
- children: [/* @__PURE__ */ y(A, {
349
+ children: [/* @__PURE__ */ b(j, {
340
350
  asChild: !0,
341
- children: /* @__PURE__ */ b(x, {
351
+ children: /* @__PURE__ */ x(S, {
342
352
  size: "sm",
343
353
  variant: "outline",
344
354
  "data-testid": "team-add-projects",
345
- children: [/* @__PURE__ */ y(p, { className: "mr-1 h-4 w-4" }), "Add projects"]
355
+ children: [/* @__PURE__ */ b(m, { className: "mr-1 h-4 w-4" }), "Add projects"]
346
356
  })
347
- }), /* @__PURE__ */ b(T, {
357
+ }), /* @__PURE__ */ x(E, {
348
358
  className: "max-w-lg",
349
359
  children: [
350
- /* @__PURE__ */ b(O, { children: [/* @__PURE__ */ y(k, { children: "Add projects" }), /* @__PURE__ */ y(E, { children: "A team sprint can only hold work items from a project on this list." })] }),
351
- /* @__PURE__ */ b("div", {
360
+ /* @__PURE__ */ x(k, { children: [/* @__PURE__ */ b(A, { children: "Add projects" }), /* @__PURE__ */ b(D, { children: "A team sprint can only hold work items from a project on this list." })] }),
361
+ /* @__PURE__ */ x("div", {
352
362
  className: "max-h-80 overflow-y-auto space-y-1",
353
363
  "data-testid": "team-add-project-candidates",
354
364
  children: [
355
- h && /* @__PURE__ */ y("p", {
365
+ h && /* @__PURE__ */ b("p", {
356
366
  className: "text-sm text-muted-foreground py-4 text-center",
357
367
  children: "Loading…"
358
368
  }),
359
- !h && g.length === 0 && /* @__PURE__ */ y("p", {
369
+ !h && g.length === 0 && /* @__PURE__ */ b("p", {
360
370
  className: "text-sm text-muted-foreground py-4 text-center",
361
371
  children: "Every project in this workspace is already on this team."
362
372
  }),
363
373
  g.map((e) => {
364
374
  let t = `team-add-project-${e.id}`;
365
- return /* @__PURE__ */ b("label", {
375
+ return /* @__PURE__ */ x("label", {
366
376
  htmlFor: t,
367
377
  className: "flex items-center gap-3 border rounded-md p-2 text-sm cursor-pointer hover:bg-muted",
368
- children: [/* @__PURE__ */ y(S, {
378
+ children: [/* @__PURE__ */ b(C, {
369
379
  id: t,
370
380
  checked: c.has(e.id),
371
- onCheckedChange: (t) => N(e.id, t === !0)
372
- }), /* @__PURE__ */ b("span", {
381
+ onCheckedChange: (t) => M(e.id, t === !0)
382
+ }), /* @__PURE__ */ x("span", {
373
383
  className: "min-w-0 flex-1 truncate",
374
- children: [/* @__PURE__ */ y("span", {
384
+ children: [/* @__PURE__ */ b("span", {
375
385
  className: "text-muted-foreground mr-2",
376
386
  children: e.key
377
387
  }), e.name]
@@ -380,12 +390,12 @@ function U({ teamId: t, existingProjectIds: n }) {
380
390
  })
381
391
  ]
382
392
  }),
383
- u && /* @__PURE__ */ y(s, { message: u }),
384
- /* @__PURE__ */ y(D, { children: /* @__PURE__ */ y(x, {
393
+ u && /* @__PURE__ */ b(s, { message: u }),
394
+ /* @__PURE__ */ b(O, { children: /* @__PURE__ */ b(S, {
385
395
  onClick: async () => {
386
396
  f(null);
387
397
  try {
388
- await a(C({ variables: {
398
+ await a(_({ variables: {
389
399
  id: t,
390
400
  input: { projectIds: [...c] }
391
401
  } })), P(), o(!1);
@@ -393,15 +403,15 @@ function U({ teamId: t, existingProjectIds: n }) {
393
403
  f(e instanceof Error ? e.message : "The projects could not be added.");
394
404
  }
395
405
  },
396
- disabled: c.size === 0 || j.loading,
406
+ disabled: c.size === 0 || w.loading,
397
407
  "data-testid": "team-add-projects-confirm",
398
- children: j.loading ? "Adding…" : `Add ${c.size} project${c.size === 1 ? "" : "s"}`
408
+ children: w.loading ? "Adding…" : `Add ${c.size} project${c.size === 1 ? "" : "s"}`
399
409
  }) })
400
410
  ]
401
411
  })]
402
412
  });
403
413
  }
404
414
  //#endregion
405
- export { M as TEAM_QUERIES, P as TeamHeaderActions, L as TeamMembersPanel, H as TeamProjectsPanel };
415
+ export { N as TEAM_QUERIES, F as TeamHeaderActions, R as TeamMembersPanel, U as TeamProjectsPanel };
406
416
 
407
417
  //# sourceMappingURL=TeamControls.js.map