@parallelworks/tandem-web 0.182.1 → 0.184.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/_virtual/_virtual_i18n/en/common.js +23 -0
- package/_virtual/_virtual_i18n/es/common.js +23 -0
- package/_virtual/_virtual_i18n/ja/common.js +23 -0
- package/_virtual/_virtual_i18n/ko/common.js +23 -0
- package/_virtual/_virtual_i18n/zh/common.js +23 -0
- package/components/DocProperties.js +137 -114
- package/components/DocStart.js +116 -92
- package/components/DocTable.js +102 -100
- package/components/ProjectAccess.js +23 -20
- package/components/SubpageViews.js +477 -161
- package/components/icons.js +8 -8
- package/lib/cancelledLoads.js +7 -0
- package/lib/docProperties.js +6 -6
- package/lib/queryClient.js +7 -6
- package/lib/subpageViews.js +1 -0
- package/package.json +1 -1
- package/routes/_workspace/docs/space2._space.js +128 -128
- package/routes/_workspace/knowledge/_term2.js +83 -77
- package/routes/_workspace/teams/_key/settings2.js +94 -22
- package/routes/_workspace2.js +9 -9
- package/styles.css +1 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { areasQuery as e, knowledgeEntryQuery as t, knowledgeEventsQuery as n, knowledgeMentionsQuery as r, knowledgeQuery as i } from "../../../api/queries.js";
|
|
2
2
|
import { Timeline as a, TimelineItem as o, activityIcon as s } from "../../../components/ActivityTimeline.js";
|
|
3
3
|
import { AttachButton as c, UploadStatus as l, useFileUpload as u } from "../../../components/Attachments.js";
|
|
4
|
-
import { Editor as
|
|
5
|
-
import { FileTextIcon as
|
|
6
|
-
import { uploadKnowledgeAttachment as
|
|
7
|
-
import { docRef as
|
|
8
|
-
import { headingAnchor as
|
|
9
|
-
import { EntryDialog as
|
|
10
|
-
import { termRef as
|
|
11
|
-
import { usePageTitle as
|
|
12
|
-
import { usePeople as
|
|
13
|
-
import { useCan as
|
|
14
|
-
import { Link as
|
|
15
|
-
import { useTime as
|
|
16
|
-
import { Route as
|
|
17
|
-
import { Button as
|
|
4
|
+
import { Editor as ee } from "../../../components/Editor.js";
|
|
5
|
+
import { FileTextIcon as d, LibraryIcon as f, StatusIcon as p } from "../../../components/icons.js";
|
|
6
|
+
import { uploadKnowledgeAttachment as m } from "../../../lib/attachments.js";
|
|
7
|
+
import { docRef as h } from "../../../lib/docs.js";
|
|
8
|
+
import { headingAnchor as g } from "../../../lib/glossary.js";
|
|
9
|
+
import { EntryDialog as _, useKnowledgeActions as te, useKnowledgeMenu as ne } from "../../../lib/knowledge.js";
|
|
10
|
+
import { termRef as v } from "../../../lib/knowledgeKinds.js";
|
|
11
|
+
import { usePageTitle as y } from "../../../lib/pageTitle.js";
|
|
12
|
+
import { usePeople as b } from "../../../lib/people.js";
|
|
13
|
+
import { useCan as x } from "../../../lib/roles.js";
|
|
14
|
+
import { Link as S, useNavigate as C } from "../../../lib/router.js";
|
|
15
|
+
import { useTime as w } from "../../../lib/time.js";
|
|
16
|
+
import { Route as T } from "./_term.js";
|
|
17
|
+
import { Button as E, ErrorText as D, Loader as O, PageHeader as re, Section as k, TitleInput as A, Tooltip as j, useOpenMenu as M } from "@parallelworks/ui";
|
|
18
18
|
import { Suspense as N, useCallback as P, useMemo as F, useRef as I, useState as L } from "react";
|
|
19
19
|
import { useErrorMessage as R } from "@parallelworks/problem/react";
|
|
20
20
|
import { useTranslations as z } from "use-intl";
|
|
@@ -23,40 +23,40 @@ import { useQuery as U, useSuspenseQuery as W } from "@tanstack/react-query";
|
|
|
23
23
|
import { MoreButton as G } from "@parallelworks/ui/list";
|
|
24
24
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
|
|
25
25
|
function K() {
|
|
26
|
-
let { workspace: e, term: n } =
|
|
27
|
-
|
|
28
|
-
let Q = F(() =>
|
|
29
|
-
id:
|
|
26
|
+
let { workspace: e, term: n } = T.useParams(), r = z("knowledge"), a = z("common"), o = C(), s = M(), d = R(), { data: p } = W(t(e, n)), { data: h } = W(i(e)), g = te(e), b = x(e, "edit_docs"), w = b && !p.archivedAt, [k, j] = L(null), U = P((e) => j(e), []), K = ne(e, U), X = I(null), Z = u((t) => m(e, p.id, t));
|
|
27
|
+
y(p.name);
|
|
28
|
+
let Q = F(() => h.filter((e) => e.supersededBy === p.id), [h, p.id]), $ = (e) => g.update.mutate({
|
|
29
|
+
id: p.id,
|
|
30
30
|
...e,
|
|
31
|
-
ifVersion:
|
|
32
|
-
}),
|
|
31
|
+
ifVersion: p.version
|
|
32
|
+
}), ie = p.status === "superseded";
|
|
33
33
|
return /* @__PURE__ */ H("div", {
|
|
34
34
|
className: "flex h-full min-h-0 flex-col",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ V(
|
|
36
|
+
/* @__PURE__ */ V(re, {
|
|
37
37
|
heading: !1,
|
|
38
38
|
breadcrumbs: [{
|
|
39
39
|
label: r("title"),
|
|
40
40
|
href: `/${e}/knowledge`
|
|
41
41
|
}, {
|
|
42
|
-
label:
|
|
43
|
-
icon: /* @__PURE__ */ V(
|
|
42
|
+
label: p.name,
|
|
43
|
+
icon: /* @__PURE__ */ V(f, { className: "size-4 text-muted-foreground" })
|
|
44
44
|
}],
|
|
45
45
|
titleActions: /* @__PURE__ */ V(G, {
|
|
46
|
-
items: () => K(
|
|
47
|
-
label: a("moreActionsFor", { name:
|
|
46
|
+
items: () => K(p),
|
|
47
|
+
label: a("moreActionsFor", { name: p.name }),
|
|
48
48
|
visible: !0
|
|
49
49
|
}),
|
|
50
|
-
actions: /* @__PURE__ */ H(B, { children: [
|
|
50
|
+
actions: /* @__PURE__ */ H(B, { children: [g.update.isPending && /* @__PURE__ */ V("span", {
|
|
51
51
|
className: "text-xs text-muted-foreground",
|
|
52
52
|
role: "status",
|
|
53
53
|
children: a("saving")
|
|
54
|
-
}),
|
|
54
|
+
}), w && /* @__PURE__ */ V(E, {
|
|
55
55
|
type: "button",
|
|
56
56
|
size: "sm",
|
|
57
57
|
onClick: () => U({
|
|
58
58
|
kind: "edit",
|
|
59
|
-
entry:
|
|
59
|
+
entry: p
|
|
60
60
|
}),
|
|
61
61
|
children: r("editDetails")
|
|
62
62
|
})] })
|
|
@@ -66,66 +66,66 @@ function K() {
|
|
|
66
66
|
children: /* @__PURE__ */ H("article", {
|
|
67
67
|
className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
|
|
68
68
|
onContextMenu: (e) => {
|
|
69
|
-
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, K(
|
|
69
|
+
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, K(p));
|
|
70
70
|
},
|
|
71
71
|
children: [
|
|
72
|
-
|
|
72
|
+
p.archivedAt && /* @__PURE__ */ H("div", {
|
|
73
73
|
className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
|
|
74
74
|
children: [/* @__PURE__ */ V("span", {
|
|
75
75
|
className: "min-w-0 flex-1",
|
|
76
76
|
children: r("archivedNotice")
|
|
77
|
-
}),
|
|
77
|
+
}), b && /* @__PURE__ */ V(E, {
|
|
78
78
|
type: "button",
|
|
79
79
|
size: "sm",
|
|
80
|
-
onClick: () =>
|
|
80
|
+
onClick: () => g.restore.mutate(p.id),
|
|
81
81
|
children: r("restore")
|
|
82
82
|
})]
|
|
83
83
|
}),
|
|
84
84
|
/* @__PURE__ */ V(q, {
|
|
85
85
|
workspace: e,
|
|
86
|
-
entry:
|
|
86
|
+
entry: p
|
|
87
87
|
}),
|
|
88
88
|
/* @__PURE__ */ V("h1", {
|
|
89
89
|
className: "sr-only",
|
|
90
|
-
children:
|
|
90
|
+
children: p.name
|
|
91
91
|
}),
|
|
92
92
|
/* @__PURE__ */ V(A, {
|
|
93
|
-
value:
|
|
93
|
+
value: p.name,
|
|
94
94
|
onCommit: (e) => $({ name: e }),
|
|
95
|
-
readOnly: !
|
|
95
|
+
readOnly: !w,
|
|
96
96
|
"aria-label": r("name"),
|
|
97
97
|
maxLength: 100,
|
|
98
|
-
className:
|
|
98
|
+
className: ie ? "mt-2 text-muted-foreground line-through" : "mt-2"
|
|
99
99
|
}),
|
|
100
|
-
|
|
100
|
+
p.aliases.length > 0 && /* @__PURE__ */ V("p", {
|
|
101
101
|
className: "mt-1 text-sm text-muted-foreground",
|
|
102
|
-
children: r("alsoCalled", { names:
|
|
102
|
+
children: r("alsoCalled", { names: p.aliases.join(", ") })
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ V(A, {
|
|
105
|
-
value:
|
|
105
|
+
value: p.definition,
|
|
106
106
|
onCommit: (e) => $({ definition: e }),
|
|
107
|
-
readOnly: !
|
|
107
|
+
readOnly: !w,
|
|
108
108
|
"aria-label": r("definition"),
|
|
109
109
|
placeholder: r("definitionPlaceholder"),
|
|
110
110
|
maxLength: 1e3,
|
|
111
111
|
size: "lg",
|
|
112
112
|
className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
|
|
113
113
|
}),
|
|
114
|
-
(
|
|
114
|
+
(p.supersededBy || Q.length > 0) && /* @__PURE__ */ H("div", {
|
|
115
115
|
className: "mt-3 space-y-1 text-sm",
|
|
116
|
-
children: [
|
|
116
|
+
children: [p.supersededBy && /* @__PURE__ */ V(S, {
|
|
117
117
|
to: "/$workspace/knowledge/$term",
|
|
118
118
|
params: {
|
|
119
119
|
workspace: e,
|
|
120
|
-
term:
|
|
120
|
+
term: v(h.find((e) => e.id === p.supersededBy) ?? { id: p.supersededBy })
|
|
121
121
|
},
|
|
122
122
|
className: "block text-primary hover:underline",
|
|
123
|
-
children: r("supersededBy", { name:
|
|
124
|
-
}), Q.map((t) => /* @__PURE__ */ V(
|
|
123
|
+
children: r("supersededBy", { name: p.supersededByName ?? "" })
|
|
124
|
+
}), Q.map((t) => /* @__PURE__ */ V(S, {
|
|
125
125
|
to: "/$workspace/knowledge/$term",
|
|
126
126
|
params: {
|
|
127
127
|
workspace: e,
|
|
128
|
-
term:
|
|
128
|
+
term: v(t)
|
|
129
129
|
},
|
|
130
130
|
className: "block text-muted-foreground hover:text-foreground",
|
|
131
131
|
children: r("replaces", { name: t.name })
|
|
@@ -135,12 +135,12 @@ function K() {
|
|
|
135
135
|
"aria-label": r("page"),
|
|
136
136
|
className: "mt-8 border-t border-border pt-6",
|
|
137
137
|
children: [
|
|
138
|
-
|
|
139
|
-
value:
|
|
140
|
-
editable:
|
|
138
|
+
w || p.body ? /* @__PURE__ */ V(ee, {
|
|
139
|
+
value: p.body ?? "",
|
|
140
|
+
editable: w,
|
|
141
141
|
placeholder: r("pagePlaceholder"),
|
|
142
142
|
label: r("page"),
|
|
143
|
-
onBlur: (e) => e !== (
|
|
143
|
+
onBlur: (e) => e !== (p.body ?? "") && $({ body: e }),
|
|
144
144
|
onFiles: (e, t) => Z.upload(X.current, e, t),
|
|
145
145
|
onEditor: (e) => {
|
|
146
146
|
X.current = e;
|
|
@@ -150,7 +150,7 @@ function K() {
|
|
|
150
150
|
className: "text-sm text-muted-foreground",
|
|
151
151
|
children: r("noPage")
|
|
152
152
|
}),
|
|
153
|
-
|
|
153
|
+
w && /* @__PURE__ */ H("div", {
|
|
154
154
|
className: "mt-3 flex items-center gap-2",
|
|
155
155
|
children: [
|
|
156
156
|
/* @__PURE__ */ V(c, { onFiles: (e) => Z.upload(X.current, e) }),
|
|
@@ -167,24 +167,30 @@ function K() {
|
|
|
167
167
|
})
|
|
168
168
|
]
|
|
169
169
|
}),
|
|
170
|
-
|
|
170
|
+
g.update.isError && /* @__PURE__ */ V(D, {
|
|
171
171
|
className: "mt-2",
|
|
172
|
-
children:
|
|
172
|
+
children: d(g.update.error)
|
|
173
173
|
})
|
|
174
174
|
]
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */ V(N, {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
/* @__PURE__ */ V(N, {
|
|
177
|
+
fallback: /* @__PURE__ */ V(O, { fill: "section" }),
|
|
178
|
+
children: /* @__PURE__ */ V(J, {
|
|
179
|
+
workspace: e,
|
|
180
|
+
entryId: p.id
|
|
181
|
+
})
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ V(N, {
|
|
184
|
+
fallback: /* @__PURE__ */ V(O, { fill: "section" }),
|
|
185
|
+
children: /* @__PURE__ */ V(Y, {
|
|
186
|
+
workspace: e,
|
|
187
|
+
entryId: p.id
|
|
188
|
+
})
|
|
189
|
+
})
|
|
184
190
|
]
|
|
185
191
|
})
|
|
186
192
|
}),
|
|
187
|
-
k && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(
|
|
193
|
+
k && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(_, {
|
|
188
194
|
workspace: e,
|
|
189
195
|
mode: k,
|
|
190
196
|
onClose: () => j(null),
|
|
@@ -192,16 +198,16 @@ function K() {
|
|
|
192
198
|
to: "/$workspace/knowledge/$term",
|
|
193
199
|
params: {
|
|
194
200
|
workspace: e,
|
|
195
|
-
term:
|
|
201
|
+
term: v(t)
|
|
196
202
|
},
|
|
197
|
-
replace: t.id ===
|
|
203
|
+
replace: t.id === p.id
|
|
198
204
|
})
|
|
199
205
|
}) })
|
|
200
206
|
]
|
|
201
207
|
});
|
|
202
208
|
}
|
|
203
209
|
function q({ workspace: t, entry: n }) {
|
|
204
|
-
let r = z("knowledge"), { actorName: i } =
|
|
210
|
+
let r = z("knowledge"), { actorName: i } = b(t), a = w(), { data: o = [] } = U(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
|
|
205
211
|
...n.kind === "term" ? [] : [r(`kind.${n.kind}`)],
|
|
206
212
|
...s ? [s.title] : [],
|
|
207
213
|
r("writtenBy", { name: i(n.creator) }),
|
|
@@ -227,15 +233,15 @@ function q({ workspace: t, entry: n }) {
|
|
|
227
233
|
}), (c || n.source.identifier) && /* @__PURE__ */ H("p", {
|
|
228
234
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
229
235
|
children: [
|
|
230
|
-
c && /* @__PURE__ */ H(
|
|
236
|
+
c && /* @__PURE__ */ H(S, {
|
|
231
237
|
to: "/$workspace/docs/$doc",
|
|
232
238
|
params: {
|
|
233
239
|
workspace: t,
|
|
234
|
-
doc:
|
|
240
|
+
doc: h(c)
|
|
235
241
|
},
|
|
236
|
-
...n.source.section && { hash:
|
|
242
|
+
...n.source.section && { hash: g(n.source.section) },
|
|
237
243
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
238
|
-
children: [/* @__PURE__ */ V(
|
|
244
|
+
children: [/* @__PURE__ */ V(d, { className: "size-3" }), n.source.section ? r("sourceSection", {
|
|
239
245
|
doc: c.title,
|
|
240
246
|
section: n.source.section
|
|
241
247
|
}) : c.title]
|
|
@@ -244,7 +250,7 @@ function q({ workspace: t, entry: n }) {
|
|
|
244
250
|
className: "text-warning",
|
|
245
251
|
children: r("sourceMissing", { section: n.source.section ?? "" })
|
|
246
252
|
}),
|
|
247
|
-
n.source.identifier && /* @__PURE__ */ H(
|
|
253
|
+
n.source.identifier && /* @__PURE__ */ H(S, {
|
|
248
254
|
to: "/$workspace/issues/$identifier",
|
|
249
255
|
params: {
|
|
250
256
|
workspace: t,
|
|
@@ -279,7 +285,7 @@ function J({ workspace: e, entryId: t }) {
|
|
|
279
285
|
children: n("mentionedNone")
|
|
280
286
|
}) : /* @__PURE__ */ H("ul", {
|
|
281
287
|
className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
282
|
-
children: [i.issues.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(
|
|
288
|
+
children: [i.issues.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(S, {
|
|
283
289
|
to: "/$workspace/issues/$identifier",
|
|
284
290
|
params: {
|
|
285
291
|
workspace: e,
|
|
@@ -287,7 +293,7 @@ function J({ workspace: e, entryId: t }) {
|
|
|
287
293
|
},
|
|
288
294
|
className: o,
|
|
289
295
|
children: [
|
|
290
|
-
/* @__PURE__ */ V(
|
|
296
|
+
/* @__PURE__ */ V(p, {
|
|
291
297
|
category: t.statusCategory,
|
|
292
298
|
className: "size-3.5 shrink-0"
|
|
293
299
|
}),
|
|
@@ -300,15 +306,15 @@ function J({ workspace: e, entryId: t }) {
|
|
|
300
306
|
children: t.title
|
|
301
307
|
})
|
|
302
308
|
]
|
|
303
|
-
}) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(
|
|
309
|
+
}) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(S, {
|
|
304
310
|
to: "/$workspace/docs/$doc",
|
|
305
311
|
params: {
|
|
306
312
|
workspace: e,
|
|
307
|
-
doc:
|
|
313
|
+
doc: h(t)
|
|
308
314
|
},
|
|
309
315
|
className: o,
|
|
310
316
|
children: [
|
|
311
|
-
/* @__PURE__ */ V(
|
|
317
|
+
/* @__PURE__ */ V(d, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
312
318
|
/* @__PURE__ */ V("span", {
|
|
313
319
|
className: "w-16 shrink-0 text-xs text-muted-foreground",
|
|
314
320
|
children: n("doc")
|
|
@@ -323,7 +329,7 @@ function J({ workspace: e, entryId: t }) {
|
|
|
323
329
|
});
|
|
324
330
|
}
|
|
325
331
|
function Y({ workspace: e, entryId: t }) {
|
|
326
|
-
let r = z("knowledge.history"), { data: i = [] } = U(n(e, t)), { actorName: c } =
|
|
332
|
+
let r = z("knowledge.history"), { data: i = [] } = U(n(e, t)), { actorName: c } = b(e);
|
|
327
333
|
return i.length === 0 ? null : /* @__PURE__ */ V(k, {
|
|
328
334
|
title: r("title"),
|
|
329
335
|
variant: "bare",
|
|
@@ -91,13 +91,18 @@ function re() {
|
|
|
91
91
|
})
|
|
92
92
|
]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */ q(
|
|
94
|
+
/* @__PURE__ */ q(oe, {
|
|
95
95
|
workspace: n,
|
|
96
96
|
team: g,
|
|
97
97
|
teams: i,
|
|
98
98
|
isAdmin: o
|
|
99
99
|
}),
|
|
100
|
-
/* @__PURE__ */ q(
|
|
100
|
+
g.sidebarHidden && /* @__PURE__ */ q(ae, {
|
|
101
|
+
workspace: n,
|
|
102
|
+
team: g,
|
|
103
|
+
isAdmin: o
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ q(pe, {
|
|
101
106
|
workspace: n,
|
|
102
107
|
teamKey: r,
|
|
103
108
|
isAdmin: a.has("manage_members")
|
|
@@ -120,17 +125,17 @@ function re() {
|
|
|
120
125
|
team: g,
|
|
121
126
|
isAdmin: o
|
|
122
127
|
}),
|
|
123
|
-
/* @__PURE__ */ q(
|
|
128
|
+
/* @__PURE__ */ q(se, {
|
|
124
129
|
workspace: n,
|
|
125
130
|
team: g,
|
|
126
131
|
isAdmin: o
|
|
127
132
|
}),
|
|
128
|
-
/* @__PURE__ */ q(
|
|
133
|
+
/* @__PURE__ */ q(le, {
|
|
129
134
|
workspace: n,
|
|
130
135
|
team: g,
|
|
131
136
|
isAdmin: o
|
|
132
137
|
}),
|
|
133
|
-
/* @__PURE__ */ q(
|
|
138
|
+
/* @__PURE__ */ q(ce, {
|
|
134
139
|
workspace: n,
|
|
135
140
|
team: g,
|
|
136
141
|
isAdmin: o
|
|
@@ -145,12 +150,12 @@ function re() {
|
|
|
145
150
|
teamKey: r,
|
|
146
151
|
isAdmin: a.has("manage_templates")
|
|
147
152
|
}),
|
|
148
|
-
/* @__PURE__ */ q(
|
|
153
|
+
/* @__PURE__ */ q(ue, {
|
|
149
154
|
workspace: n,
|
|
150
155
|
team: g,
|
|
151
156
|
isAdmin: o
|
|
152
157
|
}),
|
|
153
|
-
/* @__PURE__ */ q(
|
|
158
|
+
/* @__PURE__ */ q(fe, {
|
|
154
159
|
workspace: n,
|
|
155
160
|
team: g,
|
|
156
161
|
isAdmin: o
|
|
@@ -160,11 +165,11 @@ function re() {
|
|
|
160
165
|
team: g,
|
|
161
166
|
isAdmin: o
|
|
162
167
|
}),
|
|
163
|
-
/* @__PURE__ */ q(
|
|
168
|
+
/* @__PURE__ */ q(me, {
|
|
164
169
|
workspace: n,
|
|
165
170
|
teamKey: r
|
|
166
171
|
}),
|
|
167
|
-
o && /* @__PURE__ */ q(
|
|
172
|
+
o && /* @__PURE__ */ q(he, {
|
|
168
173
|
workspace: n,
|
|
169
174
|
team: g
|
|
170
175
|
})
|
|
@@ -173,7 +178,74 @@ function re() {
|
|
|
173
178
|
})]
|
|
174
179
|
}) : null;
|
|
175
180
|
}
|
|
176
|
-
|
|
181
|
+
var ie = [
|
|
182
|
+
"issues",
|
|
183
|
+
"projects",
|
|
184
|
+
"areas",
|
|
185
|
+
"decisions",
|
|
186
|
+
"docs"
|
|
187
|
+
];
|
|
188
|
+
function ae({ workspace: n, team: r, isAdmin: i }) {
|
|
189
|
+
let a = G("teamSidebar"), o = G("workspace"), c = W(), l = Z(), u = Y({
|
|
190
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
191
|
+
params: { path: {
|
|
192
|
+
workspace: n,
|
|
193
|
+
key: r.key
|
|
194
|
+
} },
|
|
195
|
+
body: { sidebarHidden: i }
|
|
196
|
+
})),
|
|
197
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
198
|
+
}), d = u.isPending && u.variables ? u.variables : r.sidebarHidden ?? [], f = ie.filter((e) => !d.includes(e)), p = [
|
|
199
|
+
{
|
|
200
|
+
page: "triage",
|
|
201
|
+
help: a("triageHelp"),
|
|
202
|
+
available: r.triageEnabled
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
page: "issues",
|
|
206
|
+
available: !0
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
page: "projects",
|
|
210
|
+
available: !0
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
page: "areas",
|
|
214
|
+
available: !0
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
page: "decisions",
|
|
218
|
+
help: a("decisionsHelp"),
|
|
219
|
+
available: !0
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
page: "docs",
|
|
223
|
+
available: !0
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
page: "cycles",
|
|
227
|
+
available: r.cyclesEnabled
|
|
228
|
+
}
|
|
229
|
+
];
|
|
230
|
+
return /* @__PURE__ */ J(z, {
|
|
231
|
+
title: a("title"),
|
|
232
|
+
description: a("description"),
|
|
233
|
+
children: [p.filter((e) => e.available).map(({ page: e, help: t }) => {
|
|
234
|
+
let n = !d.includes(e), r = n && f.length === 1 && f[0] === e;
|
|
235
|
+
return /* @__PURE__ */ q(R, {
|
|
236
|
+
label: o(e),
|
|
237
|
+
helpText: r ? a("keepOne") : t,
|
|
238
|
+
children: /* @__PURE__ */ q(B, {
|
|
239
|
+
"aria-label": o(e),
|
|
240
|
+
checked: n,
|
|
241
|
+
disabled: !i || r || u.isPending,
|
|
242
|
+
onCheckedChange: (t) => u.mutate(t ? d.filter((t) => t !== e) : [...d, e])
|
|
243
|
+
})
|
|
244
|
+
}, e);
|
|
245
|
+
}), u.isError && /* @__PURE__ */ q(P, { children: c(u.error) })]
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
function oe({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
177
249
|
let o = G("teamParent"), c = W(), l = Z(), u = Y({
|
|
178
250
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
179
251
|
params: { path: {
|
|
@@ -219,7 +291,7 @@ function ie({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
|
219
291
|
]
|
|
220
292
|
});
|
|
221
293
|
}
|
|
222
|
-
function
|
|
294
|
+
function se({ workspace: n, team: r, isAdmin: a }) {
|
|
223
295
|
let o = G("teamIntake"), c = W(), l = Z(), { data: u } = X(i), d = () => l.invalidateQueries({ queryKey: s(n).queryKey }), f = { params: { path: {
|
|
224
296
|
workspace: n,
|
|
225
297
|
key: r.key
|
|
@@ -307,7 +379,7 @@ function ae({ workspace: n, team: r, isAdmin: a }) {
|
|
|
307
379
|
]
|
|
308
380
|
});
|
|
309
381
|
}
|
|
310
|
-
function
|
|
382
|
+
function ce({ workspace: n, team: r, isAdmin: i }) {
|
|
311
383
|
let a = G("planning.sla"), o = G("priority"), c = W(), l = Z(), u = Y({
|
|
312
384
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
313
385
|
params: { path: {
|
|
@@ -357,7 +429,7 @@ function oe({ workspace: n, team: r, isAdmin: i }) {
|
|
|
357
429
|
}, e)), u.isError && /* @__PURE__ */ q(P, { children: c(u.error) })]
|
|
358
430
|
});
|
|
359
431
|
}
|
|
360
|
-
function
|
|
432
|
+
function le({ workspace: n, team: r, isAdmin: i }) {
|
|
361
433
|
let a = G("planning.settings"), o = W(), c = Z(), l = Y({
|
|
362
434
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
363
435
|
params: { path: {
|
|
@@ -562,7 +634,7 @@ var $ = [
|
|
|
562
634
|
"merge",
|
|
563
635
|
"release"
|
|
564
636
|
];
|
|
565
|
-
function
|
|
637
|
+
function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
566
638
|
let o = G("flow"), c = W(), l = Z(), { data: u = [] } = X(r(n)), d = Y({
|
|
567
639
|
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
568
640
|
params: { path: {
|
|
@@ -651,7 +723,7 @@ function ce({ workspace: n, team: i, isAdmin: a }) {
|
|
|
651
723
|
h("release") && /* @__PURE__ */ q(R, {
|
|
652
724
|
label: o("releaseTargets"),
|
|
653
725
|
helpText: o("releaseTargetsHelp"),
|
|
654
|
-
children: /* @__PURE__ */ q(
|
|
726
|
+
children: /* @__PURE__ */ q(de, {
|
|
655
727
|
workspace: n,
|
|
656
728
|
team: i,
|
|
657
729
|
disabled: !a
|
|
@@ -693,7 +765,7 @@ function ce({ workspace: n, team: i, isAdmin: a }) {
|
|
|
693
765
|
]
|
|
694
766
|
});
|
|
695
767
|
}
|
|
696
|
-
function
|
|
768
|
+
function de({ workspace: n, team: r, disabled: i }) {
|
|
697
769
|
let a = G("flow"), o = W(), c = Z(), [l, u] = U(r.releaseTargets.join(", ")), d = Y({
|
|
698
770
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
699
771
|
params: { path: {
|
|
@@ -721,7 +793,7 @@ function le({ workspace: n, team: r, disabled: i }) {
|
|
|
721
793
|
})
|
|
722
794
|
});
|
|
723
795
|
}
|
|
724
|
-
function
|
|
796
|
+
function fe({ workspace: n, team: r, isAdmin: i }) {
|
|
725
797
|
let a = G("team"), o = W(), c = Z(), l = Y({
|
|
726
798
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
727
799
|
params: { path: {
|
|
@@ -748,7 +820,7 @@ function ue({ workspace: n, team: r, isAdmin: i }) {
|
|
|
748
820
|
})
|
|
749
821
|
});
|
|
750
822
|
}
|
|
751
|
-
function
|
|
823
|
+
function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
752
824
|
let { data: s } = Q(o(n, r)), { data: c } = Q(i), { members: l, person: u } = ee(n), d = Z(), f = H(), p = E(), [h, g] = U(null), v = G("team"), y = W(), b = G("common"), x = Y({
|
|
753
825
|
mutationFn: async (i) => {
|
|
754
826
|
for (let { username: a, add: o } of i) {
|
|
@@ -882,7 +954,7 @@ function de({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
882
954
|
})]
|
|
883
955
|
});
|
|
884
956
|
}
|
|
885
|
-
function
|
|
957
|
+
function me({ workspace: r, teamKey: i }) {
|
|
886
958
|
let { data: o } = Q(a(r, i)), { data: l } = Q(s(r)), u = Z(), d = G("team"), f = Y({
|
|
887
959
|
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
|
|
888
960
|
params: { path: {
|
|
@@ -932,7 +1004,7 @@ function fe({ workspace: r, teamKey: i }) {
|
|
|
932
1004
|
})
|
|
933
1005
|
});
|
|
934
1006
|
}
|
|
935
|
-
function
|
|
1007
|
+
function he({ workspace: n, team: r }) {
|
|
936
1008
|
let i = G("team"), a = Z(), o = W(), { confirm: c, dialog: l } = S(), u = !!r.archivedAt, d = Y({
|
|
937
1009
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
938
1010
|
params: { path: {
|
|
@@ -972,14 +1044,14 @@ function pe({ workspace: n, team: r }) {
|
|
|
972
1044
|
children: o(d.error)
|
|
973
1045
|
}),
|
|
974
1046
|
l,
|
|
975
|
-
/* @__PURE__ */ q(
|
|
1047
|
+
/* @__PURE__ */ q(ge, {
|
|
976
1048
|
workspace: n,
|
|
977
1049
|
team: r
|
|
978
1050
|
})
|
|
979
1051
|
]
|
|
980
1052
|
});
|
|
981
1053
|
}
|
|
982
|
-
function
|
|
1054
|
+
function ge({ workspace: n, team: r }) {
|
|
983
1055
|
let i = G("team"), a = Z(), o = E(), c = W(), [l, u] = U(!1), [d, f] = U(""), [p, m] = U(null), h = Y({
|
|
984
1056
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
|
|
985
1057
|
workspace: n,
|
package/routes/_workspace2.js
CHANGED
|
@@ -277,14 +277,14 @@ function at() {
|
|
|
277
277
|
className: "relative flex",
|
|
278
278
|
children: [e, n && t && /* @__PURE__ */ A("span", { className: it })]
|
|
279
279
|
}), s = v.filter((e) => !e.archivedAt), c = new Set(s.map((e) => e.id)), u = (e) => s.filter((t) => (t.parentId && c.has(t.parentId) ? t.parentId : "") === e), f = (e) => {
|
|
280
|
-
let t = (t) => Ie(d, e.key, t), n = kt.filter((t) => t.identifier.startsWith(`${e.key}-`)).length;
|
|
280
|
+
let t = (t) => Ie(d, e.key, t), n = kt.filter((t) => t.identifier.startsWith(`${e.key}-`)).length, i = (t) => !(e.sidebarHidden ?? []).includes(t);
|
|
281
281
|
return /* @__PURE__ */ j(P, {
|
|
282
282
|
label: e.name,
|
|
283
283
|
icon: o(/* @__PURE__ */ A(l, {
|
|
284
284
|
icon: e.icon,
|
|
285
285
|
color: e.color,
|
|
286
286
|
name: e.name
|
|
287
|
-
}), Mt(e.id) > 0),
|
|
287
|
+
}), i("triage") && Mt(e.id) > 0),
|
|
288
288
|
selected: x(J.pathname, d)?.team === e.key,
|
|
289
289
|
open: !Et.has(e.key),
|
|
290
290
|
onOpenChange: (t) => Ot(e.key, t),
|
|
@@ -294,7 +294,7 @@ function at() {
|
|
|
294
294
|
label: W("moreActionsFor", { name: e.name })
|
|
295
295
|
}),
|
|
296
296
|
children: [
|
|
297
|
-
e.triageEnabled && /* @__PURE__ */ A(F, {
|
|
297
|
+
e.triageEnabled && i("triage") && /* @__PURE__ */ A(F, {
|
|
298
298
|
label: U("triage"),
|
|
299
299
|
icon: /* @__PURE__ */ A(de, { className: "size-4" }),
|
|
300
300
|
href: t("triage"),
|
|
@@ -306,28 +306,28 @@ function at() {
|
|
|
306
306
|
label: U("triageCount")
|
|
307
307
|
})
|
|
308
308
|
}),
|
|
309
|
-
/* @__PURE__ */ A(F, {
|
|
309
|
+
i("issues") && /* @__PURE__ */ A(F, {
|
|
310
310
|
label: U("issues"),
|
|
311
311
|
icon: /* @__PURE__ */ A(ce, { className: "size-4" }),
|
|
312
312
|
href: t("issues"),
|
|
313
313
|
selected: Tt.team === e.key,
|
|
314
314
|
onContextMenu: a(t("issues"))
|
|
315
315
|
}),
|
|
316
|
-
/* @__PURE__ */ A(F, {
|
|
316
|
+
i("projects") && /* @__PURE__ */ A(F, {
|
|
317
317
|
label: U("projects"),
|
|
318
318
|
icon: /* @__PURE__ */ A(ue, { className: "size-4" }),
|
|
319
319
|
href: t("projects"),
|
|
320
320
|
selected: Y("projects", e.key),
|
|
321
321
|
onContextMenu: a(t("projects"))
|
|
322
322
|
}),
|
|
323
|
-
/* @__PURE__ */ A(F, {
|
|
323
|
+
i("areas") && /* @__PURE__ */ A(F, {
|
|
324
324
|
label: U("areas"),
|
|
325
325
|
icon: /* @__PURE__ */ A(ne, { className: "size-4" }),
|
|
326
326
|
href: t("areas"),
|
|
327
327
|
selected: Y("areas", e.key),
|
|
328
328
|
onContextMenu: a(t("areas"))
|
|
329
329
|
}),
|
|
330
|
-
/* @__PURE__ */ A(F, {
|
|
330
|
+
i("decisions") && /* @__PURE__ */ A(F, {
|
|
331
331
|
label: U("decisions"),
|
|
332
332
|
icon: /* @__PURE__ */ A(oe, { className: "size-4" }),
|
|
333
333
|
href: t("decisions"),
|
|
@@ -340,14 +340,14 @@ function at() {
|
|
|
340
340
|
className: "bg-agent! text-agent-foreground!"
|
|
341
341
|
})
|
|
342
342
|
}),
|
|
343
|
-
/* @__PURE__ */ A(F, {
|
|
343
|
+
i("docs") && /* @__PURE__ */ A(F, {
|
|
344
344
|
label: U("docs"),
|
|
345
345
|
icon: /* @__PURE__ */ A(ae, { className: "size-4" }),
|
|
346
346
|
href: `/${d}/docs/space/${e.key}`,
|
|
347
347
|
selected: r(`/${d}/docs/space/${e.key}`),
|
|
348
348
|
onContextMenu: a(`/${d}/docs/space/${e.key}`)
|
|
349
349
|
}),
|
|
350
|
-
e.cyclesEnabled && /* @__PURE__ */ A(F, {
|
|
350
|
+
e.cyclesEnabled && i("cycles") && /* @__PURE__ */ A(F, {
|
|
351
351
|
label: U("cycles"),
|
|
352
352
|
icon: /* @__PURE__ */ A(ie, { className: "size-4" }),
|
|
353
353
|
href: t("cycles"),
|
package/styles.css
CHANGED
|
@@ -268,6 +268,7 @@ body[data-tandem] > :not(:has(.tandem)) {
|
|
|
268
268
|
/* A link to a doc reads as a chip, so it is told apart from a web link. */
|
|
269
269
|
.prose-issue a[href*="/docs/"] {
|
|
270
270
|
border: 1px solid var(--color-border);
|
|
271
|
+
cursor: pointer;
|
|
271
272
|
border-radius: 0.375rem;
|
|
272
273
|
background: var(--color-muted);
|
|
273
274
|
padding: 0.05em 0.4em;
|