@burdenoff/microfe-planmagnet 2026.719.2 → 2026.720.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsEditReleasePagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProductsEditReleasePagePage.tsx"],"names":[],"mappings":"AA2CA,wBAAgB,2BAA2B,4CAqM1C"}
1
+ {"version":3,"file":"ProductsEditReleasePagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProductsEditReleasePagePage.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,2BAA2B,4CAiM1C"}
@@ -1,13 +1,14 @@
1
1
  import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
- import { useMemo as n, useState as r } from "react";
3
- import { ArrowLeft as i, Loader2 as a, Save as o } from "lucide-react";
4
- import { useParams as s } from "react-router-dom";
5
- import { gql as c } from "@apollo/client";
6
- import { useMutation as l, useQuery as u } from "@apollo/client/react";
7
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
- import { Button as p, Card as m, CardContent as h, CardHeader as g, CardTitle as _, Input as v } from "@burdenoff/fe-libs/ui";
2
+ import { MarkdownEditor as n } from "../../components/MarkdownEditor.js";
3
+ import { useMemo as r, useState as i } from "react";
4
+ import { ArrowLeft as a, Loader2 as o, Save as s } from "lucide-react";
5
+ import { useParams as c } from "react-router-dom";
6
+ import { gql as l } from "@apollo/client";
7
+ import { useMutation as u, useQuery as d } from "@apollo/client/react";
8
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import { Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y } from "@burdenoff/fe-libs/ui";
9
10
  //#region src/planmagnet/pages/ProductsEditReleasePagePage.tsx
10
- var y = c`
11
+ var b = l`
11
12
  query GetReleaseForEdit($id: ID!) {
12
13
  planmagnetRelease(id: $id) {
13
14
  id
@@ -22,7 +23,7 @@ var y = c`
22
23
  tags
23
24
  }
24
25
  }
25
- `, b = c`
26
+ `, x = l`
26
27
  mutation UpdateRelease($id: ID!, $input: PlanmagnetUpdateReleaseInput!) {
27
28
  planmagnetUpdateRelease(id: $id, input: $input) {
28
29
  id
@@ -37,124 +38,122 @@ var y = c`
37
38
  }
38
39
  }
