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