@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.
@@ -1 +1 @@
1
- {"version":3,"file":"DocsDocDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/DocsDocDetailPagePage.tsx"],"names":[],"mappings":"AA2HA,wBAAgB,qBAAqB,4CA4YpC"}
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 re, History as ie, Link2 as ae, X as oe } from "lucide-react";
8
- import { useSearchParams as se } from "react-router";
9
- import { gql as i } from "@apollo/client";
10
- import { useMutation as a, useQuery as ce } from "@apollo/client/react";
11
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
12
- import { AlertDialog as c, AlertDialogAction as l, AlertDialogCancel as u, AlertDialogContent as d, AlertDialogDescription as f, AlertDialogFooter as p, AlertDialogHeader as m, AlertDialogTitle as h, AlertDialogTrigger as g, Button as _, Card as v, CardContent as y, CardHeader as b, CardTitle as x, Input as S } from "@burdenoff/fe-libs/ui";
13
- import { Markdown as C } from "@burdenoff/fe-libs/shared/components";
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 le = i`
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
- `, ue = i`
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
- `, w = i`
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
- `, T = i`
58
+ `, le = s`
59
59
  mutation DocDelete($id: ID!) {
60
60
  planmagnetDeleteDoc(id: $id)
61
61
  }
62
- `, E = i`
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, D = (e) => new Date(e).toLocaleString();
67
- function O() {
68
- let [i] = se(), O = i.get("docId") ?? "", k = e(), [A, j] = r(!1), [M, N] = r(""), [P, F] = r(""), [I, L] = r(""), [R, z] = r(null), [B, V] = r(null), [H, fe] = r(null), { data: U, loading: pe, error: W, refetch: me } = ce(le, {
69
- variables: { id: O },
70
- skip: !O,
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] = a(ue, G), [he, ge] = a(w, G), [_e, ve] = a(T, { refetchQueries: ["DocsList"] }), [J, ye] = a(E, G), Y = U?.planmagnetDoc, X = q.loading || ge.loading || ve.loading, Z = async (e, t) => {
76
- z(null);
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 z(de(e, t)), await me(), !1;
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 (!O) return /* @__PURE__ */ o("div", {
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 (pe && !U) return /* @__PURE__ */ o("div", {
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__ */ s("p", {
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__ */ s("div", {
100
+ if (!Y) return /* @__PURE__ */ u("div", {
97
101
  className: "space-y-3 p-6",
98
- children: [/* @__PURE__ */ o("p", {
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__ */ o(_, {
105
+ }), /* @__PURE__ */ l(b, {
102
106
  size: "sm",
103
107
  variant: "outline",
104
- onClick: () => k("/docs/docs-page"),
108
+ onClick: () => A("/docs/docs-page"),
105
109
  children: "Back to docs"
106
110
  })]
107
111
  });
108
- let be = () => {
109
- N(Y.title), F(Y.content), L(""), z(null), fe(Y.version), j(!0);
110
- }, xe = async () => {
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: M.trim(),
115
- content: P,
116
- ...I.trim() ? { changeNote: I.trim() } : {},
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.") && j(!1);
120
- }, Q = [...Y.revisions].sort((e, t) => t.version - e.version), $ = B === null ? null : Q.find((e) => e.version === B);
121
- return /* @__PURE__ */ s("div", {
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__ */ s(_, {
129
+ /* @__PURE__ */ u(b, {
126
130
  size: "sm",
127
131
  variant: "ghost",
128
- onClick: () => k("/docs/docs-page"),
129
- children: [/* @__PURE__ */ o(re, { className: "mr-1 h-4 w-4" }), "All docs"]
132
+ onClick: () => A("/docs/docs-page"),
133
+ children: [/* @__PURE__ */ l(i, { className: "mr-1 h-4 w-4" }), "All docs"]
130
134
  }),
131
- /* @__PURE__ */ s("div", {
135
+ /* @__PURE__ */ u("div", {
132
136
  className: "flex flex-wrap items-start justify-between gap-3",
133
- children: [/* @__PURE__ */ s("div", {
137
+ children: [/* @__PURE__ */ u("div", {
134
138
  className: "min-w-0 space-y-1",
135
- children: [/* @__PURE__ */ o("h1", {
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__ */ s("p", {
143
+ }), /* @__PURE__ */ u("p", {
140
144
  className: "text-xs text-muted-foreground",
141
145
  children: [
142
- /* @__PURE__ */ o(ne, { status: Y.status }),
146
+ /* @__PURE__ */ l(ne, { status: Y.status }),
143
147
  " · version ",
144
148
  Y.version,
145
149
  " · updated",
146
150
  " ",
147
- D(Y.updatedAt),
151
+ O(Y.updatedAt),
148
152
  " by ",
149
- /* @__PURE__ */ o(t, { id: Y.updatedBy ?? Y.createdBy })
153
+ /* @__PURE__ */ l(t, { id: Y.updatedBy ?? Y.createdBy })
150
154
  ]
151
155
  })]
152
- }), !A && /* @__PURE__ */ s("div", {
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__ */ o(_, {
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__ */ o(_, {
172
+ /* @__PURE__ */ l(b, {
169
173
  size: "sm",
170
- onClick: be,
174
+ onClick: xe,
171
175
  "data-testid": "doc-edit",
172
176
  children: "Edit"
173
177
  }),
174
- /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o(g, {
178
+ /* @__PURE__ */ u(d, { children: [/* @__PURE__ */ l(y, {
175
179
  asChild: !0,
176
- children: /* @__PURE__ */ o(_, {
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__ */ s(d, { children: [/* @__PURE__ */ s(m, { children: [/* @__PURE__ */ s(h, { children: [
186
+ }), /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ u(_, { children: [/* @__PURE__ */ u(v, { children: [
183
187
  "Delete “",
184
188
  Y.title,
185
189
  "”?"
186
- ] }), /* @__PURE__ */ s(f, { children: [
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__ */ s(p, { children: [/* @__PURE__ */ o(u, { children: "Keep it" }), /* @__PURE__ */ o(l, {
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(() => _e({ variables: { id: Y.id } }), "The doc could not be deleted.") && k("/docs/docs-page");
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
- R && /* @__PURE__ */ o("p", {
207
+ z && /* @__PURE__ */ l("p", {
204
208
  role: "alert",
205
209
  className: "text-sm text-destructive",
206
210
  "data-testid": "doc-error",
207
- children: R
211
+ children: z
208
212
  }),
209
- A && H !== Y.version && /* @__PURE__ */ s("p", {
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
- A ? /* @__PURE__ */ o(v, { children: /* @__PURE__ */ s(y, {
224
+ j ? /* @__PURE__ */ l(x, { children: /* @__PURE__ */ u(S, {
221
225
  className: "space-y-3 pt-6",
222
226
  children: [
223
- /* @__PURE__ */ o(S, {
227
+ /* @__PURE__ */ l(T, {
224
228
  "aria-label": "Doc title",
225
- value: M,
226
- onChange: (e) => N(e.target.value)
229
+ value: N,
230
+ onChange: (e) => P(e.target.value)
227
231
  }),
228
- /* @__PURE__ */ o(n, {
229
- value: P,
230
- onChange: F,
232
+ /* @__PURE__ */ l(n, {
233
+ value: F,
234
+ onChange: I,
231
235
  minHeight: 240
232
236
  }),
233
- /* @__PURE__ */ o(S, {
237
+ /* @__PURE__ */ l(T, {
234
238
  "aria-label": "Change note",
235
239
  placeholder: "What changed? (optional, shown in the history)",
236
- value: I,
237
- onChange: (e) => L(e.target.value)
240
+ value: L,
241
+ onChange: (e) => R(e.target.value)
238
242
  }),
239
- /* @__PURE__ */ s("div", {
243
+ /* @__PURE__ */ u("div", {
240
244
  className: "flex justify-end gap-2",
241
- children: [/* @__PURE__ */ o(_, {
245
+ children: [/* @__PURE__ */ l(b, {
242
246
  size: "sm",
243
247
  variant: "ghost",
244
248
  onClick: () => {
245
- j(!1), z(null);
249
+ M(!1), B(null);
246
250
  },
247
251
  children: H === Y.version ? "Cancel" : "Discard my edits"
248
- }), /* @__PURE__ */ o(_, {
252
+ }), /* @__PURE__ */ l(b, {
249
253
  size: "sm",
250
- onClick: xe,
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__ */ o(v, { children: /* @__PURE__ */ o(y, {
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__ */ o(C, { children: Y.content }) : /* @__PURE__ */ o("p", {
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__ */ s("div", {
268
+ /* @__PURE__ */ u("div", {
265
269
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
266
- children: [/* @__PURE__ */ s(v, {
270
+ children: [/* @__PURE__ */ u(x, {
267
271
  "data-testid": "doc-history",
268
- children: [/* @__PURE__ */ o(b, { children: /* @__PURE__ */ s(x, {
272
+ children: [/* @__PURE__ */ l(C, { children: /* @__PURE__ */ u(w, {
269
273
  className: "flex items-center gap-2",
270
274
  children: [
271
- /* @__PURE__ */ o(ie, { className: "h-4 w-4" }),
275
+ /* @__PURE__ */ l(re, { className: "h-4 w-4" }),
272
276
  " History (",
273
277
  Q.length,
274
278
  ")"
275
279
  ]
276
- }) }), /* @__PURE__ */ s(y, {
280
+ }) }), /* @__PURE__ */ u(S, {
277
281
  className: "space-y-2",
278
- children: [/* @__PURE__ */ o("ol", {
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__ */ s("li", {
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__ */ s("div", {
289
+ children: [/* @__PURE__ */ u("div", {
286
290
  className: "flex flex-wrap items-center justify-between gap-2",
287
- children: [/* @__PURE__ */ s("span", {
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__ */ s("span", {
298
+ }), /* @__PURE__ */ u("span", {
295
299
  className: "flex gap-1",
296
- children: [/* @__PURE__ */ o(_, {
300
+ children: [/* @__PURE__ */ l(b, {
297
301
  size: "sm",
298
302
  variant: "ghost",
299
303
  className: "h-7 text-xs",
300
- "aria-expanded": B === e.version,
301
- onClick: () => V(B === e.version ? null : e.version),
302
- children: B === e.version ? "Hide" : "View"
303
- }), !n && !A && /* @__PURE__ */ s(c, { children: [/* @__PURE__ */ o(g, {
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__ */ o(_, {
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__ */ s(d, { children: [/* @__PURE__ */ s(m, { children: [/* @__PURE__ */ s(h, { children: [
317
+ }), /* @__PURE__ */ u(m, { children: [/* @__PURE__ */ u(_, { children: [/* @__PURE__ */ u(v, { children: [
314
318
  "Restore version ",
315
319
  e.version,
316
320
  "?"
317
- ] }), /* @__PURE__ */ s(f, { children: [
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__ */ s(p, { children: [/* @__PURE__ */ o(u, { children: "Cancel" }), /* @__PURE__ */ o(l, {
324
- onClick: () => Z(() => he({ variables: {
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__ */ s("p", {
336
+ }), /* @__PURE__ */ u("p", {
333
337
  className: "text-xs text-muted-foreground",
334
338
  children: [
335
- D(e.createdAt),
339
+ O(e.createdAt),
336
340
  " · ",
337
- /* @__PURE__ */ o(t, { id: e.createdBy }),
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__ */ s("div", {
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__ */ s("p", {
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__ */ o("div", {
358
+ }), /* @__PURE__ */ l("div", {
355
359
  className: "prose prose-sm max-w-none dark:prose-invert",
356
- children: /* @__PURE__ */ o(C, { children: $.content })
360
+ children: /* @__PURE__ */ l(E, { children: $.content })
357
361
  })]
358
362
  })]
359
363
  })]
360
- }), /* @__PURE__ */ s(v, {
364
+ }), /* @__PURE__ */ u(x, {
361
365
  "data-testid": "doc-linked-items",
362
- children: [/* @__PURE__ */ o(b, { children: /* @__PURE__ */ s(x, {
366
+ children: [/* @__PURE__ */ l(C, { children: /* @__PURE__ */ u(w, {
363
367
  className: "flex items-center gap-2",
364
368
  children: [
365
- /* @__PURE__ */ o(ae, { className: "h-4 w-4" }),
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__ */ s(y, {
374
+ }) }), /* @__PURE__ */ u(S, {
371
375
  className: "space-y-2",
372
- children: [Y.linkedWorkItems.length === 0 && /* @__PURE__ */ o("p", {
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__ */ s("div", {
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__ */ s("button", {
381
+ children: [/* @__PURE__ */ u("button", {
378
382
  type: "button",
379
383
  className: "min-w-0 truncate text-left text-sm hover:underline",
380
- onClick: () => k(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
384
+ onClick: () => A(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
381
385
  children: [
382
- /* @__PURE__ */ o("span", {
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__ */ o(_, {
393
+ }), /* @__PURE__ */ l(b, {
390
394
  size: "icon",
391
395
  variant: "ghost",
392
- disabled: ye.loading,
396
+ disabled: J.loading,
393
397
  "aria-label": `Unlink ${e.title}`,
394
- onClick: () => Z(() => J({ variables: {
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__ */ o(oe, { className: "h-4 w-4" })
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 { O as DocsDocDetailPagePage };
412
+ export { k as DocsDocDetailPagePage };
409
413
 
410
414
  //# sourceMappingURL=DocsDocDetailPagePage.js.map