@burdenoff/microfe-planmagnet 2026.930.15 → 2026.930.17

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 (40) hide show
  1. package/dist/planmagnet/comments/CommentThread.d.ts +44 -0
  2. package/dist/planmagnet/comments/CommentThread.d.ts.map +1 -0
  3. package/dist/planmagnet/comments/CommentThread.js +513 -0
  4. package/dist/planmagnet/comments/CommentThread.js.map +1 -0
  5. package/dist/planmagnet/comments/MentionComposer.d.ts +25 -0
  6. package/dist/planmagnet/comments/MentionComposer.d.ts.map +1 -0
  7. package/dist/planmagnet/comments/MentionComposer.js +148 -0
  8. package/dist/planmagnet/comments/MentionComposer.js.map +1 -0
  9. package/dist/planmagnet/comments/RoadmapComments.d.ts +29 -0
  10. package/dist/planmagnet/comments/RoadmapComments.d.ts.map +1 -0
  11. package/dist/planmagnet/comments/RoadmapComments.js +310 -0
  12. package/dist/planmagnet/comments/RoadmapComments.js.map +1 -0
  13. package/dist/planmagnet/comments/TargetComments.d.ts +7 -0
  14. package/dist/planmagnet/comments/TargetComments.d.ts.map +1 -0
  15. package/dist/planmagnet/comments/TargetComments.js +207 -0
  16. package/dist/planmagnet/comments/TargetComments.js.map +1 -0
  17. package/dist/planmagnet/comments/WorkItemComments.d.ts.map +1 -1
  18. package/dist/planmagnet/comments/WorkItemComments.js +68 -216
  19. package/dist/planmagnet/comments/WorkItemComments.js.map +1 -1
  20. package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
  21. package/dist/planmagnet/pages/DocsDocDetailPagePage.js +74 -72
  22. package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
  23. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
  24. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +130 -112
  25. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
  26. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
  27. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +76 -74
  28. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
  29. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
  30. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +157 -151
  31. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
  32. package/dist/planmagnet/roadmaps/RoadmapReviewPanel.d.ts +4 -0
  33. package/dist/planmagnet/roadmaps/RoadmapReviewPanel.d.ts.map +1 -0
  34. package/dist/planmagnet/roadmaps/RoadmapReviewPanel.js +370 -0
  35. package/dist/planmagnet/roadmaps/RoadmapReviewPanel.js.map +1 -0
  36. package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.d.ts +4 -0
  37. package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.d.ts.map +1 -0
  38. package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.js +396 -0
  39. package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.js.map +1 -0
  40. package/package.json +1 -1
@@ -2,14 +2,15 @@ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
2
2
  import { throwOnError as t } from "../utils/mutationResult.js";
3
3
  import { enumLabel as n } from "../controls/WorkItemControls.js";
4
4
  import { isForbidden as r, mutationErrorMessage as i } from "../utils/graphqlErrors.js";