39
40
  `;
40
- function x() {
41
- let { workspaceId: c } = e(), x = t(), S = s().id ?? "", { data: C, loading: w, error: T } = u(y, {
42
- variables: { id: S },
43
- skip: !S
44
- }), [E, { loading: D, error: O }] = l(b, { refetchQueries: ["ListReleases", "GetReleaseForEdit"] }), k = C?.planmagnetRelease, A = n(() => ({
45
- version: k?.version ?? "",
46
- name: k?.name ?? "",
47
- description: k?.description ?? "",
48
- status: k?.status ?? "DRAFT",
49
- plannedDate: k?.plannedDate ? new Date(k.plannedDate).toISOString().split("T")[0] : "",
50
- releaseNotes: k?.releaseNotes ?? "",
51
- tags: k?.tags?.join(", ") ?? ""
52
- }), [k]), [j, M] = r({}), N = {
53
- ...A,
54
- ...j
55
- }, P = (e) => M(e);
56
- return w ? /* @__PURE__ */ d("div", {
41
+ function S() {
42
+ let { workspaceId: l } = e(), S = t(), C = c().id ?? "", { data: w, loading: T, error: E } = d(b, {
43
+ variables: { id: C },
44
+ skip: !C
45
+ }), [D, { loading: O, error: k }] = u(x, { refetchQueries: ["ListReleases", "GetReleaseForEdit"] }), A = w?.planmagnetRelease, j = r(() => ({
46
+ version: A?.version ?? "",
47
+ name: A?.name ?? "",
48
+ description: A?.description ?? "",
49
+ status: A?.status ?? "DRAFT",
50
+ plannedDate: A?.plannedDate ? new Date(A.plannedDate).toISOString().split("T")[0] : "",
51
+ releaseNotes: A?.releaseNotes ?? "",
52
+ tags: A?.tags?.join(", ") ?? ""
53
+ }), [A]), [M, N] = i({}), P = {
54
+ ...j,
55
+ ...M
56
+ }, F = (e) => N(e);
57
+ return T ? /* @__PURE__ */ f("div", {
57
58
  className: "flex items-center justify-center p-12",
58
- children: /* @__PURE__ */ d(a, { className: "h-8 w-8 animate-spin text-muted-foreground" })
59
- }) : T ? /* @__PURE__ */ f("div", {
59
+ children: /* @__PURE__ */ f(o, { className: "h-8 w-8 animate-spin text-muted-foreground" })
60
+ }) : E ? /* @__PURE__ */ p("div", {
60
61
  className: "p-6 text-destructive",
61
- children: ["Failed to load release: ", T.message]
62
- }) : k ? /* @__PURE__ */ f("div", {
62
+ children: ["Failed to load release: ", E.message]
63
+ }) : A ? /* @__PURE__ */ p("div", {
63
64
  className: "space-y-6 p-6 max-w-4xl",
64
65
  children: [
65
- /* @__PURE__ */ f("div", {
66
+ /* @__PURE__ */ p("div", {
66
67
  className: "flex items-center justify-between",
67
- children: [/* @__PURE__ */ f("div", {
68
+ children: [/* @__PURE__ */ p("div", {
68
69
  className: "flex items-center gap-3",
69
- children: [/* @__PURE__ */ d(p, {
70
+ children: [/* @__PURE__ */ f(m, {
70
71
  variant: "ghost",
71
72
  size: "sm",
72
- onClick: () => x("/products/releases"),
73
- children: /* @__PURE__ */ d(i, { className: "h-4 w-4" })
74
- }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
73
+ onClick: () => S("/products/releases"),
74
+ children: /* @__PURE__ */ f(a, { className: "h-4 w-4" })
75
+ }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
75
76
  className: "text-2xl font-semibold",
76
77
  children: "Edit Release"
77
- }), /* @__PURE__ */ f("p", {
78
+ }), /* @__PURE__ */ p("p", {
78
79
  className: "text-sm text-muted-foreground",
79
80
  children: [
80
- k.version,
81
+ A.version,
81
82
  " - ",
82
- k.name
83
+ A.name
83
84
  ]
84
85
  })] })]
85
- }), /* @__PURE__ */ f(p, {
86
+ }), /* @__PURE__ */ p(m, {
86
87
  size: "sm",
87
88
  onClick: () => {
88
- E({ variables: {
89
- id: S,
89
+ D({ variables: {
90
+ id: C,
90
91
  input: {
91
- version: N.version || void 0,
92
- name: N.name || void 0,
93
- description: N.description || void 0,
94
- status: N.status || void 0,
95
- plannedDate: N.plannedDate || void 0,
96
- releaseNotes: N.releaseNotes || void 0,
97
- tags: N.tags ? N.tags.split(",").map((e) => e.trim()).filter(Boolean) : void 0
92
+ version: P.version || void 0,
93
+ name: P.name || void 0,
94
+ description: P.description || void 0,
95
+ status: P.status || void 0,
96
+ plannedDate: P.plannedDate || void 0,
97
+ releaseNotes: P.releaseNotes || void 0,
98
+ tags: P.tags ? P.tags.split(",").map((e) => e.trim()).filter(Boolean) : void 0
98
99
  }
99
100
  } });
100
101
  },
101
- disabled: D,
102
- children: [D ? /* @__PURE__ */ d(a, { className: "mr-1 h-4 w-4 animate-spin" }) : /* @__PURE__ */ d(o, { className: "mr-1 h-4 w-4" }), "Save Changes"]
102
+ disabled: O,
103
+ children: [O ? /* @__PURE__ */ f(o, { className: "mr-1 h-4 w-4 animate-spin" }) : /* @__PURE__ */ f(s, { className: "mr-1 h-4 w-4" }), "Save Changes"]
103
104
  })]
104
105
  }),
105
- O && /* @__PURE__ */ f("div", {
106
+ k && /* @__PURE__ */ p("div", {
106
107
  className: "p-3 rounded-md bg-destructive/10 text-destructive text-sm",
107
- children: ["Failed to save: ", O.message]
108
+ children: ["Failed to save: ", k.message]
108
109
  }),
109
- /* @__PURE__ */ f(m, { children: [/* @__PURE__ */ d(g, { children: /* @__PURE__ */ d(_, { children: "Release Details" }) }), /* @__PURE__ */ f(h, {
110
+ /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f(_, { children: /* @__PURE__ */ f(v, { children: "Release Details" }) }), /* @__PURE__ */ p(g, {
110
111
  className: "space-y-4",
111
112
  children: [
112
- /* @__PURE__ */ f("div", {
113
+ /* @__PURE__ */ p("div", {
113
114
  className: "grid grid-cols-2 gap-4",
114
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
115
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
115
116
  className: "text-sm font-medium",
116
117
  children: "Version"
117
- }), /* @__PURE__ */ d(v, {
118
- value: N.version,
119
- onChange: (e) => P({
120
- ...N,
118
+ }), /* @__PURE__ */ f(y, {
119
+ value: P.version,
120
+ onChange: (e) => F({
121
+ ...P,
121
122
  version: e.target.value
122
123
  }),
123
124
  className: "mt-1",
124
125
  placeholder: "v1.0.0"
125
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
126
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
126
127
  className: "text-sm font-medium",
127
128
  children: "Name"
128
- }), /* @__PURE__ */ d(v, {
129
- value: N.name,
130
- onChange: (e) => P({
131
- ...N,
129
+ }), /* @__PURE__ */ f(y, {
130
+ value: P.name,
131
+ onChange: (e) => F({
132
+ ...P,
132
133
  name: e.target.value
133
134
  }),
134
135
  className: "mt-1"
135
136
  })] })]
136
137
  }),
137
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
138
- className: "text-sm font-medium",
139
- children: "Description"
140
- }), /* @__PURE__ */ d("textarea", {
141
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
142
- value: N.description,
143
- onChange: (e) => P({
144
- ...N,
145
- description: e.target.value
146
- })
147
- })] }),
148
- /* @__PURE__ */ f("div", {
138
+ /* @__PURE__ */ f(n, {
139
+ label: "Description",
140
+ value: P.description,
141
+ onChange: (e) => F({
142
+ ...P,
143
+ description: e
144
+ }),
145
+ minHeight: 80
146
+ }),
147
+ /* @__PURE__ */ p("div", {
149
148
  className: "grid grid-cols-2 gap-4",
150
- children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
149
+ children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
151
150
  className: "text-sm font-medium",
152
151
  children: "Status"
153
- }), /* @__PURE__ */ d("select", {
152
+ }), /* @__PURE__ */ f("select", {
154
153
  className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
155
- value: N.status,
156
- onChange: (e) => P({
157
- ...N,
154
+ value: P.status,
155
+ onChange: (e) => F({
156
+ ...P,
158
157
  status: e.target.value
159
158
  }),
160
159
  children: [
@@ -165,57 +164,55 @@ function x() {
165
164
  "RELEASED",
166
165
  "CANCELLED",
167
166
  "ROLLED_BACK"
168
- ].map((e) => /* @__PURE__ */ d("option", {
167
+ ].map((e) => /* @__PURE__ */ f("option", {
169
168
  value: e,
170
169
  className: "capitalize",
171
170
  children: e.toLowerCase().replace("_", " ")
172
171
  }, e))
173
- })] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
172
+ })] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
174
173
  className: "text-sm font-medium",
175
174
  children: "Planned Date"
176
- }), /* @__PURE__ */ d(v, {
175
+ }), /* @__PURE__ */ f(y, {
177
176
  type: "date",
178
- value: N.plannedDate,
179
- onChange: (e) => P({
180
- ...N,
177
+ value: P.plannedDate,
178
+ onChange: (e) => F({
179
+ ...P,
181
180
  plannedDate: e.target.value
182
181
  }),
183
182
  className: "mt-1"
184
183
  })] })]
185
184
  }),
186
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
185
+ /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
187
186
  className: "text-sm font-medium",
188
187
  children: "Tags (comma-separated)"
189
- }), /* @__PURE__ */ d(v, {
190
- value: N.tags,
191
- onChange: (e) => P({
192
- ...N,
188
+ }), /* @__PURE__ */ f(y, {
189
+ value: P.tags,
190
+ onChange: (e) => F({
191
+ ...P,
193
192
  tags: e.target.value
194
193
  }),
195
194
  className: "mt-1",
196
195
  placeholder: "e.g. critical, security, performance"
197
196
  })] }),
198
- /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
199
- className: "text-sm font-medium",
200
- children: "Release Notes"
201
- }), /* @__PURE__ */ d("textarea", {
202
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[120px] font-mono",
203
- value: N.releaseNotes,
204
- onChange: (e) => P({
205
- ...N,
206
- releaseNotes: e.target.value
197
+ /* @__PURE__ */ f(n, {
198
+ label: "Release Notes",
199
+ value: P.releaseNotes,
200
+ onChange: (e) => F({
201
+ ...P,
202
+ releaseNotes: e
207
203
  }),
208
- placeholder: "Describe what changed in this release..."
209
- })] })
204
+ placeholder: "Describe what changed in this release...",
205
+ minHeight: 120
206
+ })
210
207
  ]
211
208
  })] })
212
209
  ]
213
- }) : /* @__PURE__ */ d("div", {
210
+ }) : /* @__PURE__ */ f("div", {
214
211
  className: "p-6 text-muted-foreground",
215
212
  children: "Release not found."
216
213
  });
217
214
  }
218
215
  //#endregion
219
- export { x as ProductsEditReleasePagePage };
216
+ export { S as ProductsEditReleasePagePage };
220
217
 
221
218
  //# sourceMappingURL=ProductsEditReleasePagePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsEditReleasePagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsEditReleasePagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState, useMemo } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery, useMutation } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, ArrowLeft, Loader2 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { useParams } from 'react-router-dom';\n\nconst GET_RELEASE = gql`\n query GetReleaseForEdit($id: ID!) {\n planmagnetRelease(id: $id) {\n id\n name\n description\n version\n status\n plannedDate\n releasedAt\n releaseNotes\n ownerId\n tags\n }\n }\n`;\n\nconst UPDATE_RELEASE = gql`\n mutation UpdateRelease($id: ID!, $input: PlanmagnetUpdateReleaseInput!) {\n planmagnetUpdateRelease(id: $id, input: $input) {\n id\n name\n description\n version\n status\n plannedDate\n releaseNotes\n tags\n updatedAt\n }\n }\n`;\n\nexport function ProductsEditReleasePagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const params = useParams<{ id: string }>();\n const releaseId = params.id ?? '';\n\n const {\n data,\n loading,\n error,\n } = // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useQuery<Record<string, any>>(GET_RELEASE, {\n variables: { id: releaseId },\n skip: !releaseId,\n });\n\n const [updateRelease, { loading: saving, error: saveError }] = useMutation(UPDATE_RELEASE, {\n refetchQueries: ['ListReleases', 'GetReleaseForEdit'],\n });\n\n const release = data?.planmagnetRelease;\n\n const defaultForm = useMemo(\n () => ({\n version: release?.version ?? '',\n name: release?.name ?? '',\n description: release?.description ?? '',\n status: release?.status ?? 'DRAFT',\n plannedDate: release?.plannedDate\n ? new Date(release.plannedDate).toISOString().split('T')[0]\n : '',\n releaseNotes: release?.releaseNotes ?? '',\n tags: release?.tags?.join(', ') ?? '',\n }),\n [release]\n );\n\n const [formOverrides, setFormOverrides] = useState<Record<string, string>>({});\n const form = { ...defaultForm, ...formOverrides };\n const setForm = (val: Record<string, string>) => setFormOverrides(val);\n\n const statuses = [\n 'DRAFT',\n 'PLANNING',\n 'IN_PROGRESS',\n 'READY',\n 'RELEASED',\n 'CANCELLED',\n 'ROLLED_BACK',\n ] as const;\n\n const handleSave = () => {\n updateRelease({\n variables: {\n id: releaseId,\n input: {\n version: form.version || undefined,\n name: form.name || undefined,\n description: form.description || undefined,\n status: form.status || undefined,\n plannedDate: form.plannedDate || undefined,\n releaseNotes: form.releaseNotes || undefined,\n tags: form.tags\n ? form.tags\n .split(',')\n .map((t: string) => t.trim())\n .filter(Boolean)\n : undefined,\n },\n },\n });\n };\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load release: {error.message}</div>;\n }\n\n if (!release) return <div className=\"p-6 text-muted-foreground\">Release not found.</div>;\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate('/products/releases')}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <div>\n <h1 className=\"text-2xl font-semibold\">Edit Release</h1>\n <p className=\"text-sm text-muted-foreground\">\n {release.version} - {release.name}\n </p>\n </div>\n </div>\n <Button size=\"sm\" onClick={handleSave} disabled={saving}>\n {saving ? (\n <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n ) : (\n <Save className=\"mr-1 h-4 w-4\" />\n )}\n Save Changes\n </Button>\n </div>\n\n {saveError && (\n <div className=\"p-3 rounded-md bg-destructive/10 text-destructive text-sm\">\n Failed to save: {saveError.message}\n </div>\n )}\n\n <Card>\n <CardHeader>\n <CardTitle>Release Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Version</label>\n <Input\n value={form.version}\n onChange={(e) => setForm({ ...form, version: e.target.value })}\n className=\"mt-1\"\n placeholder=\"v1.0.0\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n />\n </div>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Description</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]\"\n value={form.description}\n onChange={(e) => setForm({ ...form, description: e.target.value })}\n />\n </div>\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Status</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.status}\n onChange={(e) => setForm({ ...form, status: e.target.value })}\n >\n {statuses.map((s) => (\n <option key={s} value={s} className=\"capitalize\">\n {s.toLowerCase().replace('_', ' ')}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Planned Date</label>\n <Input\n type=\"date\"\n value={form.plannedDate}\n onChange={(e) => setForm({ ...form, plannedDate: e.target.value })}\n className=\"mt-1\"\n />\n </div>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Tags (comma-separated)</label>\n <Input\n value={form.tags}\n onChange={(e) => setForm({ ...form, tags: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. critical, security, performance\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Release Notes</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[120px] font-mono\"\n value={form.releaseNotes}\n onChange={(e) => setForm({ ...form, releaseNotes: e.target.value })}\n placeholder=\"Describe what changed in this release...\"\n />\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAUA,IAAM,IAAc,CAAG;;;;;;;;;;;;;;;GAiBjB,IAAiB,CAAG;;;;;;;;;;;;;;;AAgB1B,SAAgB,IAA8B;CAC5C,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,IADS,GAA2B,CACjB,MAAM,IAEzB,EACJ,SACA,YACA,aAGA,EAA8B,GAAa;EACzC,WAAW,EAAE,IAAI,GAAW;EAC5B,MAAM,CAAC;EACR,CAAC,EAEE,CAAC,GAAe,EAAE,SAAS,GAAQ,OAAO,OAAe,EAAY,GAAgB,EACzF,gBAAgB,CAAC,gBAAgB,oBAAoB,EACtD,CAAC,EAEI,IAAU,GAAM,mBAEhB,IAAc,SACX;EACL,SAAS,GAAS,WAAW;EAC7B,MAAM,GAAS,QAAQ;EACvB,aAAa,GAAS,eAAe;EACrC,QAAQ,GAAS,UAAU;EAC3B,aAAa,GAAS,cAClB,IAAI,KAAK,EAAQ,YAAY,CAAC,aAAa,CAAC,MAAM,IAAI,CAAC,KACvD;EACJ,cAAc,GAAS,g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;OACV,OAAO,EAAK;OACZ,WAAW,MAAM,EAAQ;QAAE,GAAG;QAAM,QAAQ,EAAE,OAAO;QAAO,CAAC;iBAlH1D;QACf;QACA;QACA;QACA;QACA;QACA;QACA;QACD,CA4GuB,KAAK,MACb,kBAAC,UAAD;QAAgB,OAAO;QAAG,WAAU;kBACjC,EAAE,aAAa,CAAC,QAAQ,KAAK,IAAI;QAC3B,EAFI,EAEJ,CACT;OACK,CAAA,CACL,EAAA,CAAA,EACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;OAAO,WAAU;iBAAsB;OAAoB,CAAA,EAC3D,kBAAC,GAAD;OACE,MAAK;OACL,OAAO,EAAK;OACZ,WAAW,MAAM,EAAQ;QAAE,GAAG;QAAM,aAAa,EAAE,OAAO;QAAO,CAAC;OAClE,WAAU;OACV,CAAA,CACE,EAAA,CAAA,CACF;;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAAsB;MAA8B,CAAA,EACrE,kBAAC,GAAD;MACE,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,MAAM,EAAE,OAAO;OAAO,CAAC;MAC3D,WAAU;MACV,aAAY;MACZ,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAAsB;MAAqB,CAAA,EAC5D,kBAAC,YAAD;MACE,WAAU;MACV,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,cAAc,EAAE,OAAO;OAAO,CAAC;MACnE,aAAY;MACZ,CAAA,CACE,EAAA,CAAA;KACM;MACT,EAAA,CAAA;GACH;MA7Ga,kBAAC,OAAD;EAAK,WAAU;YAA4B;EAAwB,CAAA"}
1
+ {"version":3,"file":"ProductsEditReleasePagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsEditReleasePagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState, useMemo } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery, useMutation } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, ArrowLeft, Loader2 } from 'lucide-react';\nimport { MarkdownEditor } from '#src/components/MarkdownEditor';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { useParams } from 'react-router-dom';\n\nconst GET_RELEASE = gql`\n query GetReleaseForEdit($id: ID!) {\n planmagnetRelease(id: $id) {\n id\n name\n description\n version\n status\n plannedDate\n releasedAt\n releaseNotes\n ownerId\n tags\n }\n }\n`;\n\nconst UPDATE_RELEASE = gql`\n mutation UpdateRelease($id: ID!, $input: PlanmagnetUpdateReleaseInput!) {\n planmagnetUpdateRelease(id: $id, input: $input) {\n id\n name\n description\n version\n status\n plannedDate\n releaseNotes\n tags\n updatedAt\n }\n }\n`;\n\nexport function ProductsEditReleasePagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const params = useParams<{ id: string }>();\n const releaseId = params.id ?? '';\n\n const {\n data,\n loading,\n error,\n } = // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useQuery<Record<string, any>>(GET_RELEASE, {\n variables: { id: releaseId },\n skip: !releaseId,\n });\n\n const [updateRelease, { loading: saving, error: saveError }] = useMutation(UPDATE_RELEASE, {\n refetchQueries: ['ListReleases', 'GetReleaseForEdit'],\n });\n\n const release = data?.planmagnetRelease;\n\n const defaultForm = useMemo(\n () => ({\n version: release?.version ?? '',\n name: release?.name ?? '',\n description: release?.description ?? '',\n status: release?.status ?? 'DRAFT',\n plannedDate: release?.plannedDate\n ? new Date(release.plannedDate).toISOString().split('T')[0]\n : '',\n releaseNotes: release?.releaseNotes ?? '',\n tags: release?.tags?.join(', ') ?? '',\n }),\n [release]\n );\n\n const [formOverrides, setFormOverrides] = useState<Record<string, string>>({});\n const form = { ...defaultForm, ...formOverrides };\n const setForm = (val: Record<string, string>) => setFormOverrides(val);\n\n const statuses = [\n 'DRAFT',\n 'PLANNING',\n 'IN_PROGRESS',\n 'READY',\n 'RELEASED',\n 'CANCELLED',\n 'ROLLED_BACK',\n ] as const;\n\n const handleSave = () => {\n updateRelease({\n variables: {\n id: releaseId,\n input: {\n version: form.version || undefined,\n name: form.name || undefined,\n description: form.description || undefined,\n status: form.status || undefined,\n plannedDate: form.plannedDate || undefined,\n releaseNotes: form.releaseNotes || undefined,\n tags: form.tags\n ? form.tags\n .split(',')\n .map((t: string) => t.trim())\n .filter(Boolean)\n : undefined,\n },\n },\n });\n };\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load release: {error.message}</div>;\n }\n\n if (!release) return <div className=\"p-6 text-muted-foreground\">Release not found.</div>;\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate('/products/releases')}>\n <ArrowLeft className=\"h-4 w-4\" />\n </Button>\n <div>\n <h1 className=\"text-2xl font-semibold\">Edit Release</h1>\n <p className=\"text-sm text-muted-foreground\">\n {release.version} - {release.name}\n </p>\n </div>\n </div>\n <Button size=\"sm\" onClick={handleSave} disabled={saving}>\n {saving ? (\n <Loader2 className=\"mr-1 h-4 w-4 animate-spin\" />\n ) : (\n <Save className=\"mr-1 h-4 w-4\" />\n )}\n Save Changes\n </Button>\n </div>\n\n {saveError && (\n <div className=\"p-3 rounded-md bg-destructive/10 text-destructive text-sm\">\n Failed to save: {saveError.message}\n </div>\n )}\n\n <Card>\n <CardHeader>\n <CardTitle>Release Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Version</label>\n <Input\n value={form.version}\n onChange={(e) => setForm({ ...form, version: e.target.value })}\n className=\"mt-1\"\n placeholder=\"v1.0.0\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n />\n </div>\n </div>\n <MarkdownEditor\n label=\"Description\"\n value={form.description}\n onChange={(value) => setForm({ ...form, description: value })}\n minHeight={80}\n />\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Status</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.status}\n onChange={(e) => setForm({ ...form, status: e.target.value })}\n >\n {statuses.map((s) => (\n <option key={s} value={s} className=\"capitalize\">\n {s.toLowerCase().replace('_', ' ')}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Planned Date</label>\n <Input\n type=\"date\"\n value={form.plannedDate}\n onChange={(e) => setForm({ ...form, plannedDate: e.target.value })}\n className=\"mt-1\"\n />\n </div>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Tags (comma-separated)</label>\n <Input\n value={form.tags}\n onChange={(e) => setForm({ ...form, tags: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. critical, security, performance\"\n />\n </div>\n <MarkdownEditor\n label=\"Release Notes\"\n value={form.releaseNotes}\n onChange={(value) => setForm({ ...form, releaseNotes: value })}\n placeholder=\"Describe what changed in this release...\"\n minHeight={120}\n />\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAc,CAAG;;;;;;;;;;;;;;;GAiBjB,IAAiB,CAAG;;;;;;;;;;;;;;;AAgB1B,SAAgB,IAA8B;CAC5C,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,IAD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AU,EAAQ;OAAE,GAAG;OAAM,cAAc;OAAO,CAAC;MAC9D,aAAY;MACZ,WAAW;MACX,CAAA;KACU;MACT,EAAA,CAAA;GACH;MAzGa,kBAAC,OAAD;EAAK,WAAU;YAA4B;EAAwB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ProductsReleaseDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProductsReleaseDetailPagePage.tsx"],"names":[],"mappings":"AAwDA,wBAAgB,6BAA6B,4CAiM5C"}
1
+ {"version":3,"file":"ProductsReleaseDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProductsReleaseDetailPagePage.tsx"],"names":[],"mappings":"AAyDA,wBAAgB,6BAA6B,4CAyM5C"}
@@ -5,8 +5,9 @@ import { gql as o } from "@apollo/client";
5
5
  import { useQuery as s } from "@apollo/client/react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  import { Badge as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m } from "@burdenoff/fe-libs/ui";
8
+ import { Markdown as h } from "@burdenoff/fe-libs/shared/components";
8
9
  //#region src/planmagnet/pages/ProductsReleaseDetailPagePage.tsx
9
- var h = o`
10
+ var g = o`
10
11
  query GetRelease($id: ID!) {
11
12
  planmagnetRelease(id: $id) {
12
13
  id
@@ -33,7 +34,7 @@ var h = o`
33
34
  }
