@burdenoff/microfe-planmagnet 2026.930.15 → 2026.930.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/planmagnet/comments/RoadmapComments.d.ts +29 -0
- package/dist/planmagnet/comments/RoadmapComments.d.ts.map +1 -0
- package/dist/planmagnet/comments/RoadmapComments.js +310 -0
- package/dist/planmagnet/comments/RoadmapComments.js.map +1 -0
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +130 -112
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +157 -151
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapReviewPanel.d.ts +4 -0
- package/dist/planmagnet/roadmaps/RoadmapReviewPanel.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapReviewPanel.js +370 -0
- package/dist/planmagnet/roadmaps/RoadmapReviewPanel.js.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.d.ts +4 -0
- package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.js +396 -0
- package/dist/planmagnet/roadmaps/RoadmapVersionsPanel.js.map +1 -0
- 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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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
|
|
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
|
-
${
|
|
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
|
-
`,
|
|
30
|
+
`, D = g`
|
|
30
31
|
mutation RoadmapNowNextLaterMove($id: ID!, $input: PlanmagnetMoveRoadmapItemInput!) {
|
|
31
32
|
planmagnetMoveRoadmapItem(id: $id, input: $input) {
|
|
32
|
-
${
|
|
33
|
+
${T}
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
`,
|
|
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
|
-
],
|
|
57
|
-
function
|
|
58
|
-
let { data: n, loading: r, error: i, fetchMore:
|
|
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:
|
|
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
|
|
67
|
-
!c || !l || s.length >=
|
|
67
|
+
return o(() => {
|
|
68
|
+
!c || !l || s.length >= j || a({
|
|
68
69
|
variables: { pagination: {
|
|
69
|
-
first:
|
|
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
|
-
|
|
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 >=
|
|
88
|
+
truncated: c && s.length >= j
|
|
88
89
|
};
|
|
89
90
|
}
|
|
90
|
-
var
|
|
91
|
-
function
|
|
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
|
|
98
|
+
var I = {
|
|
98
99
|
LOW: {
|
|
99
|
-
Icon:
|
|
100
|
+
Icon: h,
|
|
100
101
|
label: "Low risk",
|
|
101
102
|
className: "text-muted-foreground"
|
|
102
103
|
},
|
|
103
104
|
MEDIUM: {
|
|
104
|
-
Icon:
|
|
105
|
+
Icon: l,
|
|
105
106
|
label: "Medium risk",
|
|
106
107
|
className: "text-status-warning-text"
|
|
107
108
|
},
|
|
108
109
|
HIGH: {
|
|
109
|
-
Icon:
|
|
110
|
+
Icon: m,
|
|
110
111
|
label: "High risk",
|
|
111
112
|
className: "text-status-error-text"
|
|
112
113
|
}
|
|
113
114
|
};
|
|
114
|
-
function
|
|
115
|
+
function L({ level: e, note: t }) {
|
|
115
116
|
if (!e) return null;
|
|
116
|
-
let n =
|
|
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__ */
|
|
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__ */
|
|
125
|
+
return t ? /* @__PURE__ */ y(C, { children: /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(w, {
|
|
125
126
|
asChild: !0,
|
|
126
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
132
|
+
}), /* @__PURE__ */ y(S, {
|
|
132
133
|
className: "max-w-xs",
|
|
133
134
|
children: t
|
|
134
135
|
})] }) }) : r;
|
|
135
136
|
}
|
|
136
|
-
function
|
|
137
|
-
return e === null ? null : /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
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__ */
|
|
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__ */
|
|
165
|
+
/* @__PURE__ */ y("option", {
|
|
165
166
|
value: "",
|
|
166
167
|
children: "Move…"
|
|
167
168
|
}),
|
|
168
|
-
|
|
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__ */
|
|
173
|
+
/* @__PURE__ */ y("option", {
|
|
173
174
|
value: "up",
|
|
174
175
|
disabled: !s,
|
|
175
176
|
children: "Move up"
|
|
176
177
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
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
|
|
186
|
-
let
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
draggable:
|
|
189
|
-
onDragStart: (
|
|
190
|
-
|
|
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:
|
|
193
|
-
onDragOver:
|
|
194
|
-
onDrop:
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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__ */
|
|
205
|
+
/* @__PURE__ */ y("p", {
|
|
205
206
|
className: "font-medium leading-tight",
|
|
206
|
-
children:
|
|
207
|
+
children: t.title
|
|
207
208
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
214
|
+
/* @__PURE__ */ y(u, {
|
|
214
215
|
className: "h-3 w-3",
|
|
215
216
|
"aria-hidden": "true"
|
|
216
217
|
}),
|
|
217
|
-
|
|
218
|
+
t.startDate ? new Date(t.startDate).toLocaleDateString() : "?",
|
|
218
219
|
" - ",
|
|
219
|
-
|
|
220
|
+
t.endDate ? new Date(t.endDate).toLocaleDateString() : "?"
|
|
220
221
|
]
|
|
221
222
|
})]
|
|
222
223
|
}),
|
|
223
|
-
|
|
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
|
-
|
|
228
|
+
_.requests,
|
|
228
229
|
" feature request",
|
|
229
|
-
|
|
230
|
+
_.requests === 1 ? "" : "s",
|
|
230
231
|
" · ",
|
|
231
|
-
|
|
232
|
+
_.votes,
|
|
232
233
|
" vote",
|
|
233
|
-
|
|
234
|
+
_.votes === 1 ? "" : "s"
|
|
234
235
|
]
|
|
235
236
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ b("div", {
|
|
237
238
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
-
level:
|
|
240
|
-
note:
|
|
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__ */
|
|
244
|
-
className: "flex justify-
|
|
245
|
-
children: /* @__PURE__ */
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
|
258
|
-
let { workspaceId:
|
|
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] =
|
|
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 =
|
|
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 =
|
|
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[
|
|
285
|
+
for (let t of l) e[k(t.horizon)].push(t);
|
|
281
286
|
return e;
|
|
282
|
-
}, [l]), G =
|
|
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 =
|
|
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
|
-
|
|
297
|
-
if (!
|
|
298
|
-
let e =
|
|
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 =
|
|
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(
|
|
311
|
+
await t(g({ variables: {
|
|
307
312
|
id: e.id,
|
|
308
313
|
input: {
|
|
309
314
|
horizon: n,
|
|
310
315
|
index: a
|
|
311
316
|
}
|
|
312
|
-
} })),
|
|
317
|
+
} })), E(`Moved "${e.title}" to ${o}.`);
|
|
313
318
|
} catch (e) {
|
|
314
|
-
if (r(e)) w(!0), S("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),
|
|
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 ||
|
|
324
|
-
let o =
|
|
328
|
+
if (!a || N(a) !== t) return;
|
|
329
|
+
let o = O.find((t) => t.key === e);
|
|
325
330
|
if (!o) return;
|
|
326
|
-
let s =
|
|
327
|
-
|
|
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 ||
|
|
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__ */
|
|
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__ */
|
|
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
|
-
}) :
|
|
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: ",
|
|
353
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
378
|
+
h && /* @__PURE__ */ b("p", {
|
|
374
379
|
className: "text-xs text-muted-foreground",
|
|
375
380
|
children: [
|
|
376
381
|
"Showing the first ",
|
|
377
|
-
|
|
382
|
+
j,
|
|
378
383
|
" of ",
|
|
379
384
|
m,
|
|
380
385
|
" items."
|
|
381
386
|
]
|
|
382
387
|
}),
|
|
383
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ y("div", {
|
|
384
389
|
className: "grid grid-cols-1 gap-3 md:grid-cols-4",
|
|
385
|
-
children:
|
|
386
|
-
let t = W[e.key],
|
|
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 &&
|
|
390
|
-
return /* @__PURE__ */
|
|
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:
|
|
402
|
+
laneKey: N(J),
|
|
398
403
|
beforeId: null
|
|
399
404
|
}));
|
|
400
405
|
},
|
|
401
406
|
onDrop: (t) => {
|
|
402
407
|
if (!J) return;
|
|
403
|
-
let n =
|
|
408
|
+
let n = N(J);
|
|
404
409
|
Q(e.key, n, G[e.key][n] ?? [])(t);
|
|
405
410
|
},
|
|
406
411
|
children: [
|
|
407
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
434
|
+
/* @__PURE__ */ y("div", {
|
|
430
435
|
className: "space-y-3",
|
|
431
|
-
children:
|
|
432
|
-
let
|
|
433
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
444
|
+
P(t),
|
|
440
445
|
" ",
|
|
441
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ b("span", {
|
|
442
447
|
className: "text-muted-foreground/70",
|
|
443
448
|
children: [
|
|
444
449
|
"(",
|
|
445
|
-
|
|
450
|
+
r.length,
|
|
446
451
|
")"
|
|
447
452
|
]
|
|
448
453
|
})
|
|
449
454
|
]
|
|
450
|
-
}), /* @__PURE__ */
|
|
451
|
-
className: `min-h-[48px] space-y-2 rounded-sm p-1 ${
|
|
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 ||
|
|
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,
|
|
460
|
-
children: [
|
|
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
|
-
}),
|
|
465
|
-
let
|
|
466
|
-
return /* @__PURE__ */
|
|
467
|
-
|
|
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:
|
|
475
|
+
laneItems: r,
|
|
470
476
|
draggable: q && !K,
|
|
471
|
-
dragging:
|
|
472
|
-
dropIndicator:
|
|
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: (
|
|
479
|
-
onDropOnCard: Q(e.key, t,
|
|
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 =
|
|
487
|
+
let t = O.find((t) => t.key === e);
|
|
482
488
|
if (!t) return;
|
|
483
|
-
let n =
|
|
484
|
-
Y(
|
|
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
|
|
488
|
-
|
|
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
|
-
},
|
|
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 {
|
|
510
|
+
export { R as ConfidenceBadge, L as RiskIndicator, V as RoadmapNowNextLater };
|
|
505
511
|
|
|
506
512
|
//# sourceMappingURL=RoadmapNowNextLater.js.map
|