5
- import { useEffect as a, useMemo as o, useState as s } from "react";
6
- import { AlertTriangle as c, Calendar as l, Gauge as u, Inbox as d, Loader2 as f, ShieldAlert as p, ShieldCheck as m } from "lucide-react";
7
- import { gql as h } from "@apollo/client";
8
- import { useMutation as g, useQuery as _ } from "@apollo/client/react";
9
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
10
- import { Tooltip as b, TooltipContent as x, TooltipProvider as S, TooltipTrigger as C } from "@burdenoff/fe-libs/ui";
5
+ import { RoadmapItemCommentsButton as a } from "../comments/RoadmapComments.js";
6
+ import { useEffect as o, useMemo as s, useState as c } from "react";
7
+ import { AlertTriangle as l, Calendar as u, Gauge as d, Inbox as f, Loader2 as p, ShieldAlert as m, ShieldCheck 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 { Tooltip as x, TooltipContent as S, TooltipProvider as C, TooltipTrigger as w } from "@burdenoff/fe-libs/ui";
11
12
  //#region src/planmagnet/roadmaps/RoadmapNowNextLater.tsx
12
- var w = "\n id\n title\n status\n startDate\n endDate\n horizon\n swimlane\n sortOrder\n confidence\n riskLevel\n riskNote\n featureRequestDemand {\n requests\n votes\n }\n", T = h`
13
+ var T = "\n id\n title\n status\n startDate\n endDate\n horizon\n swimlane\n sortOrder\n confidence\n riskLevel\n riskNote\n featureRequestDemand {\n requests\n votes\n }\n", E = g`
13
14
  query RoadmapNowNextLaterItems(
14
15
  $workspaceId: ID!
15
16
  $filter: PlanmagnetRoadmapItemFilter
@@ -17,7 +18,7 @@ var w = "\n id\n title\n status\n startDate\n endDate\n horizon\n swimlan
17
18
  ) {
18
19
  planmagnetRoadmapItems(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
19
20
  items {
20
- ${w}
21
+ ${T}
21
22
  }
22
23
  pageInfo {
23
24
  hasNextPage
@@ -26,13 +27,13 @@ var w = "\n id\n title\n status\n startDate\n endDate\n horizon\n swimlan
26
27
  totalCount
27
28
  }
28
29
  }
29
- `, E = h`
30
+ `, D = g`
30
31
  mutation RoadmapNowNextLaterMove($id: ID!, $input: PlanmagnetMoveRoadmapItemInput!) {
31
32
  planmagnetMoveRoadmapItem(id: $id, input: $input) {
32
- ${w}
33
+ ${T}
33
34
  }
34
35
  }
35
- `, D = [
36
+ `, O = [
36
37
  {
37
38
  key: "UNPLACED",
38
39
  label: "Not placed",
@@ -53,20 +54,20 @@ var w = "\n id\n title\n status\n startDate\n endDate\n horizon\n swimlan
53
54
  label: "Later",
54
55
  horizon: "LATER"
55
56
  }
56
- ], O = (e) => e ?? "UNPLACED", k = 200, A = 2e3;
57
- function j(e, t) {
58
- let { data: n, loading: r, error: i, fetchMore: o } = _(T, {
57
+ ], k = (e) => e ?? "UNPLACED", A = 200, j = 2e3;
58
+ function M(e, t) {
59
+ let { data: n, loading: r, error: i, fetchMore: a } = v(E, {
59
60
  variables: {
60
61
  workspaceId: e ?? "",
61
62
  filter: { roadmapId: t },
62
- pagination: { first: k }
63
+ pagination: { first: A }
63
64
  },
64
65
  skip: !e || !t
65
66
  }), s = n?.planmagnetRoadmapItems.items ?? [], c = n?.planmagnetRoadmapItems.pageInfo.hasNextPage ?? !1, l = n?.planmagnetRoadmapItems.pageInfo.endCursor ?? null, u = n?.planmagnetRoadmapItems.totalCount ?? 0;
66
- return a(() => {
67
- !c || !l || s.length >= A || o({
67
+ return o(() => {
68
+ !c || !l || s.length >= j || a({
68
69
  variables: { pagination: {
69
- first: k,
70
+ first: A,
70
71
  after: l
71
72
  } },
72
73
  updateQuery: (e, { fetchMoreResult: t }) => ({ planmagnetRoadmapItems: {
@@ -78,67 +79,67 @@ function j(e, t) {
78
79
  c,
79
80
  l,
80
81
  s.length,
81
- o
82
+ a
82
83
  ]), {
83
84
  items: s,
84
85
  loading: r && !n,
85
86
  error: i,
86
87
  totalCount: u,
87
- truncated: c && s.length >= A
88
+ truncated: c && s.length >= j
88
89
  };
89
90
  }
90
- var M = (e) => e.swimlane ?? "", N = (e) => e || "Uncategorized";
91
- function P(e, t, n) {
91
+ var N = (e) => e.swimlane ?? "", P = (e) => e || "Uncategorized";
92
+ function F(e, t, n) {
92
93
  let r = e.filter((e) => e.id !== t);
93
94
  if (n === null) return r.length;
94
95
  let i = r.findIndex((e) => e.id === n);
95
96
  return i === -1 ? r.length : i;
96
97
  }
97
- var F = {
98
+ var I = {
98
99
  LOW: {
99
- Icon: m,
100
+ Icon: h,
100
101
  label: "Low risk",
101
102
  className: "text-muted-foreground"
102
103
  },
103
104
  MEDIUM: {
104
- Icon: c,
105
+ Icon: l,
105
106
  label: "Medium risk",
106
107
  className: "text-status-warning-text"
107
108
  },
108
109
  HIGH: {
109
- Icon: p,
110
+ Icon: m,
110
111
  label: "High risk",
111
112
  className: "text-status-error-text"
112
113
  }
113
114
  };
114
- function I({ level: e, note: t }) {
115
+ function L({ level: e, note: t }) {
115
116
  if (!e) return null;
116
- let n = F[e], r = /* @__PURE__ */ y("span", {
117
+ let n = I[e], r = /* @__PURE__ */ b("span", {
117
118
  "data-testid": "nnl-risk",
118
119
  className: `inline-flex items-center gap-1 text-xs ${n.className}`,
119
- children: [/* @__PURE__ */ v(n.Icon, {
120
+ children: [/* @__PURE__ */ y(n.Icon, {
120
121
  className: "h-3.5 w-3.5",
121
122
  "aria-hidden": "true"
122
123
  }), n.label]
123
124
  });
124
- return t ? /* @__PURE__ */ v(S, { children: /* @__PURE__ */ y(b, { children: [/* @__PURE__ */ v(C, {
125
+ return t ? /* @__PURE__ */ y(C, { children: /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(w, {
125
126
  asChild: !0,
126
- children: /* @__PURE__ */ v("button", {
127
+ children: /* @__PURE__ */ y("button", {
127
128
  type: "button",
128
129
  className: "rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
129
130
  children: r
130
131
  })
131
- }), /* @__PURE__ */ v(x, {
132
+ }), /* @__PURE__ */ y(S, {
132
133
  className: "max-w-xs",
133
134
  children: t
134
135
  })] }) }) : r;
135
136
  }
136
- function L({ confidence: e }) {
137
- return e === null ? null : /* @__PURE__ */ y("span", {
137
+ function R({ confidence: e }) {
138
+ return e === null ? null : /* @__PURE__ */ b("span", {
138
139
  "data-testid": "nnl-confidence",
139
140
  className: "inline-flex items-center gap-1 text-xs text-muted-foreground",
140
141
  children: [
141
- /* @__PURE__ */ v(u, {
142
+ /* @__PURE__ */ y(d, {
142
143
  className: "h-3.5 w-3.5",
143
144
  "aria-hidden": "true"
144
145
  }),
@@ -147,9 +148,9 @@ function L({ confidence: e }) {
147
148
  ]
148
149
  });
149
150
  }
150
- function R({ item: e, columnKey: t, laneItems: n, disabled: r, onMoveTo: i, onShift: a }) {
151
+ function z({ item: e, columnKey: t, laneItems: n, disabled: r, onMoveTo: i, onShift: a }) {
151
152
  let o = n.findIndex((t) => t.id === e.id), s = o > 0, c = o !== -1 && o < n.length - 1;
152
- return /* @__PURE__ */ y("select", {
153
+ return /* @__PURE__ */ b("select", {
153
154
  id: `nnl-move-${e.id}`,
154
155
  "aria-label": `Move ${e.title}`,
155
156
  "data-testid": "nnl-card-move",
@@ -161,20 +162,20 @@ function R({ item: e, columnKey: t, laneItems: n, disabled: r, onMoveTo: i, onSh
161
162
  t === "up" ? a(-1) : t === "down" ? a(1) : t && i(t);
162
163
  },
163
164
  children: [
164
- /* @__PURE__ */ v("option", {
165
+ /* @__PURE__ */ y("option", {
165
166
  value: "",
166
167
  children: "Move…"
167
168
  }),
168
- D.filter((e) => e.key !== t).map((e) => /* @__PURE__ */ y("option", {
169
+ O.filter((e) => e.key !== t).map((e) => /* @__PURE__ */ b("option", {
169
170
  value: e.key,
170
171
  children: ["Move to ", e.label]
171
172
  }, e.key)),
172
- /* @__PURE__ */ v("option", {
173
+ /* @__PURE__ */ y("option", {
173
174
  value: "up",
174
175
  disabled: !s,
175
176
  children: "Move up"
176
177
  }),
177
- /* @__PURE__ */ v("option", {
178
+ /* @__PURE__ */ y("option", {
178
179
  value: "down",
179
180
  disabled: !c,
180
181
  children: "Move down"
@@ -182,80 +183,84 @@ function R({ item: e, columnKey: t, laneItems: n, disabled: r, onMoveTo: i, onSh
182
183
  ]
183
184
  });
184
185
  }
185
- function z({ item: e, columnKey: t, laneItems: r, draggable: i, dragging: a, dropIndicator: o, moveDisabled: s, onDragStart: c, onDragEnd: u, onDragOverCard: d, onDropOnCard: f, onMoveTo: p, onShift: m }) {
186
- let h = e.featureRequestDemand;
187
- return /* @__PURE__ */ y("li", {
188
- draggable: i,
189
- onDragStart: (t) => {
190
- t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move", c(e.id);
186
+ function B({ roadmapId: e, item: t, columnKey: r, laneItems: i, draggable: o, dragging: s, dropIndicator: c, moveDisabled: l, onDragStart: d, onDragEnd: f, onDragOverCard: p, onDropOnCard: m, onMoveTo: h, onShift: g }) {
187
+ let _ = t.featureRequestDemand;
188
+ return /* @__PURE__ */ b("li", {
189
+ draggable: o,
190
+ onDragStart: (e) => {
191
+ e.dataTransfer.setData("text/plain", t.id), e.dataTransfer.effectAllowed = "move", d(t.id);
191
192
  },
192
- onDragEnd: u,
193
- onDragOver: d,
194
- onDrop: f,
193
+ onDragEnd: f,
194
+ onDragOver: p,
195
+ onDrop: m,
195
196
  "data-testid": "nnl-card",
196
197
  className: [
197
198
  "space-y-1.5 rounded-md border bg-background p-2 text-sm",
198
- i ? "cursor-grab" : "",
199
- a ? "opacity-50" : "",
200
- o === "before" ? "border-t-2 border-t-primary" : "",
201
- o === "after" ? "border-b-2 border-b-primary" : ""
199
+ o ? "cursor-grab" : "",
200
+ s ? "opacity-50" : "",
201
+ c === "before" ? "border-t-2 border-t-primary" : "",
202
+ c === "after" ? "border-b-2 border-b-primary" : ""
202
203
  ].filter(Boolean).join(" "),
203
204
  children: [
204
- /* @__PURE__ */ v("p", {
205
+ /* @__PURE__ */ y("p", {
205
206
  className: "font-medium leading-tight",
206
- children: e.title
207
+ children: t.title
207
208
  }),
208
- /* @__PURE__ */ y("div", {
209
+ /* @__PURE__ */ b("div", {
209
210
  className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground",
210
- children: [/* @__PURE__ */ v("span", { children: n(e.status) }), (e.startDate || e.endDate) && /* @__PURE__ */ y("span", {
211
+ children: [/* @__PURE__ */ y("span", { children: n(t.status) }), (t.startDate || t.endDate) && /* @__PURE__ */ b("span", {
211
212
  className: "flex items-center gap-1",
212
213
  children: [
213
- /* @__PURE__ */ v(l, {
214
+ /* @__PURE__ */ y(u, {
214
215
  className: "h-3 w-3",
215
216
  "aria-hidden": "true"
216
217
  }),
217
- e.startDate ? new Date(e.startDate).toLocaleDateString() : "?",
218
+ t.startDate ? new Date(t.startDate).toLocaleDateString() : "?",
218
219
  " - ",
219
- e.endDate ? new Date(e.endDate).toLocaleDateString() : "?"
220
+ t.endDate ? new Date(t.endDate).toLocaleDateString() : "?"
220
221
  ]
221
222
  })]
222
223
  }),
223
- h && h.requests > 0 && /* @__PURE__ */ y("p", {
224
+ _ && _.requests > 0 && /* @__PURE__ */ b("p", {
224
225
  className: "text-xs text-muted-foreground",
225
226
  "data-testid": "roadmap-item-demand",
226
227
  children: [
227
- h.requests,
228
+ _.requests,
228
229
  " feature request",
229
- h.requests === 1 ? "" : "s",
230
+ _.requests === 1 ? "" : "s",
230
231
  " · ",
231
- h.votes,
232
+ _.votes,
232
233
  " vote",
233
- h.votes === 1 ? "" : "s"
234
+ _.votes === 1 ? "" : "s"
234
235
  ]
235
236
  }),
236
- /* @__PURE__ */ y("div", {
237
+ /* @__PURE__ */ b("div", {
237
238
  className: "flex flex-wrap items-center gap-x-3 gap-y-1",
238
- children: [/* @__PURE__ */ v(L, { confidence: e.confidence }), /* @__PURE__ */ v(I, {
239
- level: e.riskLevel,
240
- note: e.riskNote
239
+ children: [/* @__PURE__ */ y(R, { confidence: t.confidence }), /* @__PURE__ */ y(L, {
240
+ level: t.riskLevel,
241
+ note: t.riskNote
241
242
  })]
242
243
  }),
243
- /* @__PURE__ */ v("div", {
244
- className: "flex justify-end pt-0.5",
245
- children: /* @__PURE__ */ v(R, {
246
- item: e,
247
- columnKey: t,
248
- laneItems: r,
249
- disabled: s,
250
- onMoveTo: p,
251
- onShift: m
252
- })
244
+ /* @__PURE__ */ b("div", {
245
+ className: "flex items-center justify-between gap-1 pt-0.5",
246
+ children: [/* @__PURE__ */ y(a, {
247
+ roadmapId: e,
248
+ itemId: t.id,
249
+ itemTitle: t.title
250
+ }), /* @__PURE__ */ y(z, {
251
+ item: t,
252
+ columnKey: r,
253
+ laneItems: i,
254
+ disabled: l,
255
+ onMoveTo: h,
256
+ onShift: g
257
+ })]
253
258
  })
254
259
  ]
255
260
  });
256
261
  }
257
- function B({ roadmapId: n }) {
258
- let { workspaceId: c } = e(), { items: l, loading: u, error: p, totalCount: m, truncated: h } = j(c, n), [_, b] = g(E, {
262
+ function V({ roadmapId: n }) {
263
+ let { workspaceId: a } = e(), { items: l, loading: u, error: d, totalCount: m, truncated: h } = M(a, n), [g, v] = _(D, {
259
264
  refetchQueries: [
260
265
  "GetRoadmapDetailPage",
261
266
  "GetRoadmapDetail",
@@ -263,23 +268,23 @@ function B({ roadmapId: n }) {
263
268
  "RoadmapNowNextLaterItems"
264
269
  ],
265
270
  awaitRefetchQueries: !0
266
- }), [x, S] = s(null), [C, w] = s(!1), [T, k] = s(""), [F, I] = s(null), [L, R] = s(null), [B, V] = s(null), H = o(() => {
271
+ }), [x, S] = c(null), [C, w] = c(!1), [T, E] = c(""), [A, I] = c(null), [L, R] = c(null), [z, V] = c(null), H = s(() => {
267
272
  let e = /* @__PURE__ */ new Set(), t = [];
268
273
  for (let n of l) {
269
- let r = M(n);
274
+ let r = N(n);
270
275
  e.has(r) || (e.add(r), t.push(r));
271
276
  }
272
277
  return t;
273
- }, [l]), U = H.length > 1, W = o(() => {
278
+ }, [l]), U = H.length > 1, W = s(() => {
274
279
  let e = {
275
280
  UNPLACED: [],
276
281
  NOW: [],
277
282
  NEXT: [],
278
283
  LATER: []
279
284
  };
280
- for (let t of l) e[O(t.horizon)].push(t);
285
+ for (let t of l) e[k(t.horizon)].push(t);
281
286
  return e;
282
- }, [l]), G = o(() => {
287
+ }, [l]), G = s(() => {
283
288
  let e = {
284
289
  UNPLACED: {},
285
290
  NOW: {},
@@ -288,45 +293,45 @@ function B({ roadmapId: n }) {
288
293
  };
289
294
  for (let t of H) e.UNPLACED[t] = [], e.NOW[t] = [], e.NEXT[t] = [], e.LATER[t] = [];
290
295
  for (let t of l) {
291
- let n = O(t.horizon), r = M(t);
296
+ let n = k(t.horizon), r = N(t);
292
297
  (e[n][r] ??= []).push(t);
293
298
  }
294
299
  return e;
295
300
  }, [l, H]);
296
- a(() => {
297
- if (!B) return;
298
- let e = B, t = requestAnimationFrame(() => {
301
+ o(() => {
302
+ if (!z) return;
303
+ let e = z, t = requestAnimationFrame(() => {
299
304
  document.getElementById(`nnl-move-${e}`)?.focus(), V(null);
300
305
  });
301
306
  return () => cancelAnimationFrame(t);
302
307
  }, [l]);
303
- let K = b.loading, q = !C, J = F ? l.find((e) => e.id === F) ?? null : null, Y = async (e, n, a, o, s) => {
308
+ let K = v.loading, q = !C, J = A ? l.find((e) => e.id === A) ?? null : null, Y = async (e, n, a, o, s) => {
304
309
  S(null), s && V(e.id);
305
310
  try {
306
- await t(_({ variables: {
311
+ await t(g({ variables: {
307
312
  id: e.id,
308
313
  input: {
309
314
  horizon: n,
310
315
  index: a
311
316
  }
312
- } })), k(`Moved "${e.title}" to ${o}.`);
317
+ } })), E(`Moved "${e.title}" to ${o}.`);
313
318
  } catch (e) {
314
- if (r(e)) w(!0), S("Your role cannot reorder this roadmap."), k("Move refused: your role cannot reorder this roadmap.");
319
+ if (r(e)) w(!0), S("Your role cannot reorder this roadmap."), E("Move refused: your role cannot reorder this roadmap.");
315
320
  else {
316
321
  let t = i(e, "The item could not be moved.");
317
- S(t), k(`Move failed: ${t}`);
322
+ S(t), E(`Move failed: ${t}`);
318
323
  }
319
324
  }
320
325
  }, X = (e, t, n, r, i) => {
321
326
  if (!q || K) return;
322
327
  let a = l.find((e) => e.id === r);
323
- if (!a || M(a) !== t) return;
324
- let o = D.find((t) => t.key === e);
328
+ if (!a || N(a) !== t) return;
329
+ let o = O.find((t) => t.key === e);
325
330
  if (!o) return;
326
- let s = P(n, a.id, i);
327
- O(a.horizon) === e && n.findIndex((e) => e.id === a.id) === s || Y(a, o.horizon, s, o.label, !1);
331
+ let s = F(n, a.id, i);
332
+ k(a.horizon) === e && n.findIndex((e) => e.id === a.id) === s || Y(a, o.horizon, s, o.label, !1);
328
333
  }, Z = (e, t, n) => (r, i, a) => {
329
- if (!q || K || !J || M(J) !== t) return;
334
+ if (!q || K || !J || N(J) !== t) return;
330
335
  r.preventDefault(), r.stopPropagation(), r.dataTransfer.dropEffect = "move";
331
336
  let o = r.currentTarget.getBoundingClientRect();
332
337
  R({
@@ -339,80 +344,80 @@ function B({ roadmapId: n }) {
339
344
  let i = r.dataTransfer.getData("text/plain"), a = L?.columnKey === e && L.laneKey === t ? L.beforeId : null;
340
345
  R(null), I(null), i && X(e, t, n, i, a);
341
346
  };
342
- return u ? /* @__PURE__ */ v("div", {
347
+ return u ? /* @__PURE__ */ y("div", {
343
348
  className: "flex items-center justify-center p-12",
344
349
  "data-testid": "nnl-board",
345
- children: /* @__PURE__ */ v(f, {
350
+ children: /* @__PURE__ */ y(p, {
346
351
  className: "h-8 w-8 animate-spin text-muted-foreground",
347
352
  "aria-hidden": "true"
348
353
  })
349
- }) : p ? /* @__PURE__ */ y("div", {
354
+ }) : d ? /* @__PURE__ */ b("div", {
350
355
  className: "p-6 text-destructive",
351
356
  "data-testid": "nnl-board",
352
- children: ["Failed to load roadmap items: ", p.message]
353
- }) : /* @__PURE__ */ y("div", {
357
+ children: ["Failed to load roadmap items: ", d.message]
358
+ }) : /* @__PURE__ */ b("div", {
354
359
  className: "space-y-3",
355
360
  "data-testid": "nnl-board",
356
361
  children: [
357
- /* @__PURE__ */ v("p", {
362
+ /* @__PURE__ */ y("p", {
358
363
  className: "sr-only",
359
364
  role: "status",
360
365
  "aria-live": "polite",
361
366
  children: T
362
367
  }),
363
- C && /* @__PURE__ */ v("p", {
368
+ C && /* @__PURE__ */ y("p", {
364
369
  role: "alert",
365
370
  className: "rounded-md border border-destructive/40 p-2 text-sm text-destructive",
366
371
  children: "Your role can view this roadmap but not reorder it. Moves are disabled below."
367
372
  }),
368
- !C && x && /* @__PURE__ */ v("p", {
373
+ !C && x && /* @__PURE__ */ y("p", {
369
374
  role: "alert",
370
375
  className: "rounded-md border border-destructive/40 p-2 text-sm text-destructive",
371
376
  children: x
372
377
  }),
373
- h && /* @__PURE__ */ y("p", {
378
+ h && /* @__PURE__ */ b("p", {
374
379
  className: "text-xs text-muted-foreground",
375
380
  children: [
376
381
  "Showing the first ",
377
- A,
382
+ j,
378
383
  " of ",
379
384
  m,
380
385
  " items."
381
386
  ]
382
387
  }),
383
- /* @__PURE__ */ v("div", {
388
+ /* @__PURE__ */ y("div", {
384
389
  className: "grid grid-cols-1 gap-3 md:grid-cols-4",
385
- children: D.map((e) => {
386
- let t = W[e.key], n = H.map((t) => ({
390
+ children: O.map((e) => {
391
+ let t = W[e.key], r = H.map((t) => ({
387
392
  lane: t,
388
393
  laneItems: G[e.key][t] ?? []
389
- })).filter(({ lane: e, laneItems: t }) => !U || t.length > 0 || J && M(J) === e);
390
- return /* @__PURE__ */ y("section", {
394
+ })).filter(({ lane: e, laneItems: t }) => !U || t.length > 0 || J && N(J) === e);
395
+ return /* @__PURE__ */ b("section", {
391
396
  "aria-label": `${e.label} column`,
392
397
  "data-testid": `nnl-column-${e.key}`,
393
398
  className: "min-h-[120px] rounded-md border bg-muted/30 p-2",
394
399
  onDragOver: (t) => {
395
400
  !q || K || !J || (t.preventDefault(), t.dataTransfer.dropEffect = "move", R({
396
401
  columnKey: e.key,
397
- laneKey: M(J),
402
+ laneKey: N(J),
398
403
  beforeId: null
399
404
  }));
400
405
  },
401
406
  onDrop: (t) => {
402
407
  if (!J) return;
403
- let n = M(J);
408
+ let n = N(J);
404
409
  Q(e.key, n, G[e.key][n] ?? [])(t);
405
410
  },
406
411
  children: [
407
- /* @__PURE__ */ y("h3", {
412
+ /* @__PURE__ */ b("h3", {
408
413
  className: "mb-2 flex items-center gap-1.5 text-sm font-medium",
409
414
  children: [
410
- e.key === "UNPLACED" && /* @__PURE__ */ v(d, {
415
+ e.key === "UNPLACED" && /* @__PURE__ */ y(f, {
411
416
  className: "h-3.5 w-3.5 text-muted-foreground",
412
417
  "aria-hidden": "true"
413
418
  }),
414
419
  e.label,
415
- /* @__PURE__ */ y("span", {
420
+ /* @__PURE__ */ b("span", {
416
421
  className: "text-xs text-muted-foreground",
417
422
  children: [
418
423
  "(",
@@ -422,72 +427,73 @@ function B({ roadmapId: n }) {
422
427
  })
423
428
  ]
424
429
  }),
425
- n.length === 0 && /* @__PURE__ */ v("p", {
430
+ r.length === 0 && /* @__PURE__ */ y("p", {
426
431
  className: "py-4 text-center text-xs text-muted-foreground",
427
432
  children: "No items"
428
433
  }),
429
- /* @__PURE__ */ v("div", {
434
+ /* @__PURE__ */ y("div", {
430
435
  className: "space-y-3",
431
- children: n.map(({ lane: t, laneItems: n }) => {
432
- let r = L?.columnKey === e.key && L.laneKey === t;
433
- return /* @__PURE__ */ y("div", {
436
+ children: r.map(({ lane: t, laneItems: r }) => {
437
+ let i = L?.columnKey === e.key && L.laneKey === t;
438
+ return /* @__PURE__ */ b("div", {
434
439
  className: "space-y-1",
435
- children: [U && /* @__PURE__ */ y("p", {
440
+ children: [U && /* @__PURE__ */ b("p", {
436
441
  "data-testid": "nnl-lane-label",
437
442
  className: "text-[11px] font-medium text-muted-foreground",
438
443
  children: [
439
- N(t),
444
+ P(t),
440
445
  " ",
441
- /* @__PURE__ */ y("span", {
446
+ /* @__PURE__ */ b("span", {
442
447
  className: "text-muted-foreground/70",
443
448
  children: [
444
449
  "(",
445
- n.length,
450
+ r.length,
446
451
  ")"
447
452
  ]
448
453
  })
449
454
  ]
450
- }), /* @__PURE__ */ y("ul", {
451
- className: `min-h-[48px] space-y-2 rounded-sm p-1 ${r && !L.beforeId ? "ring-2 ring-primary" : ""}`,
455
+ }), /* @__PURE__ */ b("ul", {
456
+ className: `min-h-[48px] space-y-2 rounded-sm p-1 ${i && !L.beforeId ? "ring-2 ring-primary" : ""}`,
452
457
  onDragOver: (n) => {
453
- !q || K || !J || M(J) !== t || (n.preventDefault(), n.dataTransfer.dropEffect = "move", R({
458
+ !q || K || !J || N(J) !== t || (n.preventDefault(), n.dataTransfer.dropEffect = "move", R({
454
459
  columnKey: e.key,
455
460
  laneKey: t,
456
461
  beforeId: null
457
462
  }));
458
463
  },
459
- onDrop: Q(e.key, t, n),
460
- children: [n.length === 0 && /* @__PURE__ */ v("li", {
464
+ onDrop: Q(e.key, t, r),
465
+ children: [r.length === 0 && /* @__PURE__ */ y("li", {
461
466
  className: "py-2 text-center text-[11px] text-muted-foreground",
462
467
  "aria-hidden": "true",
463
468
  children: "Drop here"
464
- }), n.map((i, a) => {
465
- let o = r ? L.beforeId === i.id ? "before" : L.beforeId === null && a === n.length - 1 ? "after" : null : null;
466
- return /* @__PURE__ */ v(z, {
467
- item: i,
469
+ }), r.map((a, o) => {
470
+ let s = i ? L.beforeId === a.id ? "before" : L.beforeId === null && o === r.length - 1 ? "after" : null : null;
471
+ return /* @__PURE__ */ y(B, {
472
+ roadmapId: n,
473
+ item: a,
468
474
  columnKey: e.key,
469
- laneItems: n,
475
+ laneItems: r,
470
476
  draggable: q && !K,
471
- dragging: F === i.id,
472
- dropIndicator: o,
477
+ dragging: A === a.id,
478
+ dropIndicator: s,
473
479
  moveDisabled: !q || K,
474
480
  onDragStart: I,
475
481
  onDragEnd: () => {
476
482
  I(null), R(null);
477
483
  },
478
- onDragOverCard: (r) => Z(e.key, t, n)(r, i, a),
479
- onDropOnCard: Q(e.key, t, n),
484
+ onDragOverCard: (n) => Z(e.key, t, r)(n, a, o),
485
+ onDropOnCard: Q(e.key, t, r),
480
486
  onMoveTo: (e) => {
481
- let t = D.find((t) => t.key === e);
487
+ let t = O.find((t) => t.key === e);
482
488
  if (!t) return;
483
- let n = P(G[e][M(i)] ?? [], i.id, null);
484
- Y(i, t.horizon, n, t.label, !0);
489
+ let n = F(G[e][N(a)] ?? [], a.id, null);
490
+ Y(a, t.horizon, n, t.label, !0);
485
491
  },
486
492
  onShift: (t) => {
487
- let r = n.findIndex((e) => e.id === i.id), a = r + t;
488
- r === -1 || a < 0 || a >= n.length || Y(i, i.horizon, a, e.label, !0);
493
+ let n = r.findIndex((e) => e.id === a.id), i = n + t;
494
+ n === -1 || i < 0 || i >= r.length || Y(a, a.horizon, i, e.label, !0);
489
495
  }
490
- }, i.id);
496
+ }, a.id);
491
497
  })]
492
498
  })]
493
499
  }, t || "(none)");
@@ -501,6 +507,6 @@ function B({ roadmapId: n }) {
501
507
  });
502
508
  }
503
509
  //#endregion
504
- export { L as ConfidenceBadge, I as RiskIndicator, B as RoadmapNowNextLater };
510
+ export { R as ConfidenceBadge, L as RiskIndicator, V as RoadmapNowNextLater };
505
511
 
506
512
  //# sourceMappingURL=RoadmapNowNextLater.js.map