34
35
  }
35
36
  }
36
- `, g = {
37
+ `, _ = {
37
38
  DRAFT: "bg-gray-100 text-gray-800",
38
39
  PLANNING: "bg-yellow-100 text-yellow-800",
39
40
  IN_PROGRESS: "bg-blue-100 text-blue-800",
@@ -42,25 +43,25 @@ var h = o`
42
43
  CANCELLED: "bg-red-100 text-red-800",
43
44
  ROLLED_BACK: "bg-red-100 text-red-800"
44
45
  };
45
- function _() {
46
- let { workspaceId: o } = e(), _ = a().id ?? "", { data: v, loading: y, error: b } = s(h, {
47
- variables: { id: _ },
48
- skip: !_
46
+ function v() {
47
+ let { workspaceId: o } = e(), v = a().id ?? "", { data: y, loading: b, error: x } = s(g, {
48
+ variables: { id: v },
49
+ skip: !v
49
50
  });
50
- if (y) return /* @__PURE__ */ c("div", {
51
+ if (b) return /* @__PURE__ */ c("div", {
51
52
  className: "flex items-center justify-center p-12",
52
53
  children: /* @__PURE__ */ c(i, { className: "h-8 w-8 animate-spin text-muted-foreground" })
53
54
  });
54
- if (b) return /* @__PURE__ */ l("div", {
55
+ if (x) return /* @__PURE__ */ l("div", {
55
56
  className: "p-6 text-destructive",
56
- children: ["Failed to load release: ", b.message]
57
+ children: ["Failed to load release: ", x.message]
57
58
  });
58
- let x = v?.planmagnetRelease;
59
- if (!x) return /* @__PURE__ */ c("div", {
59
+ let S = y?.planmagnetRelease;
60
+ if (!S) return /* @__PURE__ */ c("div", {
60
61
  className: "p-6 text-muted-foreground",
61
62
  children: "Release not found."
62
63
  });
63
- let S = x.workItems ?? [], C = S.filter((e) => e.type === "STORY" || e.type === "FEATURE"), w = S.filter((e) => e.type === "BUG");
64
+ let C = S.workItems ?? [], w = C.filter((e) => e.type === "STORY" || e.type === "FEATURE"), T = C.filter((e) => e.type === "BUG");
64
65
  return /* @__PURE__ */ l("div", {
65
66
  className: "space-y-6 p-6",
66
67
  children: [/* @__PURE__ */ l("div", {
@@ -71,20 +72,20 @@ function _() {
71
72
  /* @__PURE__ */ c(r, { className: "h-5 w-5 text-primary" }),
72
73
  /* @__PURE__ */ c("h1", {
73
74
  className: "text-2xl font-semibold",
74
- children: x.version
75
+ children: S.version
75
76
  }),
76
77
  /* @__PURE__ */ c("span", {
77
- className: `text-xs px-2 py-0.5 rounded-full capitalize ${g[x.status] ?? "bg-gray-100"}`,
78
- children: x.status.toLowerCase().replace("_", " ")
78
+ className: `text-xs px-2 py-0.5 rounded-full capitalize ${_[S.status] ?? "bg-gray-100"}`,
79
+ children: S.status.toLowerCase().replace("_", " ")
79
80
  })
80
81
  ]
81
82
  }), /* @__PURE__ */ c("p", {
82
83
  className: "text-sm text-muted-foreground mt-1",
83
- children: x.name
84
+ children: S.name
84
85
  })] }), /* @__PURE__ */ c(u, {
85
86
  variant: "outline",
86
87
  className: "capitalize",
87
- children: x.status.toLowerCase().replace("_", " ")
88
+ children: S.status.toLowerCase().replace("_", " ")
88
89
  })]
89
90
  }), /* @__PURE__ */ l("div", {
90
91
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
@@ -93,9 +94,9 @@ function _() {
93
94
  children: [
94
95
  /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Overview" }) }), /* @__PURE__ */ l(f, {
95
96
  className: "space-y-4",
96
- children: [/* @__PURE__ */ c("p", {
97
- className: "text-sm",
98
- children: x.description ?? "No description provided."
97
+ children: [/* @__PURE__ */ c("div", {
98
+ className: "text-sm prose prose-sm dark:prose-invert max-w-none",
99
+ children: S.description ? /* @__PURE__ */ c(h, { children: S.description }) : /* @__PURE__ */ c("p", { children: "No description provided." })
99
100
  }), /* @__PURE__ */ l("div", {
100
101
  className: "grid grid-cols-3 gap-4",
101
102
  children: [
@@ -103,7 +104,7 @@ function _() {
103
104
  className: "text-center p-3 bg-muted rounded-md",
104
105
  children: [/* @__PURE__ */ c("p", {
105
106
  className: "text-lg font-semibold mt-1",
106
- children: C.length
107
+ children: w.length
107
108
  }), /* @__PURE__ */ c("p", {
108
109
  className: "text-xs text-muted-foreground",
109
110
  children: "Features"
@@ -113,7 +114,7 @@ function _() {
113
114
  className: "text-center p-3 bg-muted rounded-md",
114
115
  children: [/* @__PURE__ */ c("p", {
115
116
  className: "text-lg font-semibold mt-1",
116
- children: w.length
117
+ children: T.length
117
118
  }), /* @__PURE__ */ c("p", {
118
119
  className: "text-xs text-muted-foreground",
119
120
  children: "Bug Fixes"
@@ -123,7 +124,7 @@ function _() {
123
124
  className: "text-center p-3 bg-muted rounded-md",
124
125
  children: [/* @__PURE__ */ c("p", {
125
126
  className: "text-lg font-semibold mt-1",
126
- children: S.length
127
+ children: C.length
127
128
  }), /* @__PURE__ */ c("p", {
128
129
  className: "text-xs text-muted-foreground",
129
130
  children: "Total Items"
@@ -132,17 +133,17 @@ function _() {
132
133
  ]
133
134
  })]
134
135
  })] }),
135
- x.releaseNotes && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Release Notes" }) }), /* @__PURE__ */ c(f, { children: /* @__PURE__ */ c("p", {
136
- className: "text-sm whitespace-pre-wrap",
137
- children: x.releaseNotes
136
+ S.releaseNotes && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Release Notes" }) }), /* @__PURE__ */ c(f, { children: /* @__PURE__ */ c("div", {
137
+ className: "text-sm prose prose-sm dark:prose-invert max-w-none",
138
+ children: /* @__PURE__ */ c(h, { children: S.releaseNotes })
138
139
  }) })] }),
139
- S.length > 0 && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, { children: [
140
+ C.length > 0 && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, { children: [
140
141
  "Work Items (",
141
- S.length,
142
+ C.length,
142
143
  ")"
143
144
  ] }) }), /* @__PURE__ */ c(f, {
144
145
  className: "space-y-2",
145
- children: S.map((e) => /* @__PURE__ */ l("div", {
146
+ children: C.map((e) => /* @__PURE__ */ l("div", {
146
147
  className: "flex items-center justify-between border rounded-md p-3",
147
148
  children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
148
149
  className: "text-sm font-medium",
@@ -178,10 +179,10 @@ function _() {
178
179
  }),
179
180
  /* @__PURE__ */ c("span", {
180
181
  className: "font-medium",
181
- children: x.plannedDate ? new Date(x.plannedDate).toLocaleDateString() : "Not set"
182
+ children: S.plannedDate ? new Date(S.plannedDate).toLocaleDateString() : "Not set"
182
183
  })
183
184
  ]
184
- }), x.releasedAt && /* @__PURE__ */ l("div", {
185
+ }), S.releasedAt && /* @__PURE__ */ l("div", {
185
186
  className: "flex items-center gap-2",
186
187
  children: [
187
188
  /* @__PURE__ */ c(n, { className: "h-4 w-4 text-green-500" }),
@@ -191,7 +192,7 @@ function _() {
191
192
  }),
192
193
  /* @__PURE__ */ c("span", {
193
194
  className: "font-medium",
194
- children: new Date(x.releasedAt).toLocaleDateString()
195
+ children: new Date(S.releasedAt).toLocaleDateString()
195
196
  })
196
197
  ]
197
198
  })]
@@ -206,7 +207,7 @@ function _() {
206
207
  children: "Version"
207
208
  }), /* @__PURE__ */ c("span", {
208
209
  className: "font-medium",
209
- children: x.version
210
+ children: S.version
210
211
  })]
211
212
  }),
212
213
  /* @__PURE__ */ l("div", {
@@ -217,7 +218,7 @@ function _() {
217
218
  }), /* @__PURE__ */ c(u, {
218
219
  variant: "outline",
219
220
  className: "text-xs capitalize",
220
- children: x.status.toLowerCase().replace("_", " ")
221
+ children: S.status.toLowerCase().replace("_", " ")
221
222
  })]
222
223
  }),
223
224
  /* @__PURE__ */ l("div", {
@@ -225,27 +226,27 @@ function _() {
225
226
  children: [/* @__PURE__ */ c("span", {
226
227
  className: "text-muted-foreground",
227
228
  children: "Owner"
228
- }), /* @__PURE__ */ c("span", { children: x.ownerId })]
229
+ }), /* @__PURE__ */ c("span", { children: S.ownerId })]
229
230
  }),
230
231
  /* @__PURE__ */ l("div", {
231
232
  className: "flex justify-between",
232
233
  children: [/* @__PURE__ */ c("span", {
233
234
  className: "text-muted-foreground",
234
235
  children: "Created"
235
- }), /* @__PURE__ */ c("span", { children: new Date(x.createdAt).toLocaleDateString() })]
236
+ }), /* @__PURE__ */ c("span", { children: new Date(S.createdAt).toLocaleDateString() })]
236
237
  }),
237
238
  /* @__PURE__ */ l("div", {
238
239
  className: "flex justify-between",
239
240
  children: [/* @__PURE__ */ c("span", {
240
241
  className: "text-muted-foreground",
241
242
  children: "Updated"
242
- }), /* @__PURE__ */ c("span", { children: new Date(x.updatedAt).toLocaleDateString() })]
243
+ }), /* @__PURE__ */ c("span", { children: new Date(S.updatedAt).toLocaleDateString() })]
243
244
  })
244
245
  ]
245
246
  })] }),
246
- x.tags?.length > 0 && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Tags" }) }), /* @__PURE__ */ c(f, {
247
+ S.tags?.length > 0 && /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Tags" }) }), /* @__PURE__ */ c(f, {
247
248
  className: "flex flex-wrap gap-1",
248
- children: x.tags.map((e) => /* @__PURE__ */ c(u, {
249
+ children: S.tags.map((e) => /* @__PURE__ */ c(u, {
249
250
  variant: "outline",
250
251
  className: "text-xs",
251
252
  children: e
@@ -257,6 +258,6 @@ function _() {
257
258
  });
258
259
  }
259
260
  //#endregion
260
- export { _ as ProductsReleaseDetailPagePage };
261
+ export { v as ProductsReleaseDetailPagePage };
261
262
 
262
263
  //# sourceMappingURL=ProductsReleaseDetailPagePage.js.map