@burdenoff/microfe-planmagnet 2026.925.16 → 2026.925.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-types.d.ts +43 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js +122 -118
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +105 -98
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/releases/ReleaseGatesCard.d.ts +7 -0
- package/dist/planmagnet/releases/ReleaseGatesCard.d.ts.map +1 -1
- package/dist/planmagnet/releases/ReleaseGatesCard.js +1 -1
- package/dist/planmagnet/releases/ReleaseGatesCard.js.map +1 -1
- package/dist/planmagnet/releases/ReleaseReadinessCard.d.ts +7 -0
- package/dist/planmagnet/releases/ReleaseReadinessCard.d.ts.map +1 -0
- package/dist/planmagnet/releases/ReleaseReadinessCard.js +390 -0
- package/dist/planmagnet/releases/ReleaseReadinessCard.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocsDocDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/DocsDocDetailPagePage.tsx"],"names":[],"mappings":"AA2HA,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"DocsDocDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/DocsDocDetailPagePage.tsx"],"names":[],"mappings":"AA2HA,wBAAgB,qBAAqB,4CAoZpC"}
|
|
@@ -4,15 +4,15 @@ import { MarkdownEditor as n } from "../../components/MarkdownEditor.js";
|
|
|
4
4
|
import { throwOnError as ee } from "../utils/mutationResult.js";
|
|
5
5
|
import { DOC_STATUSES as te, DocStatusBadge as ne } from "../docs/DocStatusBadge.js";
|
|
6
6
|
import { useState as r } from "react";
|
|
7
|
-
import { ArrowLeft as
|
|
8
|
-
import { useSearchParams as
|
|
9
|
-
import { gql as
|
|
10
|
-
import { useMutation as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { AlertDialog as
|
|
13
|
-
import { Markdown as
|
|
7
|
+
import { ArrowLeft as i, History as re, Link2 as a, X as ie } from "lucide-react";
|
|
8
|
+
import { useSearchParams as o } from "react-router";
|
|
9
|
+
import { gql as s } from "@apollo/client";
|
|
10
|
+
import { useApolloClient as ae, useMutation as c, useQuery as oe } from "@apollo/client/react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
import { AlertDialog as d, AlertDialogAction as f, AlertDialogCancel as p, AlertDialogContent as m, AlertDialogDescription as h, AlertDialogFooter as g, AlertDialogHeader as _, AlertDialogTitle as v, AlertDialogTrigger as y, Button as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, Input as T } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { Markdown as E } from "@burdenoff/fe-libs/shared/components";
|
|
14
14
|
//#region src/planmagnet/pages/DocsDocDetailPagePage.tsx
|
|
15
|
-
var
|
|
15
|
+
var D = s`
|
|
16
16
|
query DocDetail($id: ID!) {
|
|
17
17
|
planmagnetDoc(id: $id) {
|
|
18
18
|
id
|
|
@@ -40,7 +40,7 @@ var le = i`
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
`,
|
|
43
|
+
`, se = s`
|
|
44
44
|
mutation DocUpdate($id: ID!, $input: PlanmagnetUpdateDocInput!) {
|
|
45
45
|
planmagnetUpdateDoc(id: $id, input: $input) {
|
|
46
46
|
id
|
|
@@ -48,111 +48,115 @@ var le = i`
|
|
|
48
48
|
status
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
`,
|
|
51
|
+
`, ce = s`
|
|
52
52
|
mutation DocRevert($id: ID!, $toVersion: Int!, $expectedVersion: Int) {
|
|
53
53
|
planmagnetRevertDoc(id: $id, toVersion: $toVersion, expectedVersion: $expectedVersion) {
|
|
54
54
|
id
|
|
55
55
|
version
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`,
|
|
58
|
+
`, le = s`
|
|
59
59
|
mutation DocDelete($id: ID!) {
|
|
60
60
|
planmagnetDeleteDoc(id: $id)
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`, ue = s`
|
|
63
63
|
mutation DocUnlinkWorkItem($docId: ID!, $workItemId: ID!) {
|
|
64
64
|
planmagnetUnlinkDocFromWorkItem(docId: $docId, workItemId: $workItemId)
|
|
65
65
|
}
|
|
66
|
-
`, de = (e, t) => e instanceof Error ? e.message : t,
|
|
67
|
-
function
|
|
68
|
-
let [
|
|
69
|
-
variables: { id:
|
|
70
|
-
skip: !
|
|
66
|
+
`, de = (e, t) => e instanceof Error ? e.message : t, O = (e) => new Date(e).toLocaleString();
|
|
67
|
+
function k() {
|
|
68
|
+
let [s] = o(), k = s.get("docId") ?? "", A = e(), [j, M] = r(!1), [N, P] = r(""), [F, I] = r(""), [L, R] = r(""), [z, B] = r(null), [V, fe] = r(null), [H, pe] = r(null), { data: U, loading: me, error: W } = oe(D, {
|
|
69
|
+
variables: { id: k },
|
|
70
|
+
skip: !k,
|
|
71
71
|
fetchPolicy: "cache-and-network"
|
|
72
|
-
}), G = {
|
|
72
|
+
}), he = ae(), G = {
|
|
73
73
|
refetchQueries: ["DocDetail"],
|
|
74
74
|
awaitRefetchQueries: !0
|
|
75
|
-
}, [K, q] =
|
|
76
|
-
|
|
75
|
+
}, [K, q] = c(se, G), [ge, _e] = c(ce, G), [ve, ye] = c(le, { refetchQueries: ["DocsList"] }), [be, J] = c(ue, G), Y = U?.planmagnetDoc, X = q.loading || _e.loading || ye.loading, Z = async (e, t) => {
|
|
76
|
+
B(null);
|
|
77
77
|
try {
|
|
78
78
|
return await ee(e()), !0;
|
|
79
79
|
} catch (e) {
|
|
80
|
-
return
|
|
80
|
+
return B(de(e, t)), await he.query({
|
|
81
|
+
query: D,
|
|
82
|
+
variables: { id: k },
|
|
83
|
+
fetchPolicy: "network-only"
|
|
84
|
+
}).catch(() => void 0), !1;
|
|
81
85
|
}
|
|
82
86
|
};
|
|
83
|
-
if (!
|
|
87
|
+
if (!k) return /* @__PURE__ */ l("div", {
|
|
84
88
|
className: "p-6 text-sm text-muted-foreground",
|
|
85
89
|
children: "No doc selected."
|
|
86
90
|
});
|
|
87
|
-
if (
|
|
91
|
+
if (me && !U) return /* @__PURE__ */ l("div", {
|
|
88
92
|
className: "p-6 text-sm text-muted-foreground",
|
|
89
93
|
children: "Loading doc…"
|
|
90
94
|
});
|
|
91
|
-
if (W && !Y) return /* @__PURE__ */
|
|
95
|
+
if (W && !Y) return /* @__PURE__ */ u("p", {
|
|
92
96
|
role: "alert",
|
|
93
97
|
className: "p-6 text-sm text-destructive",
|
|
94
98
|
children: ["The doc could not be loaded: ", W.message]
|
|
95
99
|
});
|
|
96
|
-
if (!Y) return /* @__PURE__ */
|
|
100
|
+
if (!Y) return /* @__PURE__ */ u("div", {
|
|
97
101
|
className: "space-y-3 p-6",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ l("p", {
|
|
99
103
|
className: "text-sm text-muted-foreground",
|
|
100
104
|
children: "This doc does not exist in this workspace, or it was deleted."
|
|
101
|
-
}), /* @__PURE__ */
|
|
105
|
+
}), /* @__PURE__ */ l(b, {
|
|
102
106
|
size: "sm",
|
|
103
107
|
variant: "outline",
|
|
104
|
-
onClick: () =>
|
|
108
|
+
onClick: () => A("/docs/docs-page"),
|
|
105
109
|
children: "Back to docs"
|
|
106
110
|
})]
|
|
107
111
|
});
|
|
108
|
-
let
|
|
109
|
-
|
|
110
|
-
},
|
|
112
|
+
let xe = () => {
|
|
113
|
+
P(Y.title), I(Y.content), R(""), B(null), pe(Y.version), M(!0);
|
|
114
|
+
}, Se = async () => {
|
|
111
115
|
await Z(() => K({ variables: {
|
|
112
116
|
id: Y.id,
|
|
113
117
|
input: {
|
|
114
|
-
title:
|
|
115
|
-
content:
|
|
116
|
-
...
|
|
118
|
+
title: N.trim(),
|
|
119
|
+
content: F,
|
|
120
|
+
...L.trim() ? { changeNote: L.trim() } : {},
|
|
117
121
|
expectedVersion: H
|
|
118
122
|
}
|
|
119
|
-
} }), "The doc could not be saved.") &&
|
|
120
|
-
}, Q = [...Y.revisions].sort((e, t) => t.version - e.version), $ =
|
|
121
|
-
return /* @__PURE__ */
|
|
123
|
+
} }), "The doc could not be saved.") && M(!1);
|
|
124
|
+
}, Q = [...Y.revisions].sort((e, t) => t.version - e.version), $ = V === null ? null : Q.find((e) => e.version === V);
|
|
125
|
+
return /* @__PURE__ */ u("div", {
|
|
122
126
|
className: "space-y-6 p-6",
|
|
123
127
|
"data-testid": "doc-detail",
|
|
124
128
|
children: [
|
|
125
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ u(b, {
|
|
126
130
|
size: "sm",
|
|
127
131
|
variant: "ghost",
|
|
128
|
-
onClick: () =>
|
|
129
|
-
children: [/* @__PURE__ */
|
|
132
|
+
onClick: () => A("/docs/docs-page"),
|
|
133
|
+
children: [/* @__PURE__ */ l(i, { className: "mr-1 h-4 w-4" }), "All docs"]
|
|
130
134
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ u("div", {
|
|
132
136
|
className: "flex flex-wrap items-start justify-between gap-3",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
137
|
+
children: [/* @__PURE__ */ u("div", {
|
|
134
138
|
className: "min-w-0 space-y-1",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ l("h1", {
|
|
136
140
|
className: "text-2xl font-semibold break-words",
|
|
137
141
|
"data-testid": "doc-title",
|
|
138
142
|
children: Y.title
|
|
139
|
-
}), /* @__PURE__ */
|
|
143
|
+
}), /* @__PURE__ */ u("p", {
|
|
140
144
|
className: "text-xs text-muted-foreground",
|
|
141
145
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ l(ne, { status: Y.status }),
|
|
143
147
|
" · version ",
|
|
144
148
|
Y.version,
|
|
145
149
|
" · updated",
|
|
146
150
|
" ",
|
|
147
|
-
|
|
151
|
+
O(Y.updatedAt),
|
|
148
152
|
" by ",
|
|
149
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ l(t, { id: Y.updatedBy ?? Y.createdBy })
|
|
150
154
|
]
|
|
151
155
|
})]
|
|
152
|
-
}), !
|
|
156
|
+
}), !j && /* @__PURE__ */ u("div", {
|
|
153
157
|
className: "flex flex-wrap gap-2",
|
|
154
158
|
children: [
|
|
155
|
-
te.filter((e) => e !== Y.status).map((e) => /* @__PURE__ */
|
|
159
|
+
te.filter((e) => e !== Y.status).map((e) => /* @__PURE__ */ l(b, {
|
|
156
160
|
size: "sm",
|
|
157
161
|
variant: "outline",
|
|
158
162
|
disabled: X,
|
|
@@ -165,48 +169,48 @@ function O() {
|
|
|
165
169
|
} }), "The status could not be changed."),
|
|
166
170
|
children: e === "PUBLISHED" ? "Publish" : e === "ARCHIVED" ? "Archive" : "Back to draft"
|
|
167
171
|
}, e)),
|
|
168
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ l(b, {
|
|
169
173
|
size: "sm",
|
|
170
|
-
onClick:
|
|
174
|
+
onClick: xe,
|
|
171
175
|
"data-testid": "doc-edit",
|
|
172
176
|
children: "Edit"
|
|
173
177
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ u(d, { children: [/* @__PURE__ */ l(y, {
|
|
175
179
|
asChild: !0,
|
|
176
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ l(b, {
|
|
177
181
|
size: "sm",
|
|
178
182
|
variant: "outline",
|
|
179
183
|
disabled: X,
|
|
180
184
|
children: "Delete"
|
|
181
185
|
})
|
|
182
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ u(_, { children: [/* @__PURE__ */ u(v, { children: [
|
|
183
187
|
"Delete “",
|
|
184
188
|
Y.title,
|
|
185
189
|
"”?"
|
|
186
|
-
] }), /* @__PURE__ */
|
|
190
|
+
] }), /* @__PURE__ */ u(h, { children: [
|
|
187
191
|
"The doc and its history are removed for everyone, and it is unlinked from",
|
|
188
192
|
" ",
|
|
189
193
|
Y.linkedWorkItems.length,
|
|
190
194
|
" work item",
|
|
191
195
|
Y.linkedWorkItems.length === 1 ? "" : "s",
|
|
192
196
|
"."
|
|
193
|
-
] })] }), /* @__PURE__ */
|
|
197
|
+
] })] }), /* @__PURE__ */ u(g, { children: [/* @__PURE__ */ l(p, { children: "Keep it" }), /* @__PURE__ */ l(f, {
|
|
194
198
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
195
199
|
onClick: async () => {
|
|
196
|
-
await Z(() =>
|
|
200
|
+
await Z(() => ve({ variables: { id: Y.id } }), "The doc could not be deleted.") && A("/docs/docs-page");
|
|
197
201
|
},
|
|
198
202
|
children: "Delete"
|
|
199
203
|
})] })] })] })
|
|
200
204
|
]
|
|
201
205
|
})]
|
|
202
206
|
}),
|
|
203
|
-
|
|
207
|
+
z && /* @__PURE__ */ l("p", {
|
|
204
208
|
role: "alert",
|
|
205
209
|
className: "text-sm text-destructive",
|
|
206
210
|
"data-testid": "doc-error",
|
|
207
|
-
children:
|
|
211
|
+
children: z
|
|
208
212
|
}),
|
|
209
|
-
|
|
213
|
+
j && H !== Y.version && /* @__PURE__ */ u("p", {
|
|
210
214
|
className: "text-sm text-status-warning-text",
|
|
211
215
|
"data-testid": "doc-moved-on",
|
|
212
216
|
children: [
|
|
@@ -217,92 +221,92 @@ function O() {
|
|
|
217
221
|
". Your text is kept below; copy what you need, then discard and edit the latest."
|
|
218
222
|
]
|
|
219
223
|
}),
|
|
220
|
-
|
|
224
|
+
j ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ u(S, {
|
|
221
225
|
className: "space-y-3 pt-6",
|
|
222
226
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ l(T, {
|
|
224
228
|
"aria-label": "Doc title",
|
|
225
|
-
value:
|
|
226
|
-
onChange: (e) =>
|
|
229
|
+
value: N,
|
|
230
|
+
onChange: (e) => P(e.target.value)
|
|
227
231
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
value:
|
|
230
|
-
onChange:
|
|
232
|
+
/* @__PURE__ */ l(n, {
|
|
233
|
+
value: F,
|
|
234
|
+
onChange: I,
|
|
231
235
|
minHeight: 240
|
|
232
236
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ l(T, {
|
|
234
238
|
"aria-label": "Change note",
|
|
235
239
|
placeholder: "What changed? (optional, shown in the history)",
|
|
236
|
-
value:
|
|
237
|
-
onChange: (e) =>
|
|
240
|
+
value: L,
|
|
241
|
+
onChange: (e) => R(e.target.value)
|
|
238
242
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ u("div", {
|
|
240
244
|
className: "flex justify-end gap-2",
|
|
241
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ l(b, {
|
|
242
246
|
size: "sm",
|
|
243
247
|
variant: "ghost",
|
|
244
248
|
onClick: () => {
|
|
245
|
-
|
|
249
|
+
M(!1), B(null);
|
|
246
250
|
},
|
|
247
251
|
children: H === Y.version ? "Cancel" : "Discard my edits"
|
|
248
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ l(b, {
|
|
249
253
|
size: "sm",
|
|
250
|
-
onClick:
|
|
254
|
+
onClick: Se,
|
|
251
255
|
disabled: q.loading || H !== Y.version,
|
|
252
256
|
"data-testid": "doc-save",
|
|
253
257
|
children: q.loading ? "Saving…" : "Save new version"
|
|
254
258
|
})]
|
|
255
259
|
})
|
|
256
260
|
]
|
|
257
|
-
}) }) : /* @__PURE__ */
|
|
261
|
+
}) }) : /* @__PURE__ */ l(x, { children: /* @__PURE__ */ l(S, {
|
|
258
262
|
className: "prose prose-sm max-w-none pt-6 dark:prose-invert",
|
|
259
|
-
children: Y.content.trim() ? /* @__PURE__ */
|
|
263
|
+
children: Y.content.trim() ? /* @__PURE__ */ l(E, { children: Y.content }) : /* @__PURE__ */ l("p", {
|
|
260
264
|
className: "text-sm text-muted-foreground",
|
|
261
265
|
children: "This doc is empty."
|
|
262
266
|
})
|
|
263
267
|
}) }),
|
|
264
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ u("div", {
|
|
265
269
|
className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ u(x, {
|
|
267
271
|
"data-testid": "doc-history",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ l(C, { children: /* @__PURE__ */ u(w, {
|
|
269
273
|
className: "flex items-center gap-2",
|
|
270
274
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ l(re, { className: "h-4 w-4" }),
|
|
272
276
|
" History (",
|
|
273
277
|
Q.length,
|
|
274
278
|
")"
|
|
275
279
|
]
|
|
276
|
-
}) }), /* @__PURE__ */
|
|
280
|
+
}) }), /* @__PURE__ */ u(S, {
|
|
277
281
|
className: "space-y-2",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
282
|
+
children: [/* @__PURE__ */ l("ol", {
|
|
279
283
|
className: "space-y-2",
|
|
280
284
|
children: Q.map((e) => {
|
|
281
285
|
let n = e.version === Y.version;
|
|
282
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ u("li", {
|
|
283
287
|
className: "space-y-1 rounded-md border p-2",
|
|
284
288
|
"data-testid": "doc-revision",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ u("div", {
|
|
286
290
|
className: "flex flex-wrap items-center justify-between gap-2",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ u("span", {
|
|
288
292
|
className: "text-sm font-medium",
|
|
289
293
|
children: [
|
|
290
294
|
"Version ",
|
|
291
295
|
e.version,
|
|
292
296
|
n ? " (current)" : ""
|
|
293
297
|
]
|
|
294
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ u("span", {
|
|
295
299
|
className: "flex gap-1",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ l(b, {
|
|
297
301
|
size: "sm",
|
|
298
302
|
variant: "ghost",
|
|
299
303
|
className: "h-7 text-xs",
|
|
300
|
-
"aria-expanded":
|
|
301
|
-
onClick: () => V
|
|
302
|
-
children:
|
|
303
|
-
}), !n && !
|
|
304
|
+
"aria-expanded": V === e.version,
|
|
305
|
+
onClick: () => fe(V === e.version ? null : e.version),
|
|
306
|
+
children: V === e.version ? "Hide" : "View"
|
|
307
|
+
}), !n && !j && /* @__PURE__ */ u(d, { children: [/* @__PURE__ */ l(y, {
|
|
304
308
|
asChild: !0,
|
|
305
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ l(b, {
|
|
306
310
|
size: "sm",
|
|
307
311
|
variant: "outline",
|
|
308
312
|
className: "h-7 text-xs",
|
|
@@ -310,18 +314,18 @@ function O() {
|
|
|
310
314
|
"data-testid": "doc-restore",
|
|
311
315
|
children: "Restore"
|
|
312
316
|
})
|
|
313
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ u(_, { children: [/* @__PURE__ */ u(v, { children: [
|
|
314
318
|
"Restore version ",
|
|
315
319
|
e.version,
|
|
316
320
|
"?"
|
|
317
|
-
] }), /* @__PURE__ */
|
|
321
|
+
] }), /* @__PURE__ */ u(h, { children: [
|
|
318
322
|
"Its title and text become version ",
|
|
319
323
|
Y.version + 1,
|
|
320
324
|
". Nothing is deleted: version ",
|
|
321
325
|
Y.version,
|
|
322
326
|
" stays in the history."
|
|
323
|
-
] })] }), /* @__PURE__ */
|
|
324
|
-
onClick: () => Z(() =>
|
|
327
|
+
] })] }), /* @__PURE__ */ u(g, { children: [/* @__PURE__ */ l(p, { children: "Cancel" }), /* @__PURE__ */ l(f, {
|
|
328
|
+
onClick: () => Z(() => ge({ variables: {
|
|
325
329
|
id: Y.id,
|
|
326
330
|
toVersion: e.version,
|
|
327
331
|
expectedVersion: Y.version
|
|
@@ -329,21 +333,21 @@ function O() {
|
|
|
329
333
|
children: "Restore"
|
|
330
334
|
})] })] })] })]
|
|
331
335
|
})]
|
|
332
|
-
}), /* @__PURE__ */
|
|
336
|
+
}), /* @__PURE__ */ u("p", {
|
|
333
337
|
className: "text-xs text-muted-foreground",
|
|
334
338
|
children: [
|
|
335
|
-
|
|
339
|
+
O(e.createdAt),
|
|
336
340
|
" · ",
|
|
337
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ l(t, { id: e.createdBy }),
|
|
338
342
|
e.changeNote ? ` · ${e.changeNote}` : ""
|
|
339
343
|
]
|
|
340
344
|
})]
|
|
341
345
|
}, e.id);
|
|
342
346
|
})
|
|
343
|
-
}), $ && /* @__PURE__ */
|
|
347
|
+
}), $ && /* @__PURE__ */ u("div", {
|
|
344
348
|
className: "space-y-1 rounded-md border bg-muted/40 p-3",
|
|
345
349
|
"data-testid": "doc-revision-view",
|
|
346
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ u("p", {
|
|
347
351
|
className: "text-sm font-medium",
|
|
348
352
|
children: [
|
|
349
353
|
"Version ",
|
|
@@ -351,51 +355,51 @@ function O() {
|
|
|
351
355
|
": ",
|
|
352
356
|
$.title
|
|
353
357
|
]
|
|
354
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ l("div", {
|
|
355
359
|
className: "prose prose-sm max-w-none dark:prose-invert",
|
|
356
|
-
children: /* @__PURE__ */
|
|
360
|
+
children: /* @__PURE__ */ l(E, { children: $.content })
|
|
357
361
|
})]
|
|
358
362
|
})]
|
|
359
363
|
})]
|
|
360
|
-
}), /* @__PURE__ */
|
|
364
|
+
}), /* @__PURE__ */ u(x, {
|
|
361
365
|
"data-testid": "doc-linked-items",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ l(C, { children: /* @__PURE__ */ u(w, {
|
|
363
367
|
className: "flex items-center gap-2",
|
|
364
368
|
children: [
|
|
365
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ l(a, { className: "h-4 w-4" }),
|
|
366
370
|
" Linked work items (",
|
|
367
371
|
Y.linkedWorkItems.length,
|
|
368
372
|
")"
|
|
369
373
|
]
|
|
370
|
-
}) }), /* @__PURE__ */
|
|
374
|
+
}) }), /* @__PURE__ */ u(S, {
|
|
371
375
|
className: "space-y-2",
|
|
372
|
-
children: [Y.linkedWorkItems.length === 0 && /* @__PURE__ */
|
|
376
|
+
children: [Y.linkedWorkItems.length === 0 && /* @__PURE__ */ l("p", {
|
|
373
377
|
className: "text-sm text-muted-foreground",
|
|
374
378
|
children: "Not linked to any work item. Link docs from a task's “Linked Docs” panel."
|
|
375
|
-
}), Y.linkedWorkItems.map((e) => /* @__PURE__ */
|
|
379
|
+
}), Y.linkedWorkItems.map((e) => /* @__PURE__ */ u("div", {
|
|
376
380
|
className: "flex items-center justify-between gap-2 rounded-md border p-2",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ u("button", {
|
|
378
382
|
type: "button",
|
|
379
383
|
className: "min-w-0 truncate text-left text-sm hover:underline",
|
|
380
|
-
onClick: () =>
|
|
384
|
+
onClick: () => A(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
381
385
|
children: [
|
|
382
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ l("span", {
|
|
383
387
|
className: "text-muted-foreground",
|
|
384
388
|
children: e.key
|
|
385
389
|
}),
|
|
386
390
|
" ",
|
|
387
391
|
e.title
|
|
388
392
|
]
|
|
389
|
-
}), /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ l(b, {
|
|
390
394
|
size: "icon",
|
|
391
395
|
variant: "ghost",
|
|
392
|
-
disabled:
|
|
396
|
+
disabled: J.loading,
|
|
393
397
|
"aria-label": `Unlink ${e.title}`,
|
|
394
|
-
onClick: () => Z(() =>
|
|
398
|
+
onClick: () => Z(() => be({ variables: {
|
|
395
399
|
docId: Y.id,
|
|
396
400
|
workItemId: e.id
|
|
397
401
|
} }), "The work item could not be unlinked."),
|
|
398
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ l(ie, { className: "h-4 w-4" })
|
|
399
403
|
})]
|
|
400
404
|
}, e.id))]
|
|
401
405
|
})]
|
|
@@ -405,6 +409,6 @@ function O() {
|
|
|
405
409
|
});
|
|
406
410
|
}
|
|
407
411
|
//#endregion
|
|
408
|
-
export {
|
|
412
|
+
export { k as DocsDocDetailPagePage };
|
|
409
413
|
|
|
410
414
|
//# sourceMappingURL=DocsDocDetailPagePage.js.map
|