@parallelworks/tandem-web 0.138.0 → 0.139.0
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/components/AgentWork.js +35 -35
- package/components/AppRoot.js +4 -4
- package/components/AreaWork.js +1 -1
- package/components/BlockHandle.js +3 -3
- package/components/CommandPalette.js +27 -27
- package/components/DateChip.js +27 -27
- package/components/DocLinkPicker.js +17 -17
- package/components/Graph.js +6 -6
- package/components/HoverCards.js +30 -29
- package/components/IssueListBlock.js +83 -83
- package/components/LinkCard.js +20 -20
- package/components/MentionPicker.js +12 -12
- package/components/NewIssueDialog.js +116 -116
- package/components/NewProjectDialog.js +5 -4
- package/components/Planning.js +31 -43
- package/components/RouterLink.js +4 -4
- package/components/ShareDialog.js +12 -12
- package/components/SharedUI.js +19 -19
- package/components/SlashMenu.js +11 -11
- package/components/SubPages.js +10 -10
- package/components/UnlinkedMentions.js +10 -10
- package/components/WorkCounts.js +8 -8
- package/components/settings.js +26 -26
- package/hostedApp.js +36 -36
- package/hosting.d.ts +24 -11
- package/index.js +58 -27
- package/lib/base.js +1 -14
- package/lib/docs.js +6 -6
- package/lib/issueMenu.js +33 -33
- package/lib/knowledge.js +90 -101
- package/lib/knowledgeKinds.js +14 -0
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +15 -0
- package/lib/router.js +20 -34
- package/package.json +6 -6
- package/pages/areas.js +147 -147
- package/pages/decisions.js +40 -40
- package/pages/issues.js +4 -4
- package/pages/projects.js +232 -231
- package/pages/triage.js +86 -86
- package/pages.js +21 -0
- package/routes/__root.js +6 -6
- package/routes/_workspace/docs/_doc2.js +12 -12
- package/routes/_workspace/docs2.js +8 -8
- package/routes/_workspace/graph2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +327 -327
- package/routes/_workspace/issues/index.js +6 -6
- package/routes/_workspace/knowledge/_term2.js +125 -124
- package/routes/_workspace/knowledge/index.js +8 -8
- package/routes/_workspace/knowledge/index2.js +22 -21
- package/routes/_workspace/measures2.js +4 -4
- package/routes/_workspace/people/_username.js +4 -4
- package/routes/_workspace/projects/_projectId3.js +264 -263
- package/routes/_workspace/projects/index.js +7 -7
- package/routes/_workspace/settings/account2.js +3 -3
- package/routes/_workspace/settings/audit-log2.js +4 -4
- package/routes/_workspace/settings/audit-log3.js +51 -51
- package/routes/_workspace/settings/labels2.js +14 -14
- package/routes/_workspace/settings/members2.js +9 -9
- package/routes/_workspace/settings/runners2.js +11 -11
- package/routes/_workspace/settings/teams2.js +15 -15
- package/routes/_workspace/settings/tokens2.js +5 -5
- package/routes/_workspace/settings/webhooks2.js +7 -7
- package/routes/_workspace/settings2.js +3 -3
- package/routes/_workspace/teams/_key/cycles/_number2.js +8 -8
- package/routes/_workspace/teams/_key/cycles/index2.js +20 -20
- package/routes/_workspace/teams/_key/issues.js +4 -4
- package/routes/_workspace/teams/_key/projects.js +4 -4
- package/routes/_workspace/teams/_key/settings2.js +8 -8
- package/routes/_workspace2.js +319 -319
- package/routes/docs/route2.js +15 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { rememberSearch as e } from "../../../lib/listSearch.js";
|
|
2
|
+
import { redirect as t } from "../../../lib/router.js";
|
|
3
3
|
import { teamsQuery as n } from "../../../api/queries.js";
|
|
4
4
|
import { issueSearch as r } from "../../../lib/issueList.js";
|
|
5
5
|
import { lastTeam as i } from "../../../lib/teamPaths.js";
|
|
@@ -13,8 +13,8 @@ var c = a("/$workspace/issues/")({
|
|
|
13
13
|
l = (e.find((e) => e.key === t) ?? e[0])?.key;
|
|
14
14
|
}
|
|
15
15
|
if (l) {
|
|
16
|
-
let { team:
|
|
17
|
-
throw
|
|
16
|
+
let { team: e, ...n } = o;
|
|
17
|
+
throw t({
|
|
18
18
|
to: "/$workspace/teams/$key/issues",
|
|
19
19
|
params: {
|
|
20
20
|
...a,
|
|
@@ -24,8 +24,8 @@ var c = a("/$workspace/issues/")({
|
|
|
24
24
|
replace: !0
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
let u =
|
|
28
|
-
if (u) throw
|
|
27
|
+
let u = e(s.pathname, o, c);
|
|
28
|
+
if (u) throw t({
|
|
29
29
|
to: "/$workspace/issues",
|
|
30
30
|
params: a,
|
|
31
31
|
search: u,
|
|
@@ -1,248 +1,249 @@
|
|
|
1
1
|
import { Link as e, useNavigate as t } from "../../../lib/router.js";
|
|
2
2
|
import { areasQuery as n, knowledgeEntryQuery as r, knowledgeEventsQuery as i, knowledgeMentionsQuery as a, knowledgeQuery as o } from "../../../api/queries.js";
|
|
3
3
|
import { FileTextIcon as s, LibraryIcon as c, StatusIcon as l } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { usePeople as
|
|
10
|
-
import { usePageTitle as
|
|
11
|
-
import { useCan as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
4
|
+
import { termRef as u } from "../../../lib/knowledgeKinds.js";
|
|
5
|
+
import { Route as d } from "./_term.js";
|
|
6
|
+
import { docRef as f } from "../../../lib/docs.js";
|
|
7
|
+
import { headingAnchor as p } from "../../../lib/glossary.js";
|
|
8
|
+
import { useTime as m } from "../../../lib/time.js";
|
|
9
|
+
import { usePeople as h } from "../../../lib/people.js";
|
|
10
|
+
import { usePageTitle as ee } from "../../../lib/pageTitle.js";
|
|
11
|
+
import { useCan as te } from "../../../lib/roles.js";
|
|
12
|
+
import { EntryDialog as g, useKnowledgeActions as _, useKnowledgeMenu as v } from "../../../lib/knowledge.js";
|
|
13
|
+
import { uploadKnowledgeAttachment as y } from "../../../lib/attachments.js";
|
|
14
|
+
import { KnowledgeStatus as b } from "../../../components/HoverCards.js";
|
|
15
|
+
import { AttachButton as x, UploadStatus as S, useFileUpload as C } from "../../../components/Attachments.js";
|
|
16
|
+
import { Editor as ne } from "../../../components/Editor.js";
|
|
17
|
+
import { Timeline as w, TimelineItem as T, activityIcon as E } from "../../../components/ActivityTimeline.js";
|
|
18
|
+
import { Button as D, ErrorText as O, PageHeader as k, Section as A, TitleInput as j, useOpenMenu as M } from "@parallelworks/ui";
|
|
19
|
+
import { Suspense as N, useCallback as P, useMemo as F, useRef as I, useState as L } from "react";
|
|
20
|
+
import { useErrorMessage as R } from "@parallelworks/problem/react";
|
|
21
|
+
import { useTranslations as z } from "use-intl";
|
|
22
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
23
|
+
import { useQuery as U, useSuspenseQuery as W } from "@tanstack/react-query";
|
|
24
|
+
import { MoreButton as G } from "@parallelworks/ui/list";
|
|
24
25
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
|
|
25
|
-
function
|
|
26
|
-
let { workspace: n, term: i } =
|
|
27
|
-
|
|
28
|
-
let Q =
|
|
29
|
-
id:
|
|
26
|
+
function K() {
|
|
27
|
+
let { workspace: n, term: i } = d.useParams(), a = z("knowledge"), s = z("common"), l = t(), f = M(), p = R(), { data: m } = W(r(n, i)), { data: h } = W(o(n)), b = _(n), w = te(n, "edit_docs"), T = w && !m.archivedAt, [E, A] = L(null), U = P((e) => A(e), []), K = v(n, U), X = I(null), Z = C((e) => y(n, m.id, e));
|
|
28
|
+
ee(m.name);
|
|
29
|
+
let Q = F(() => h.filter((e) => e.supersededBy === m.id), [h, m.id]), $ = (e) => b.update.mutate({
|
|
30
|
+
id: m.id,
|
|
30
31
|
...e,
|
|
31
|
-
ifVersion:
|
|
32
|
-
}), re =
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
ifVersion: m.version
|
|
33
|
+
}), re = m.status === "superseded";
|
|
34
|
+
return /* @__PURE__ */ H("div", {
|
|
34
35
|
className: "flex h-full min-h-0 flex-col",
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ V(k, {
|
|
37
38
|
heading: !1,
|
|
38
39
|
breadcrumbs: [{
|
|
39
40
|
label: a("title"),
|
|
40
41
|
href: `/${n}/knowledge`
|
|
41
42
|
}, {
|
|
42
|
-
label:
|
|
43
|
-
icon: /* @__PURE__ */
|
|
43
|
+
label: m.name,
|
|
44
|
+
icon: /* @__PURE__ */ V(c, { className: "size-4 text-muted-foreground" })
|
|
44
45
|
}],
|
|
45
|
-
titleActions: /* @__PURE__ */
|
|
46
|
-
items: () =>
|
|
47
|
-
label: s("moreActionsFor", { name:
|
|
46
|
+
titleActions: /* @__PURE__ */ V(G, {
|
|
47
|
+
items: () => K(m),
|
|
48
|
+
label: s("moreActionsFor", { name: m.name }),
|
|
48
49
|
visible: !0
|
|
49
50
|
}),
|
|
50
|
-
actions: /* @__PURE__ */
|
|
51
|
+
actions: /* @__PURE__ */ H(B, { children: [b.update.isPending && /* @__PURE__ */ V("span", {
|
|
51
52
|
className: "text-xs text-muted-foreground",
|
|
52
53
|
role: "status",
|
|
53
54
|
children: s("saving")
|
|
54
|
-
}),
|
|
55
|
+
}), T && /* @__PURE__ */ V(D, {
|
|
55
56
|
type: "button",
|
|
56
57
|
size: "sm",
|
|
57
|
-
onClick: () =>
|
|
58
|
+
onClick: () => U({
|
|
58
59
|
kind: "edit",
|
|
59
|
-
entry:
|
|
60
|
+
entry: m
|
|
60
61
|
}),
|
|
61
62
|
children: a("editDetails")
|
|
62
63
|
})] })
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ V("div", {
|
|
65
66
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ H("article", {
|
|
67
68
|
className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
|
|
68
69
|
onContextMenu: (e) => {
|
|
69
|
-
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") ||
|
|
70
|
+
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || f(e, K(m));
|
|
70
71
|
},
|
|
71
72
|
children: [
|
|
72
|
-
|
|
73
|
+
m.archivedAt && /* @__PURE__ */ H("div", {
|
|
73
74
|
className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ V("span", {
|
|
75
76
|
className: "min-w-0 flex-1",
|
|
76
77
|
children: a("archivedNotice")
|
|
77
|
-
}),
|
|
78
|
+
}), w && /* @__PURE__ */ V(D, {
|
|
78
79
|
type: "button",
|
|
79
80
|
size: "sm",
|
|
80
|
-
onClick: () =>
|
|
81
|
+
onClick: () => b.restore.mutate(m.id),
|
|
81
82
|
children: a("restore")
|
|
82
83
|
})]
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ V(q, {
|
|
85
86
|
workspace: n,
|
|
86
|
-
entry:
|
|
87
|
+
entry: m
|
|
87
88
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ V("h1", {
|
|
89
90
|
className: "sr-only",
|
|
90
|
-
children:
|
|
91
|
+
children: m.name
|
|
91
92
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
value:
|
|
93
|
+
/* @__PURE__ */ V(j, {
|
|
94
|
+
value: m.name,
|
|
94
95
|
onCommit: (e) => $({ name: e }),
|
|
95
|
-
readOnly: !
|
|
96
|
+
readOnly: !T,
|
|
96
97
|
"aria-label": a("name"),
|
|
97
98
|
maxLength: 100,
|
|
98
99
|
className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
|
|
99
100
|
}),
|
|
100
|
-
|
|
101
|
+
m.aliases.length > 0 && /* @__PURE__ */ V("p", {
|
|
101
102
|
className: "mt-1 text-sm text-muted-foreground",
|
|
102
|
-
children: a("alsoCalled", { names:
|
|
103
|
+
children: a("alsoCalled", { names: m.aliases.join(", ") })
|
|
103
104
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
value:
|
|
105
|
+
/* @__PURE__ */ V(j, {
|
|
106
|
+
value: m.definition,
|
|
106
107
|
onCommit: (e) => $({ definition: e }),
|
|
107
|
-
readOnly: !
|
|
108
|
+
readOnly: !T,
|
|
108
109
|
"aria-label": a("definition"),
|
|
109
110
|
placeholder: a("definitionPlaceholder"),
|
|
110
111
|
maxLength: 1e3,
|
|
111
112
|
size: "lg",
|
|
112
113
|
className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
|
|
113
114
|
}),
|
|
114
|
-
(
|
|
115
|
+
(m.supersededBy || Q.length > 0) && /* @__PURE__ */ H("div", {
|
|
115
116
|
className: "mt-3 space-y-1 text-sm",
|
|
116
|
-
children: [
|
|
117
|
+
children: [m.supersededBy && /* @__PURE__ */ V(e, {
|
|
117
118
|
to: "/$workspace/knowledge/$term",
|
|
118
119
|
params: {
|
|
119
120
|
workspace: n,
|
|
120
|
-
term:
|
|
121
|
+
term: u(h.find((e) => e.id === m.supersededBy) ?? { id: m.supersededBy })
|
|
121
122
|
},
|
|
122
123
|
className: "block text-primary hover:underline",
|
|
123
|
-
children: a("supersededBy", { name:
|
|
124
|
-
}), Q.map((t) => /* @__PURE__ */
|
|
124
|
+
children: a("supersededBy", { name: m.supersededByName ?? "" })
|
|
125
|
+
}), Q.map((t) => /* @__PURE__ */ V(e, {
|
|
125
126
|
to: "/$workspace/knowledge/$term",
|
|
126
127
|
params: {
|
|
127
128
|
workspace: n,
|
|
128
|
-
term:
|
|
129
|
+
term: u(t)
|
|
129
130
|
},
|
|
130
131
|
className: "block text-muted-foreground hover:text-foreground",
|
|
131
132
|
children: a("replaces", { name: t.name })
|
|
132
133
|
}, t.id))]
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ H("section", {
|
|
135
136
|
"aria-label": a("page"),
|
|
136
137
|
className: "mt-8 border-t border-border pt-6",
|
|
137
138
|
children: [
|
|
138
|
-
|
|
139
|
-
value:
|
|
140
|
-
editable:
|
|
139
|
+
T || m.body ? /* @__PURE__ */ V(ne, {
|
|
140
|
+
value: m.body ?? "",
|
|
141
|
+
editable: T,
|
|
141
142
|
placeholder: a("pagePlaceholder"),
|
|
142
143
|
label: a("page"),
|
|
143
|
-
onBlur: (e) => e !== (
|
|
144
|
+
onBlur: (e) => e !== (m.body ?? "") && $({ body: e }),
|
|
144
145
|
onFiles: (e, t) => Z.upload(X.current, e, t),
|
|
145
146
|
onEditor: (e) => {
|
|
146
147
|
X.current = e;
|
|
147
148
|
},
|
|
148
149
|
className: "min-h-32 [&>:first-child]:mt-0"
|
|
149
|
-
}) : /* @__PURE__ */
|
|
150
|
+
}) : /* @__PURE__ */ V("p", {
|
|
150
151
|
className: "text-sm text-muted-foreground",
|
|
151
152
|
children: a("noPage")
|
|
152
153
|
}),
|
|
153
|
-
|
|
154
|
+
T && /* @__PURE__ */ H("div", {
|
|
154
155
|
className: "mt-3 flex items-center gap-2",
|
|
155
156
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ V(x, { onFiles: (e) => Z.upload(X.current, e) }),
|
|
158
|
+
/* @__PURE__ */ V("span", {
|
|
158
159
|
className: "text-xs text-muted-foreground",
|
|
159
160
|
children: a("attachHint")
|
|
160
161
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ V("span", {
|
|
162
163
|
className: "ml-auto",
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ V(S, {
|
|
164
165
|
pending: Z.pending,
|
|
165
166
|
error: Z.error
|
|
166
167
|
})
|
|
167
168
|
})
|
|
168
169
|
]
|
|
169
170
|
}),
|
|
170
|
-
|
|
171
|
+
b.update.isError && /* @__PURE__ */ V(O, {
|
|
171
172
|
className: "mt-2",
|
|
172
|
-
children:
|
|
173
|
+
children: p(b.update.error)
|
|
173
174
|
})
|
|
174
175
|
]
|
|
175
176
|
}),
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(J, {
|
|
177
178
|
workspace: n,
|
|
178
|
-
entryId:
|
|
179
|
+
entryId: m.id
|
|
179
180
|
}) }),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(Y, {
|
|
181
182
|
workspace: n,
|
|
182
|
-
entryId:
|
|
183
|
+
entryId: m.id
|
|
183
184
|
}) })
|
|
184
185
|
]
|
|
185
186
|
})
|
|
186
187
|
}),
|
|
187
|
-
|
|
188
|
+
E && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(g, {
|
|
188
189
|
workspace: n,
|
|
189
|
-
mode:
|
|
190
|
-
onClose: () =>
|
|
190
|
+
mode: E,
|
|
191
|
+
onClose: () => A(null),
|
|
191
192
|
onSaved: (e) => l({
|
|
192
193
|
to: "/$workspace/knowledge/$term",
|
|
193
194
|
params: {
|
|
194
195
|
workspace: n,
|
|
195
|
-
term:
|
|
196
|
+
term: u(e)
|
|
196
197
|
},
|
|
197
|
-
replace: e.id ===
|
|
198
|
+
replace: e.id === m.id
|
|
198
199
|
})
|
|
199
200
|
}) })
|
|
200
201
|
]
|
|
201
202
|
});
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
-
let i =
|
|
204
|
+
function q({ workspace: t, entry: r }) {
|
|
205
|
+
let i = z("knowledge"), { actorName: a } = h(t), o = m(), { data: c = [] } = U(n(t)), l = c.find((e) => e.id === r.areaId), u = r.source.doc, d = [
|
|
205
206
|
...r.kind === "term" ? [] : [i(`kind.${r.kind}`)],
|
|
206
207
|
...l ? [l.title] : [],
|
|
207
208
|
i("writtenBy", { name: a(r.creator) }),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ V("time", {
|
|
209
210
|
dateTime: r.updatedAt,
|
|
210
211
|
title: o.full(r.updatedAt),
|
|
211
212
|
children: i("updated", { when: o.relative(r.updatedAt) })
|
|
212
213
|
}, "updated")
|
|
213
214
|
];
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ H("div", {
|
|
215
216
|
className: "space-y-1 text-xs text-muted-foreground",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ H("p", {
|
|
217
218
|
className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
|
|
218
|
-
children: [(r.kind !== "term" || r.status === "superseded") && /* @__PURE__ */
|
|
219
|
+
children: [(r.kind !== "term" || r.status === "superseded") && /* @__PURE__ */ V(b, { status: r.status }), d.map((e, t) => /* @__PURE__ */ H("span", {
|
|
219
220
|
className: "inline-flex items-center gap-1.5",
|
|
220
|
-
children: [t > 0 && /* @__PURE__ */
|
|
221
|
+
children: [t > 0 && /* @__PURE__ */ V("span", {
|
|
221
222
|
"aria-hidden": "true",
|
|
222
223
|
children: "·"
|
|
223
224
|
}), e]
|
|
224
225
|
}, t))]
|
|
225
|
-
}), (
|
|
226
|
+
}), (u || r.source.identifier) && /* @__PURE__ */ H("p", {
|
|
226
227
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
227
228
|
children: [
|
|
228
|
-
|
|
229
|
+
u && /* @__PURE__ */ H(e, {
|
|
229
230
|
to: "/$workspace/docs/$doc",
|
|
230
231
|
params: {
|
|
231
232
|
workspace: t,
|
|
232
|
-
doc:
|
|
233
|
+
doc: f(u)
|
|
233
234
|
},
|
|
234
|
-
...r.source.section && { hash:
|
|
235
|
+
...r.source.section && { hash: p(r.source.section) },
|
|
235
236
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
237
|
-
doc:
|
|
237
|
+
children: [/* @__PURE__ */ V(s, { className: "size-3" }), r.source.section ? i("sourceSection", {
|
|
238
|
+
doc: u.title,
|
|
238
239
|
section: r.source.section
|
|
239
|
-
}) :
|
|
240
|
+
}) : u.title]
|
|
240
241
|
}),
|
|
241
|
-
r.source.missing && /* @__PURE__ */
|
|
242
|
+
r.source.missing && /* @__PURE__ */ V("span", {
|
|
242
243
|
className: "text-warning",
|
|
243
244
|
children: i("sourceMissing", { section: r.source.section ?? "" })
|
|
244
245
|
}),
|
|
245
|
-
r.source.identifier && /* @__PURE__ */
|
|
246
|
+
r.source.identifier && /* @__PURE__ */ H(e, {
|
|
246
247
|
to: "/$workspace/issues/$identifier",
|
|
247
248
|
params: {
|
|
248
249
|
workspace: t,
|
|
@@ -259,25 +260,25 @@ function J({ workspace: t, entry: r }) {
|
|
|
259
260
|
})]
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
|
-
function
|
|
263
|
-
let r =
|
|
263
|
+
function J({ workspace: t, entryId: n }) {
|
|
264
|
+
let r = z("knowledge"), { data: i } = U(a(t, n));
|
|
264
265
|
if (!i) return null;
|
|
265
266
|
let o = i.issues.length + i.docs.length, c = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
|
|
266
|
-
return /* @__PURE__ */
|
|
267
|
+
return /* @__PURE__ */ H("section", {
|
|
267
268
|
"aria-label": r("mentionedIn"),
|
|
268
269
|
className: "mt-12",
|
|
269
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
270
271
|
className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
|
|
271
|
-
children: [r("mentionedIn"), o > 0 && /* @__PURE__ */
|
|
272
|
+
children: [r("mentionedIn"), o > 0 && /* @__PURE__ */ V("span", {
|
|
272
273
|
className: "text-xs font-normal text-muted-foreground tabular-nums",
|
|
273
274
|
children: o
|
|
274
275
|
})]
|
|
275
|
-
}), o === 0 ? /* @__PURE__ */
|
|
276
|
+
}), o === 0 ? /* @__PURE__ */ V("p", {
|
|
276
277
|
className: "text-sm text-muted-foreground",
|
|
277
278
|
children: r("mentionedNone")
|
|
278
|
-
}) : /* @__PURE__ */
|
|
279
|
+
}) : /* @__PURE__ */ H("ul", {
|
|
279
280
|
className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
280
|
-
children: [i.issues.map((n) => /* @__PURE__ */
|
|
281
|
+
children: [i.issues.map((n) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(e, {
|
|
281
282
|
to: "/$workspace/issues/$identifier",
|
|
282
283
|
params: {
|
|
283
284
|
workspace: t,
|
|
@@ -285,33 +286,33 @@ function Y({ workspace: t, entryId: n }) {
|
|
|
285
286
|
},
|
|
286
287
|
className: c,
|
|
287
288
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ V(l, {
|
|
289
290
|
category: n.statusCategory,
|
|
290
291
|
className: "size-3.5 shrink-0"
|
|
291
292
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ V("span", {
|
|
293
294
|
className: "w-16 shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
294
295
|
children: n.identifier
|
|
295
296
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ V("span", {
|
|
297
298
|
className: "min-w-0 truncate",
|
|
298
299
|
children: n.title
|
|
299
300
|
})
|
|
300
301
|
]
|
|
301
|
-
}) }, n.identifier)), i.docs.map((n) => /* @__PURE__ */
|
|
302
|
+
}) }, n.identifier)), i.docs.map((n) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(e, {
|
|
302
303
|
to: "/$workspace/docs/$doc",
|
|
303
304
|
params: {
|
|
304
305
|
workspace: t,
|
|
305
|
-
doc:
|
|
306
|
+
doc: f(n)
|
|
306
307
|
},
|
|
307
308
|
className: c,
|
|
308
309
|
children: [
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ V(s, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
311
|
+
/* @__PURE__ */ V("span", {
|
|
311
312
|
className: "w-16 shrink-0 text-xs text-muted-foreground",
|
|
312
313
|
children: r("doc")
|
|
313
314
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ V("span", {
|
|
315
316
|
className: "min-w-0 truncate",
|
|
316
317
|
children: n.title
|
|
317
318
|
})
|
|
@@ -320,17 +321,17 @@ function Y({ workspace: t, entryId: n }) {
|
|
|
320
321
|
})]
|
|
321
322
|
});
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
-
let n =
|
|
325
|
-
return r.length === 0 ? null : /* @__PURE__ */
|
|
324
|
+
function Y({ workspace: e, entryId: t }) {
|
|
325
|
+
let n = z("knowledge.history"), { data: r = [] } = U(i(e, t)), { actorName: a } = h(e);
|
|
326
|
+
return r.length === 0 ? null : /* @__PURE__ */ V(A, {
|
|
326
327
|
title: n("title"),
|
|
327
328
|
variant: "bare",
|
|
328
329
|
defaultOpen: !1,
|
|
329
330
|
headingLevel: 2,
|
|
330
331
|
className: "mt-10",
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
+
children: /* @__PURE__ */ V(w, { children: r.map((t) => /* @__PURE__ */ V(T, {
|
|
332
333
|
workspace: e,
|
|
333
|
-
icon:
|
|
334
|
+
icon: E(t.type, t.data),
|
|
334
335
|
actor: t.actor,
|
|
335
336
|
at: t.createdAt,
|
|
336
337
|
children: X(n, t, a(t.actor))
|
|
@@ -340,7 +341,7 @@ function ne({ workspace: e, entryId: t }) {
|
|
|
340
341
|
function X(e, t, n) {
|
|
341
342
|
let r = t.data ?? {}, i = {
|
|
342
343
|
name: n,
|
|
343
|
-
actor: (e) => /* @__PURE__ */
|
|
344
|
+
actor: (e) => /* @__PURE__ */ V("span", {
|
|
344
345
|
className: "font-medium text-foreground",
|
|
345
346
|
children: e
|
|
346
347
|
})
|
|
@@ -362,4 +363,4 @@ function X(e, t, n) {
|
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
365
|
}
|
|
365
|
-
export {
|
|
366
|
+
export { K as component };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { rememberSearch as e } from "../../../lib/listSearch.js";
|
|
2
|
+
import { redirect as t } from "../../../lib/router.js";
|
|
3
3
|
import { knowledgeQuery as n } from "../../../api/queries.js";
|
|
4
4
|
import { isEntryAt as r } from "../../../lib/refs.js";
|
|
5
|
-
import { kinds as i, termRef as a } from "../../../lib/
|
|
5
|
+
import { kinds as i, termRef as a } from "../../../lib/knowledgeKinds.js";
|
|
6
6
|
import { createFileRoute as o, lazyFn as s, lazyRouteComponent as c } from "@tanstack/react-router";
|
|
7
7
|
var l = o("/$workspace/knowledge/")({
|
|
8
8
|
validateSearch: (e) => ({
|
|
@@ -12,18 +12,18 @@ var l = o("/$workspace/knowledge/")({
|
|
|
12
12
|
}),
|
|
13
13
|
beforeLoad: async ({ context: { queryClient: i }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
|
|
14
14
|
if (s) {
|
|
15
|
-
let
|
|
16
|
-
throw
|
|
15
|
+
let e = (await i.ensureQueryData(n(o.workspace))).find((e) => r(e, s));
|
|
16
|
+
throw t({
|
|
17
17
|
to: "/$workspace/knowledge/$term",
|
|
18
18
|
params: {
|
|
19
19
|
workspace: o.workspace,
|
|
20
|
-
term:
|
|
20
|
+
term: e ? a(e) : s
|
|
21
21
|
},
|
|
22
22
|
replace: !0
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
let d =
|
|
26
|
-
if (d) throw
|
|
25
|
+
let d = e(l.pathname, c, u);
|
|
26
|
+
if (d) throw t({
|
|
27
27
|
to: "/$workspace/knowledge",
|
|
28
28
|
params: o,
|
|
29
29
|
search: d,
|