@burdenoff/microfe-planmagnet 2026.930.23 → 2026.930.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -5
- package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +154 -147
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +66 -62
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.d.ts +11 -0
- package/dist/planmagnet/controls/FeatureControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.js +305 -135
- package/dist/planmagnet/controls/FeatureControls.js.map +1 -1
- package/dist/planmagnet/controls/Pickers.d.ts +18 -0
- package/dist/planmagnet/controls/Pickers.d.ts.map +1 -1
- package/dist/planmagnet/controls/Pickers.js +78 -1
- package/dist/planmagnet/controls/Pickers.js.map +1 -1
- package/dist/planmagnet/controls/PrioritizationControls.d.ts +72 -0
- package/dist/planmagnet/controls/PrioritizationControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/PrioritizationControls.js +246 -0
- package/dist/planmagnet/controls/PrioritizationControls.js.map +1 -0
- package/dist/planmagnet/index.d.ts +1 -0
- package/dist/planmagnet/index.d.ts.map +1 -1
- package/dist/planmagnet/index.js +1 -0
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +131 -125
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js +183 -99
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.js +113 -97
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsPrioritizationPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ProductsPrioritizationPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ProductsPrioritizationPagePage.js +363 -0
- package/dist/planmagnet/pages/ProductsPrioritizationPagePage.js.map +1 -0
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +96 -79
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +133 -123
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/product/ProductControls.d.ts +33 -0
- package/dist/planmagnet/product/ProductControls.d.ts.map +1 -1
- package/dist/planmagnet/product/ProductControls.js +593 -268
- package/dist/planmagnet/product/ProductControls.js.map +1 -1
- package/dist/planmagnet/product/routes.d.ts +10 -0
- package/dist/planmagnet/product/routes.d.ts.map +1 -0
- package/dist/planmagnet/product/routes.js +6 -0
- package/dist/planmagnet/product/routes.js.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts +10 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.js +235 -184
- package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,42 +5,43 @@ import { enumLabel as a } from "../controls/WorkItemControls.js";
|
|
|
5
5
|
import { mutationErrorMessage as o } from "../utils/graphqlErrors.js";
|
|
6
6
|
import { detailPath as s } from "../utils/rowNavigation.js";
|
|
7
7
|
import { endBeforeStart as c, parseIntField as l } from "../utils/formValidation.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { PrioritizationScoreFields as u, QuadrantBadge as d, prioritizationScoresValid as f } from "../controls/PrioritizationControls.js";
|
|
9
|
+
import { useState as p } from "react";
|
|
10
|
+
import { BarChart3 as m, Pencil as h, Plus as g, Trash2 as _ } from "lucide-react";
|
|
11
|
+
import { gql as v } from "@apollo/client";
|
|
12
|
+
import { useMutation as y } from "@apollo/client/react";
|
|
13
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
14
|
+
import { Button 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";
|
|
14
15
|
//#region src/planmagnet/roadmaps/RoadmapControls.tsx
|
|
15
|
-
var
|
|
16
|
+
var j = [
|
|
16
17
|
"PLANNED",
|
|
17
18
|
"IN_PROGRESS",
|
|
18
19
|
"AT_RISK",
|
|
19
20
|
"DELAYED",
|
|
20
21
|
"COMPLETED",
|
|
21
22
|
"CANCELLED"
|
|
22
|
-
],
|
|
23
|
+
], M = [
|
|
23
24
|
"NOW",
|
|
24
25
|
"NEXT",
|
|
25
26
|
"LATER"
|
|
26
|
-
],
|
|
27
|
+
], N = [
|
|
27
28
|
"LOW",
|
|
28
29
|
"MEDIUM",
|
|
29
30
|
"HIGH"
|
|
30
|
-
],
|
|
31
|
+
], P = [
|
|
31
32
|
"GetRoadmapDetailPage",
|
|
32
33
|
"GetRoadmapDetail",
|
|
33
34
|
"ListRoadmapsPage",
|
|
34
35
|
"ListRoadmaps",
|
|
35
36
|
"GetRoadmapAnalytics",
|
|
36
37
|
"RoadmapNowNextLaterItems"
|
|
37
|
-
],
|
|
38
|
+
], F = v`
|
|
38
39
|
mutation RoadmapControlsCreateItem($input: PlanmagnetCreateRoadmapItemInput!) {
|
|
39
40
|
planmagnetCreateRoadmapItem(input: $input) {
|
|
40
41
|
id
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
`,
|
|
44
|
+
`, I = v`
|
|
44
45
|
mutation RoadmapControlsUpdateItem($id: ID!, $input: PlanmagnetUpdateRoadmapItemInput!) {
|
|
45
46
|
planmagnetUpdateRoadmapItem(id: $id, input: $input) {
|
|
46
47
|
id
|
|
@@ -54,304 +55,354 @@ var O = [
|
|
|
54
55
|
confidence
|
|
55
56
|
riskLevel
|
|
56
57
|
riskNote
|
|
58
|
+
moscow
|
|
59
|
+
kano
|
|
60
|
+
valueScore
|
|
61
|
+
effortScore
|
|
62
|
+
valueEffortQuadrant
|
|
57
63
|
}
|
|
58
64
|
}
|
|
59
|
-
`,
|
|
65
|
+
`, L = v`
|
|
60
66
|
mutation RoadmapControlsDeleteItem($id: ID!) {
|
|
61
67
|
planmagnetDeleteRoadmapItem(id: $id)
|
|
62
68
|
}
|
|
63
|
-
`,
|
|
69
|
+
`, R = v`
|
|
64
70
|
mutation RoadmapControlsDelete($id: ID!) {
|
|
65
71
|
planmagnetDeleteRoadmap(id: $id)
|
|
66
72
|
}
|
|
67
|
-
`,
|
|
68
|
-
function
|
|
73
|
+
`, z = (e) => e ? e.slice(0, 10) : "";
|
|
74
|
+
function B({ roadmapId: e, item: t, lanes: r }) {
|
|
69
75
|
let s = {
|
|
70
76
|
title: t?.title ?? "",
|
|
71
77
|
description: t?.description ?? "",
|
|
72
78
|
status: t?.status ?? "PLANNED",
|
|
73
79
|
swimlane: t?.swimlane ?? "",
|
|
74
|
-
startDate:
|
|
75
|
-
endDate:
|
|
80
|
+
startDate: z(t?.startDate),
|
|
81
|
+
endDate: z(t?.endDate),
|
|
76
82
|
horizon: t?.horizon ?? "",
|
|
77
83
|
confidence: t?.confidence == null ? "" : String(t.confidence),
|
|
78
84
|
riskLevel: t?.riskLevel ?? "",
|
|
79
85
|
riskNote: t?.riskNote ?? ""
|
|
80
|
-
},
|
|
81
|
-
|
|
86
|
+
}, m = {
|
|
87
|
+
moscow: t?.moscow ?? "",
|
|
88
|
+
kano: t?.kano ?? "",
|
|
89
|
+
valueScore: t?.valueScore == null ? "" : String(t.valueScore),
|
|
90
|
+
effortScore: t?.effortScore == null ? "" : String(t.effortScore)
|
|
91
|
+
}, [_, v] = p(!1), [L, R] = p(s), [B, V] = p(m), [H, U] = p(null), W = {
|
|
92
|
+
refetchQueries: P,
|
|
82
93
|
awaitRefetchQueries: !0
|
|
83
|
-
}, [
|
|
94
|
+
}, [G, K] = y(F, W), [q, J] = y(I, W), Y = K.loading || J.loading, X = c(L.startDate, L.endDate), Z = l(L.confidence, {
|
|
84
95
|
min: 0,
|
|
85
96
|
max: 100
|
|
86
|
-
}),
|
|
87
|
-
|
|
97
|
+
}), ee = L.title.trim() !== "" && !X && !Z.invalid && f(B) && !Y, te = j.includes(L.status) ? j : [L.status, ...j], ne = M.includes(L.horizon) ? M : L.horizon ? [L.horizon, ...M] : M, re = N.includes(L.riskLevel) ? N : L.riskLevel ? [L.riskLevel, ...N] : N, Q = t ? `roadmap-item-${t.id}` : "roadmap-item-new", ie = async () => {
|
|
98
|
+
U(null);
|
|
88
99
|
let r = {
|
|
89
|
-
title:
|
|
90
|
-
description:
|
|
91
|
-
status:
|
|
92
|
-
swimlane:
|
|
93
|
-
}
|
|
100
|
+
title: L.title.trim(),
|
|
101
|
+
description: L.description.trim() || null,
|
|
102
|
+
status: L.status,
|
|
103
|
+
swimlane: L.swimlane.trim() || null
|
|
104
|
+
}, i = l(B.valueScore, {
|
|
105
|
+
min: 1,
|
|
106
|
+
max: 10
|
|
107
|
+
}), a = l(B.effortScore, {
|
|
108
|
+
min: 1,
|
|
109
|
+
max: 10
|
|
110
|
+
});
|
|
94
111
|
try {
|
|
95
112
|
if (t) {
|
|
96
113
|
let e = {
|
|
97
|
-
...
|
|
98
|
-
...
|
|
99
|
-
},
|
|
100
|
-
...
|
|
101
|
-
...
|
|
102
|
-
...
|
|
103
|
-
...
|
|
114
|
+
...L.startDate !== s.startDate && { startDate: L.startDate || null },
|
|
115
|
+
...L.endDate !== s.endDate && { endDate: L.endDate || null }
|
|
116
|
+
}, o = {
|
|
117
|
+
...L.horizon !== s.horizon && { horizon: L.horizon || null },
|
|
118
|
+
...L.confidence !== s.confidence && { confidence: Z.value ?? null },
|
|
119
|
+
...L.riskLevel !== s.riskLevel && { riskLevel: L.riskLevel || null },
|
|
120
|
+
...L.riskNote.trim() !== s.riskNote.trim() && { riskNote: L.riskNote.trim() || null }
|
|
121
|
+
}, c = {
|
|
122
|
+
...B.moscow !== m.moscow && { moscow: B.moscow || null },
|
|
123
|
+
...B.kano !== m.kano && { kano: B.kano || null },
|
|
124
|
+
...B.valueScore !== m.valueScore && { valueScore: i.value ?? null },
|
|
125
|
+
...B.effortScore !== m.effortScore && { effortScore: a.value ?? null }
|
|
104
126
|
};
|
|
105
|
-
await n(
|
|
127
|
+
await n(q({ variables: {
|
|
106
128
|
id: t.id,
|
|
107
129
|
input: {
|
|
108
130
|
...r,
|
|
109
131
|
...e,
|
|
110
|
-
...
|
|
132
|
+
...o,
|
|
133
|
+
...c
|
|
111
134
|
}
|
|
112
135
|
} }));
|
|
113
|
-
} else await n(
|
|
136
|
+
} else await n(G({ variables: { input: {
|
|
114
137
|
roadmapId: e,
|
|
115
138
|
...r,
|
|
116
|
-
startDate:
|
|
117
|
-
endDate:
|
|
118
|
-
horizon:
|
|
119
|
-
confidence:
|
|
120
|
-
riskLevel:
|
|
121
|
-
riskNote:
|
|
122
|
-
|
|
123
|
-
|
|
139
|
+
startDate: L.startDate || void 0,
|
|
140
|
+
endDate: L.endDate || void 0,
|
|
141
|
+
horizon: L.horizon || void 0,
|
|
142
|
+
confidence: Z.value,
|
|
143
|
+
riskLevel: L.riskLevel || void 0,
|
|
144
|
+
riskNote: L.riskNote.trim() || void 0,
|
|
145
|
+
moscow: B.moscow || void 0,
|
|
146
|
+
kano: B.kano || void 0,
|
|
147
|
+
valueScore: i.value,
|
|
148
|
+
effortScore: a.value
|
|
149
|
+
} } })), R(s), V(m);
|
|
150
|
+
v(!1);
|
|
124
151
|
} catch (e) {
|
|
125
|
-
|
|
152
|
+
U(o(e, "The item could not be saved."));
|
|
126
153
|
}
|
|
127
|
-
},
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
open:
|
|
154
|
+
}, $ = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm";
|
|
155
|
+
return /* @__PURE__ */ x(w, {
|
|
156
|
+
open: _,
|
|
130
157
|
onOpenChange: (e) => {
|
|
131
|
-
|
|
158
|
+
v(e), e ? (R(s), V(m)) : U(null);
|
|
132
159
|
},
|
|
133
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ b(A, {
|
|
134
161
|
asChild: !0,
|
|
135
|
-
children: t ? /* @__PURE__ */
|
|
162
|
+
children: t ? /* @__PURE__ */ b(S, {
|
|
136
163
|
size: "sm",
|
|
137
164
|
variant: "ghost",
|
|
138
165
|
"aria-label": `Edit ${t.title}`,
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
}) : /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ b(h, { className: "h-4 w-4" })
|
|
167
|
+
}) : /* @__PURE__ */ x(S, {
|
|
141
168
|
size: "sm",
|
|
142
169
|
"data-testid": "roadmap-add-item",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ b(g, { className: "mr-1 h-4 w-4" }), "Add item"]
|
|
144
171
|
})
|
|
145
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ x(T, {
|
|
146
173
|
className: "max-w-lg",
|
|
147
174
|
children: [
|
|
148
|
-
/* @__PURE__ */
|
|
149
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ x(O, { children: [/* @__PURE__ */ b(k, { children: t ? "Edit roadmap item" : "Add roadmap item" }), /* @__PURE__ */ b(E, { children: "Items in the same swimlane are grouped together on the roadmap." })] }),
|
|
176
|
+
/* @__PURE__ */ x("div", {
|
|
150
177
|
className: "space-y-3",
|
|
151
178
|
children: [
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
htmlFor: `${
|
|
179
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
180
|
+
htmlFor: `${Q}-title`,
|
|
154
181
|
className: "text-sm font-medium",
|
|
155
182
|
children: "Title"
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
-
id: `${
|
|
183
|
+
}), /* @__PURE__ */ b(C, {
|
|
184
|
+
id: `${Q}-title`,
|
|
158
185
|
className: "mt-1",
|
|
159
|
-
value:
|
|
160
|
-
onChange: (e) =>
|
|
161
|
-
...
|
|
186
|
+
value: L.title,
|
|
187
|
+
onChange: (e) => R({
|
|
188
|
+
...L,
|
|
162
189
|
title: e.target.value
|
|
163
190
|
})
|
|
164
191
|
})] }),
|
|
165
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ x("div", {
|
|
166
193
|
className: "grid grid-cols-2 gap-3",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
htmlFor: `${
|
|
194
|
+
children: [/* @__PURE__ */ x("div", { children: [
|
|
195
|
+
/* @__PURE__ */ b("label", {
|
|
196
|
+
htmlFor: `${Q}-lane`,
|
|
170
197
|
className: "text-sm font-medium",
|
|
171
198
|
children: "Swimlane"
|
|
172
199
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
id: `${
|
|
200
|
+
/* @__PURE__ */ b(C, {
|
|
201
|
+
id: `${Q}-lane`,
|
|
175
202
|
className: "mt-1",
|
|
176
|
-
list: `${
|
|
203
|
+
list: `${Q}-lanes`,
|
|
177
204
|
placeholder: "e.g. Q4",
|
|
178
|
-
value:
|
|
179
|
-
onChange: (e) =>
|
|
180
|
-
...
|
|
205
|
+
value: L.swimlane,
|
|
206
|
+
onChange: (e) => R({
|
|
207
|
+
...L,
|
|
181
208
|
swimlane: e.target.value
|
|
182
209
|
})
|
|
183
210
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
id: `${
|
|
186
|
-
children: r.map((e) => /* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ b("datalist", {
|
|
212
|
+
id: `${Q}-lanes`,
|
|
213
|
+
children: r.map((e) => /* @__PURE__ */ b("option", { value: e }, e))
|
|
187
214
|
})
|
|
188
|
-
] }), /* @__PURE__ */
|
|
189
|
-
htmlFor: `${
|
|
215
|
+
] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
216
|
+
htmlFor: `${Q}-status`,
|
|
190
217
|
className: "text-sm font-medium",
|
|
191
218
|
children: "Status"
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
-
id: `${
|
|
194
|
-
className:
|
|
195
|
-
value:
|
|
196
|
-
onChange: (e) =>
|
|
197
|
-
...
|
|
219
|
+
}), /* @__PURE__ */ b("select", {
|
|
220
|
+
id: `${Q}-status`,
|
|
221
|
+
className: $,
|
|
222
|
+
value: L.status,
|
|
223
|
+
onChange: (e) => R({
|
|
224
|
+
...L,
|
|
198
225
|
status: e.target.value
|
|
199
226
|
}),
|
|
200
|
-
children:
|
|
227
|
+
children: te.map((e) => /* @__PURE__ */ b("option", {
|
|
201
228
|
value: e,
|
|
202
229
|
children: a(e)
|
|
203
230
|
}, e))
|
|
204
231
|
})] })]
|
|
205
232
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ x("div", {
|
|
207
234
|
className: "grid grid-cols-2 gap-3",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
209
|
-
htmlFor: `${
|
|
235
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
236
|
+
htmlFor: `${Q}-start`,
|
|
210
237
|
className: "text-sm font-medium",
|
|
211
238
|
children: "Start date"
|
|
212
|
-
}), /* @__PURE__ */
|
|
213
|
-
id: `${
|
|
239
|
+
}), /* @__PURE__ */ b(C, {
|
|
240
|
+
id: `${Q}-start`,
|
|
214
241
|
type: "date",
|
|
215
242
|
className: "mt-1",
|
|
216
|
-
value:
|
|
217
|
-
max:
|
|
218
|
-
onChange: (e) =>
|
|
219
|
-
...
|
|
243
|
+
value: L.startDate,
|
|
244
|
+
max: L.endDate || void 0,
|
|
245
|
+
onChange: (e) => R({
|
|
246
|
+
...L,
|
|
220
247
|
startDate: e.target.value
|
|
221
248
|
})
|
|
222
|
-
})] }), /* @__PURE__ */
|
|
223
|
-
htmlFor: `${
|
|
249
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
250
|
+
htmlFor: `${Q}-end`,
|
|
224
251
|
className: "text-sm font-medium",
|
|
225
252
|
children: "End date"
|
|
226
|
-
}), /* @__PURE__ */
|
|
227
|
-
id: `${
|
|
253
|
+
}), /* @__PURE__ */ b(C, {
|
|
254
|
+
id: `${Q}-end`,
|
|
228
255
|
type: "date",
|
|
229
256
|
className: "mt-1",
|
|
230
|
-
value:
|
|
231
|
-
min:
|
|
232
|
-
onChange: (e) =>
|
|
233
|
-
...
|
|
257
|
+
value: L.endDate,
|
|
258
|
+
min: L.startDate || void 0,
|
|
259
|
+
onChange: (e) => R({
|
|
260
|
+
...L,
|
|
234
261
|
endDate: e.target.value
|
|
235
262
|
})
|
|
236
263
|
})] })]
|
|
237
264
|
}),
|
|
238
|
-
|
|
239
|
-
/* @__PURE__ */
|
|
265
|
+
X && /* @__PURE__ */ b(i, { message: "The end date is before the start date." }),
|
|
266
|
+
/* @__PURE__ */ x("div", {
|
|
240
267
|
className: "grid grid-cols-2 gap-3",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
242
|
-
htmlFor: `${
|
|
268
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
269
|
+
htmlFor: `${Q}-horizon`,
|
|
243
270
|
className: "text-sm font-medium",
|
|
244
271
|
children: "Horizon"
|
|
245
|
-
}), /* @__PURE__ */
|
|
246
|
-
id: `${
|
|
272
|
+
}), /* @__PURE__ */ x("select", {
|
|
273
|
+
id: `${Q}-horizon`,
|
|
247
274
|
"data-testid": "roadmap-item-horizon",
|
|
248
|
-
className:
|
|
249
|
-
value:
|
|
250
|
-
onChange: (e) =>
|
|
251
|
-
...
|
|
275
|
+
className: $,
|
|
276
|
+
value: L.horizon,
|
|
277
|
+
onChange: (e) => R({
|
|
278
|
+
...L,
|
|
252
279
|
horizon: e.target.value
|
|
253
280
|
}),
|
|
254
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ b("option", {
|
|
255
282
|
value: "",
|
|
256
283
|
children: "Not placed"
|
|
257
|
-
}),
|
|
284
|
+
}), ne.map((e) => /* @__PURE__ */ b("option", {
|
|
258
285
|
value: e,
|
|
259
286
|
children: a(e)
|
|
260
287
|
}, e))]
|
|
261
|
-
})] }), /* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
htmlFor: `${
|
|
288
|
+
})] }), /* @__PURE__ */ x("div", { children: [
|
|
289
|
+
/* @__PURE__ */ b("label", {
|
|
290
|
+
htmlFor: `${Q}-confidence`,
|
|
264
291
|
className: "text-sm font-medium",
|
|
265
292
|
children: "Confidence (0-100)"
|
|
266
293
|
}),
|
|
267
|
-
/* @__PURE__ */
|
|
268
|
-
id: `${
|
|
294
|
+
/* @__PURE__ */ b(C, {
|
|
295
|
+
id: `${Q}-confidence`,
|
|
269
296
|
"data-testid": "roadmap-item-confidence",
|
|
270
297
|
type: "number",
|
|
271
298
|
inputMode: "numeric",
|
|
272
299
|
min: 0,
|
|
273
300
|
max: 100,
|
|
274
301
|
className: "mt-1",
|
|
275
|
-
value:
|
|
276
|
-
onChange: (e) =>
|
|
277
|
-
...
|
|
302
|
+
value: L.confidence,
|
|
303
|
+
onChange: (e) => R({
|
|
304
|
+
...L,
|
|
278
305
|
confidence: e.target.value
|
|
279
306
|
})
|
|
280
307
|
}),
|
|
281
|
-
|
|
308
|
+
Z.invalid && /* @__PURE__ */ b(i, { message: "Confidence must be a whole number from 0 to 100." })
|
|
282
309
|
] })]
|
|
283
310
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
htmlFor: `${
|
|
311
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
312
|
+
htmlFor: `${Q}-risk-level`,
|
|
286
313
|
className: "text-sm font-medium",
|
|
287
314
|
children: "Risk level"
|
|
288
|
-
}), /* @__PURE__ */
|
|
289
|
-
id: `${
|
|
315
|
+
}), /* @__PURE__ */ x("select", {
|
|
316
|
+
id: `${Q}-risk-level`,
|
|
290
317
|
"data-testid": "roadmap-item-risk-level",
|
|
291
|
-
className:
|
|
292
|
-
value:
|
|
293
|
-
onChange: (e) =>
|
|
294
|
-
...
|
|
318
|
+
className: $,
|
|
319
|
+
value: L.riskLevel,
|
|
320
|
+
onChange: (e) => R({
|
|
321
|
+
...L,
|
|
295
322
|
riskLevel: e.target.value
|
|
296
323
|
}),
|
|
297
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ b("option", {
|
|
298
325
|
value: "",
|
|
299
326
|
children: "None"
|
|
300
|
-
}),
|
|
327
|
+
}), re.map((e) => /* @__PURE__ */ b("option", {
|
|
301
328
|
value: e,
|
|
302
329
|
children: a(e)
|
|
303
330
|
}, e))]
|
|
304
331
|
})] }),
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
htmlFor: `${
|
|
332
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
333
|
+
htmlFor: `${Q}-risk-note`,
|
|
307
334
|
className: "text-sm font-medium",
|
|
308
335
|
children: "Risk note"
|
|
309
|
-
}), /* @__PURE__ */
|
|
310
|
-
id: `${
|
|
336
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
337
|
+
id: `${Q}-risk-note`,
|
|
311
338
|
"data-testid": "roadmap-item-risk-note",
|
|
312
|
-
className: `${
|
|
339
|
+
className: `${$} min-h-[56px]`,
|
|
313
340
|
maxLength: 1e3,
|
|
314
341
|
placeholder: "Why this item is risky, and what would reduce it",
|
|
315
|
-
value:
|
|
316
|
-
onChange: (e) =>
|
|
317
|
-
...
|
|
342
|
+
value: L.riskNote,
|
|
343
|
+
onChange: (e) => R({
|
|
344
|
+
...L,
|
|
318
345
|
riskNote: e.target.value
|
|
319
346
|
})
|
|
320
347
|
})] }),
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
htmlFor: `${
|
|
348
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
349
|
+
htmlFor: `${Q}-description`,
|
|
323
350
|
className: "text-sm font-medium",
|
|
324
351
|
children: "Description"
|
|
325
|
-
}), /* @__PURE__ */
|
|
326
|
-
id: `${
|
|
327
|
-
className: `${
|
|
328
|
-
value:
|
|
329
|
-
onChange: (e) =>
|
|
330
|
-
...
|
|
352
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
353
|
+
id: `${Q}-description`,
|
|
354
|
+
className: `${$} min-h-[72px]`,
|
|
355
|
+
value: L.description,
|
|
356
|
+
onChange: (e) => R({
|
|
357
|
+
...L,
|
|
331
358
|
description: e.target.value
|
|
332
359
|
})
|
|
333
360
|
})] }),
|
|
334
|
-
|
|
361
|
+
/* @__PURE__ */ x("div", {
|
|
362
|
+
className: "border-t pt-3",
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ b("p", {
|
|
365
|
+
className: "text-sm font-medium",
|
|
366
|
+
children: "Prioritization"
|
|
367
|
+
}),
|
|
368
|
+
t && /* @__PURE__ */ x("div", {
|
|
369
|
+
className: "mt-1 flex items-center gap-2",
|
|
370
|
+
children: [/* @__PURE__ */ b("span", {
|
|
371
|
+
className: "text-xs text-muted-foreground",
|
|
372
|
+
children: "Current quadrant:"
|
|
373
|
+
}), /* @__PURE__ */ b(d, { quadrant: t.valueEffortQuadrant ?? null })]
|
|
374
|
+
}),
|
|
375
|
+
/* @__PURE__ */ b("div", {
|
|
376
|
+
className: "mt-2",
|
|
377
|
+
children: /* @__PURE__ */ b(u, {
|
|
378
|
+
idPrefix: Q,
|
|
379
|
+
values: B,
|
|
380
|
+
onChange: V
|
|
381
|
+
})
|
|
382
|
+
})
|
|
383
|
+
]
|
|
384
|
+
}),
|
|
385
|
+
H && /* @__PURE__ */ b(i, { message: H })
|
|
335
386
|
]
|
|
336
387
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ x(D, { children: [/* @__PURE__ */ b(S, {
|
|
338
389
|
variant: "outline",
|
|
339
|
-
onClick: () =>
|
|
390
|
+
onClick: () => v(!1),
|
|
340
391
|
children: "Cancel"
|
|
341
|
-
}), /* @__PURE__ */
|
|
342
|
-
onClick: () => void
|
|
343
|
-
disabled: !
|
|
344
|
-
children:
|
|
392
|
+
}), /* @__PURE__ */ b(S, {
|
|
393
|
+
onClick: () => void ie(),
|
|
394
|
+
disabled: !ee,
|
|
395
|
+
children: Y ? "Saving…" : t ? "Save item" : "Add item"
|
|
345
396
|
})] })
|
|
346
397
|
]
|
|
347
398
|
})]
|
|
348
399
|
});
|
|
349
400
|
}
|
|
350
|
-
function
|
|
351
|
-
let [a, o] =
|
|
352
|
-
refetchQueries:
|
|
401
|
+
function V({ id: e, title: t }) {
|
|
402
|
+
let [a, o] = y(L, {
|
|
403
|
+
refetchQueries: P,
|
|
353
404
|
awaitRefetchQueries: !0
|
|
354
|
-
}), [s, c] =
|
|
405
|
+
}), [s, c] = p(null), l = async () => {
|
|
355
406
|
c(null);
|
|
356
407
|
try {
|
|
357
408
|
await n(a({ variables: { id: e } }));
|
|
@@ -359,69 +410,69 @@ function R({ id: e, title: t }) {
|
|
|
359
410
|
c(e instanceof Error ? e.message : "The item could not be removed.");
|
|
360
411
|
}
|
|
361
412
|
};
|
|
362
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ x("div", {
|
|
363
414
|
className: "flex flex-col items-end",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ b(r, {
|
|
365
416
|
label: "",
|
|
366
417
|
ariaLabel: `Remove ${t}`,
|
|
367
418
|
variant: "outline",
|
|
368
|
-
icon: /* @__PURE__ */ _
|
|
419
|
+
icon: /* @__PURE__ */ b(_, { className: "h-4 w-4" }),
|
|
369
420
|
title: `Remove "${t}" from the roadmap?`,
|
|
370
421
|
description: "The item is removed from this roadmap. This cannot be undone here.",
|
|
371
422
|
confirmLabel: "Remove item",
|
|
372
423
|
destructive: !0,
|
|
373
424
|
disabled: o.loading,
|
|
374
425
|
onConfirm: () => void l()
|
|
375
|
-
}), s && /* @__PURE__ */
|
|
426
|
+
}), s && /* @__PURE__ */ b(i, { message: s })]
|
|
376
427
|
});
|
|
377
428
|
}
|
|
378
|
-
function
|
|
379
|
-
let c = e(), [l,
|
|
429
|
+
function H({ roadmapId: a, name: o }) {
|
|
430
|
+
let c = e(), [l, u] = y(R, {
|
|
380
431
|
refetchQueries: ["ListRoadmapsPage", "ListRoadmaps"],
|
|
381
432
|
context: t
|
|
382
|
-
}), [
|
|
383
|
-
|
|
433
|
+
}), [d, f] = p(null), g = async () => {
|
|
434
|
+
f(null);
|
|
384
435
|
try {
|
|
385
436
|
await n(l({ variables: { id: a } })), c("/products/roadmaps-page");
|
|
386
437
|
} catch (e) {
|
|
387
|
-
|
|
438
|
+
f(e instanceof Error ? e.message : "The roadmap could not be deleted.");
|
|
388
439
|
}
|
|
389
440
|
};
|
|
390
|
-
return /* @__PURE__ */
|
|
441
|
+
return /* @__PURE__ */ x("div", {
|
|
391
442
|
className: "flex flex-col items-end gap-2",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
443
|
+
children: [/* @__PURE__ */ x("div", {
|
|
393
444
|
className: "flex gap-2",
|
|
394
445
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ x(S, {
|
|
396
447
|
size: "sm",
|
|
397
448
|
variant: "outline",
|
|
398
449
|
"data-testid": "roadmap-edit",
|
|
399
450
|
onClick: () => c(s("/products/edit-roadmap-page", a)),
|
|
400
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ b(h, { className: "mr-1 h-4 w-4" }), "Edit"]
|
|
401
452
|
}),
|
|
402
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ x(S, {
|
|
403
454
|
size: "sm",
|
|
404
455
|
variant: "outline",
|
|
405
456
|
"data-testid": "roadmap-analytics",
|
|
406
457
|
onClick: () => c(s("/products/roadmap-analytics-page", a)),
|
|
407
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ b(m, { className: "mr-1 h-4 w-4" }), "Analytics"]
|
|
408
459
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ b(r, {
|
|
410
461
|
label: "Delete",
|
|
411
462
|
variant: "outline",
|
|
412
|
-
icon: /* @__PURE__ */ _
|
|
463
|
+
icon: /* @__PURE__ */ b(_, { className: "mr-1 h-4 w-4" }),
|
|
413
464
|
title: `Delete ${o}?`,
|
|
414
465
|
description: "The roadmap and its items are deleted. This cannot be undone here.",
|
|
415
466
|
confirmLabel: "Delete roadmap",
|
|
416
467
|
destructive: !0,
|
|
417
|
-
disabled:
|
|
418
|
-
onConfirm: () => void
|
|
468
|
+
disabled: u.loading,
|
|
469
|
+
onConfirm: () => void g()
|
|
419
470
|
})
|
|
420
471
|
]
|
|
421
|
-
}),
|
|
472
|
+
}), d && /* @__PURE__ */ b(i, { message: d })]
|
|
422
473
|
});
|
|
423
474
|
}
|
|
424
475
|
//#endregion
|
|
425
|
-
export {
|
|
476
|
+
export { V as RemoveRoadmapItemButton, H as RoadmapHeaderActions, B as RoadmapItemDialog };
|
|
426
477
|
|
|
427
478
|
//# sourceMappingURL=RoadmapControls.js.map
|