@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
package/lib/knowledge.js
CHANGED
|
@@ -3,36 +3,25 @@ import { api as e, unwrap as t } from "../api/client.js";
|
|
|
3
3
|
import { useNavigate as n } from "./router.js";
|
|
4
4
|
import { areasQuery as r, docQuery as i, docsQuery as a, knowledgeQuery as o, teamsQuery as s, workspaceQuery as c } from "../api/queries.js";
|
|
5
5
|
import { AreaIcon as l, FileTextIcon as u } from "../components/icons.js";
|
|
6
|
-
import {
|
|
7
|
-
import { copyItem as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { entryPath as d, kinds as ee, termRef as f } from "./knowledgeKinds.js";
|
|
7
|
+
import { copyItem as p, useLinkItems as m } from "./menus.js";
|
|
8
|
+
import { headings as te } from "./glossary.js";
|
|
9
|
+
import { Button as h, Combobox as g, ErrorText as _, Input as v, Modal as ne, Select as y, Textarea as re, menuDivider as b } from "@parallelworks/ui";
|
|
10
|
+
import { useCallback as x, useState as S } from "react";
|
|
10
11
|
import { useErrorMessage as ie } from "@parallelworks/problem/react";
|
|
11
|
-
import { useTranslations as
|
|
12
|
-
import { Fragment as ae, jsx as
|
|
13
|
-
import { keepPreviousData as oe, useMutation as
|
|
12
|
+
import { useTranslations as C } from "use-intl";
|
|
13
|
+
import { Fragment as ae, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { keepPreviousData as oe, useMutation as E, useQuery as D, useQueryClient as O, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
14
15
|
// src/lib/knowledge.tsx
|
|
15
|
-
var D = [
|
|
16
|
-
"term",
|
|
17
|
-
"decision",
|
|
18
|
-
"system",
|
|
19
|
-
"role"
|
|
20
|
-
];
|
|
21
|
-
function O(e, t) {
|
|
22
|
-
return `/${e}/knowledge/${encodeURIComponent(t)}`;
|
|
23
|
-
}
|
|
24
|
-
function k(e) {
|
|
25
|
-
return e.slug || e.id;
|
|
26
|
-
}
|
|
27
16
|
function A(e) {
|
|
28
|
-
let { data: t } =
|
|
29
|
-
return
|
|
17
|
+
let { data: t } = D(o(e));
|
|
18
|
+
return x((e) => {
|
|
30
19
|
let n = t?.find((t) => t.id === e);
|
|
31
|
-
return n ?
|
|
20
|
+
return n ? f(n) : e;
|
|
32
21
|
}, [t]);
|
|
33
22
|
}
|
|
34
23
|
function j(n) {
|
|
35
|
-
let r =
|
|
24
|
+
let r = O(), i = () => {
|
|
36
25
|
r.invalidateQueries({ queryKey: [
|
|
37
26
|
"workspace",
|
|
38
27
|
n,
|
|
@@ -51,47 +40,47 @@ function j(n) {
|
|
|
51
40
|
entry: e
|
|
52
41
|
} });
|
|
53
42
|
return {
|
|
54
|
-
create:
|
|
43
|
+
create: E({
|
|
55
44
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge", {
|
|
56
45
|
params: { path: { workspace: n } },
|
|
57
46
|
body: r
|
|
58
47
|
})),
|
|
59
48
|
onSettled: i
|
|
60
49
|
}),
|
|
61
|
-
update:
|
|
50
|
+
update: E({
|
|
62
51
|
mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/knowledge/{entry}", {
|
|
63
52
|
params: a(n),
|
|
64
53
|
body: r
|
|
65
54
|
})),
|
|
66
55
|
onSettled: i
|
|
67
56
|
}),
|
|
68
|
-
supersede:
|
|
57
|
+
supersede: E({
|
|
69
58
|
mutationFn: async ({ id: n, by: r }) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/supersede", {
|
|
70
59
|
params: a(n),
|
|
71
60
|
body: { by: r }
|
|
72
61
|
})),
|
|
73
62
|
onSettled: i
|
|
74
63
|
}),
|
|
75
|
-
archive:
|
|
64
|
+
archive: E({
|
|
76
65
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/archive", { params: a(n) })),
|
|
77
66
|
onSettled: i
|
|
78
67
|
}),
|
|
79
|
-
restore:
|
|
68
|
+
restore: E({
|
|
80
69
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/restore", { params: a(n) })),
|
|
81
70
|
onSettled: i
|
|
82
71
|
})
|
|
83
72
|
};
|
|
84
73
|
}
|
|
85
74
|
function M(e, t) {
|
|
86
|
-
let r =
|
|
87
|
-
return
|
|
88
|
-
let c = [...o(
|
|
75
|
+
let r = C("knowledge"), i = C("common"), a = j(e), o = m(), s = n();
|
|
76
|
+
return x((n) => {
|
|
77
|
+
let c = [...o(d(e, f(n))), p(i("copyName"), n.name)], l = {
|
|
89
78
|
label: i("open"),
|
|
90
79
|
onClick: () => s({
|
|
91
80
|
to: "/$workspace/knowledge/$term",
|
|
92
81
|
params: {
|
|
93
82
|
workspace: e,
|
|
94
|
-
term:
|
|
83
|
+
term: f(n)
|
|
95
84
|
}
|
|
96
85
|
})
|
|
97
86
|
};
|
|
@@ -101,7 +90,7 @@ function M(e, t) {
|
|
|
101
90
|
label: r("restore"),
|
|
102
91
|
onClick: () => a.restore.mutate(n.id)
|
|
103
92
|
},
|
|
104
|
-
|
|
93
|
+
b,
|
|
105
94
|
...c
|
|
106
95
|
] : [
|
|
107
96
|
l,
|
|
@@ -143,9 +132,9 @@ function M(e, t) {
|
|
|
143
132
|
}
|
|
144
133
|
})
|
|
145
134
|
}],
|
|
146
|
-
|
|
135
|
+
b,
|
|
147
136
|
...c,
|
|
148
|
-
|
|
137
|
+
b,
|
|
149
138
|
{
|
|
150
139
|
label: r("archive"),
|
|
151
140
|
destructive: !0,
|
|
@@ -163,53 +152,53 @@ function M(e, t) {
|
|
|
163
152
|
]);
|
|
164
153
|
}
|
|
165
154
|
function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
166
|
-
let d =
|
|
167
|
-
...a(e,
|
|
155
|
+
let d = C("planning"), f = C("knowledge"), p = C("common"), m = ie(), { data: b } = k(s(e)), { data: x } = k(c(e)), E = j(e), O = t.kind === "edit" ? t.entry : void 0, A = t.kind === "create" ? t.defaults ?? {} : {}, M = t.kind === "create" ? t.supersedes : void 0, [N, se] = S(O?.name ?? A.name ?? ""), [P, ce] = S((O?.aliases ?? A.aliases ?? []).join(", ")), [F, le] = S(O?.kind ?? A.kind ?? "term"), [I, ue] = S(A.status ?? "proposed"), [L, de] = S(O?.definition ?? A.definition ?? ""), [R, fe] = S(A.team ?? b.find((e) => e.id === M?.teamId)?.key ?? ""), [z, B] = S(O?.areaId ?? ""), { data: V = [] } = D(r(e)), H = O ? O.teamId : b.find((e) => e.key === R)?.id, U = V.find((e) => e.id === z)?.key ?? "", [W, pe] = S(O?.source.doc?.key ?? A.source?.doc ?? ""), [G, K] = S(O?.source.section ?? A.source?.section ?? ""), [q, me] = S(O?.source.identifier ?? A.source?.issue ?? ""), [J, he] = S(!1), [Y, ge] = S(""), { data: _e = [] } = D({
|
|
156
|
+
...a(e, Y ? { title: Y } : {
|
|
168
157
|
top: !0,
|
|
169
158
|
limit: 20
|
|
170
159
|
}),
|
|
171
|
-
enabled:
|
|
160
|
+
enabled: J,
|
|
172
161
|
placeholderData: oe
|
|
173
|
-
}), [ve, X] =
|
|
174
|
-
...i(e,
|
|
175
|
-
enabled: !!
|
|
176
|
-
}), ye = Z ?? (
|
|
162
|
+
}), [ve, X] = S(null), { data: Z } = D({
|
|
163
|
+
...i(e, W),
|
|
164
|
+
enabled: !!W
|
|
165
|
+
}), ye = Z ?? (O?.source.doc?.key === W ? O.source.doc : void 0), Q = te(Z?.body ?? ""), $ = E.create.isPending || E.update.isPending || E.supersede.isPending, be = async () => {
|
|
177
166
|
X(null);
|
|
178
167
|
let e = {
|
|
179
|
-
...
|
|
180
|
-
...
|
|
181
|
-
...
|
|
168
|
+
...W && { doc: W },
|
|
169
|
+
...W && G && { section: G },
|
|
170
|
+
...q.trim() && { issue: q.trim() },
|
|
182
171
|
...A.source?.decision && { decision: A.source.decision }
|
|
183
172
|
}, t = P.split(",").map((e) => e.trim()).filter(Boolean);
|
|
184
173
|
try {
|
|
185
174
|
let r;
|
|
186
|
-
|
|
187
|
-
id:
|
|
175
|
+
O ? r = await E.update.mutateAsync({
|
|
176
|
+
id: O.id,
|
|
188
177
|
name: N,
|
|
189
178
|
aliases: t,
|
|
190
179
|
kind: F,
|
|
191
180
|
definition: L,
|
|
192
|
-
...(!z ||
|
|
181
|
+
...(!z || U) && { area: U },
|
|
193
182
|
source: e,
|
|
194
|
-
ifVersion:
|
|
195
|
-
}) : (r = await
|
|
183
|
+
ifVersion: O.version
|
|
184
|
+
}) : (r = await E.create.mutateAsync({
|
|
196
185
|
name: N,
|
|
197
186
|
aliases: t,
|
|
198
187
|
kind: F,
|
|
199
188
|
status: I,
|
|
200
189
|
definition: L,
|
|
201
190
|
...R && { team: R },
|
|
202
|
-
...
|
|
191
|
+
...U && { area: U },
|
|
203
192
|
source: e
|
|
204
|
-
}), M && await
|
|
193
|
+
}), M && await E.supersede.mutateAsync({
|
|
205
194
|
id: M.id,
|
|
206
195
|
by: r.id
|
|
207
196
|
})), o?.(r), n();
|
|
208
197
|
} catch (e) {
|
|
209
|
-
X(
|
|
198
|
+
X(m(e));
|
|
210
199
|
}
|
|
211
|
-
}, xe =
|
|
212
|
-
return /* @__PURE__ */
|
|
200
|
+
}, xe = O ? f("editTitle", { name: O.name }) : M ? f("supersedeTitle", { name: M.name }) : f("newTitle");
|
|
201
|
+
return /* @__PURE__ */ w(ne, {
|
|
213
202
|
open: !0,
|
|
214
203
|
onClose: n,
|
|
215
204
|
dismissible: !$,
|
|
@@ -217,24 +206,24 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
217
206
|
title: xe,
|
|
218
207
|
description: M ? f("supersedeHint") : void 0,
|
|
219
208
|
onSubmit: () => be(),
|
|
220
|
-
footer: /* @__PURE__ */
|
|
209
|
+
footer: /* @__PURE__ */ T(ae, { children: [/* @__PURE__ */ w(h, {
|
|
221
210
|
type: "button",
|
|
222
211
|
variant: "ghost",
|
|
223
212
|
onClick: n,
|
|
224
|
-
children:
|
|
225
|
-
}), /* @__PURE__ */
|
|
213
|
+
children: p("cancel")
|
|
214
|
+
}), /* @__PURE__ */ w(h, {
|
|
226
215
|
type: "submit",
|
|
227
216
|
variant: "primary",
|
|
228
217
|
disabled: !N.trim() || !L.trim(),
|
|
229
218
|
loading: $,
|
|
230
|
-
children: M ? f("saveAndSupersede") :
|
|
219
|
+
children: M ? f("saveAndSupersede") : p("save")
|
|
231
220
|
})] }),
|
|
232
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ T("div", {
|
|
233
222
|
className: "space-y-3",
|
|
234
223
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ T("label", {
|
|
236
225
|
className: "block text-xs font-medium text-muted-foreground",
|
|
237
|
-
children: [f("name"), /* @__PURE__ */
|
|
226
|
+
children: [f("name"), /* @__PURE__ */ w(v, {
|
|
238
227
|
value: N,
|
|
239
228
|
onChange: (e) => se(e.target.value),
|
|
240
229
|
maxLength: 100,
|
|
@@ -242,29 +231,29 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
242
231
|
className: "mt-1"
|
|
243
232
|
})]
|
|
244
233
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ T("label", {
|
|
246
235
|
className: "block text-xs font-medium text-muted-foreground",
|
|
247
|
-
children: [f("aliases"), /* @__PURE__ */
|
|
236
|
+
children: [f("aliases"), /* @__PURE__ */ w(v, {
|
|
248
237
|
value: P,
|
|
249
238
|
onChange: (e) => ce(e.target.value),
|
|
250
239
|
placeholder: f("aliasesPlaceholder"),
|
|
251
240
|
className: "mt-1"
|
|
252
241
|
})]
|
|
253
242
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ T("div", {
|
|
255
244
|
className: "flex flex-wrap gap-2",
|
|
256
245
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ w(y, {
|
|
258
247
|
"aria-label": f("kindLabel"),
|
|
259
248
|
width: "content",
|
|
260
249
|
value: F,
|
|
261
250
|
onValueChange: le,
|
|
262
|
-
items:
|
|
251
|
+
items: ee.map((e) => ({
|
|
263
252
|
value: e,
|
|
264
253
|
label: f(`kind.${e}`)
|
|
265
254
|
}))
|
|
266
255
|
}),
|
|
267
|
-
!
|
|
256
|
+
!O && F !== "term" && /* @__PURE__ */ w(y, {
|
|
268
257
|
"aria-label": f("statusLabel"),
|
|
269
258
|
width: "content",
|
|
270
259
|
value: I,
|
|
@@ -277,7 +266,7 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
277
266
|
label: f("status.decided")
|
|
278
267
|
}]
|
|
279
268
|
}),
|
|
280
|
-
!
|
|
269
|
+
!O && /* @__PURE__ */ w(y, {
|
|
281
270
|
"aria-label": f("spaceLabel"),
|
|
282
271
|
width: "content",
|
|
283
272
|
value: R,
|
|
@@ -286,27 +275,27 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
286
275
|
},
|
|
287
276
|
items: [{
|
|
288
277
|
value: "",
|
|
289
|
-
label:
|
|
290
|
-
}, ...
|
|
278
|
+
label: x.name
|
|
279
|
+
}, ...b.filter((e) => !e.archivedAt).map((e) => ({
|
|
291
280
|
value: e.key,
|
|
292
281
|
label: e.name
|
|
293
282
|
}))]
|
|
294
283
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ w(g, {
|
|
296
285
|
items: [{
|
|
297
286
|
value: "",
|
|
298
287
|
label: d("noArea")
|
|
299
|
-
}, ...V.filter((e) => !e.teamId || e.teamId ===
|
|
288
|
+
}, ...V.filter((e) => !e.teamId || e.teamId === H).map((e) => ({
|
|
300
289
|
value: e.id,
|
|
301
290
|
label: e.title
|
|
302
291
|
}))],
|
|
303
292
|
value: z,
|
|
304
293
|
onValueChange: (e) => e !== null && B(e),
|
|
305
294
|
placeholder: d("area"),
|
|
306
|
-
trigger: /* @__PURE__ */
|
|
295
|
+
trigger: /* @__PURE__ */ T(h, {
|
|
307
296
|
type: "button",
|
|
308
297
|
"aria-label": d("area"),
|
|
309
|
-
children: [/* @__PURE__ */
|
|
298
|
+
children: [/* @__PURE__ */ w(l, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ w("span", {
|
|
310
299
|
className: "text-muted-foreground",
|
|
311
300
|
children: d("noArea")
|
|
312
301
|
})]
|
|
@@ -314,9 +303,9 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
314
303
|
})
|
|
315
304
|
]
|
|
316
305
|
}),
|
|
317
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ T("label", {
|
|
318
307
|
className: "block text-xs font-medium text-muted-foreground",
|
|
319
|
-
children: [f("definition"), /* @__PURE__ */
|
|
308
|
+
children: [f("definition"), /* @__PURE__ */ w(re, {
|
|
320
309
|
value: L,
|
|
321
310
|
onChange: (e) => de(e.target.value),
|
|
322
311
|
maxLength: 1e3,
|
|
@@ -326,45 +315,45 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
326
315
|
className: "mt-1"
|
|
327
316
|
})]
|
|
328
317
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ T("fieldset", {
|
|
330
319
|
className: "space-y-2",
|
|
331
320
|
children: [
|
|
332
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ w("legend", {
|
|
333
322
|
className: "text-xs font-medium text-muted-foreground",
|
|
334
323
|
children: f("source")
|
|
335
324
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ T("div", {
|
|
337
326
|
className: "flex flex-wrap items-center gap-2",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
339
|
-
open:
|
|
340
|
-
onOpenChange:
|
|
327
|
+
children: [/* @__PURE__ */ w(g, {
|
|
328
|
+
open: J,
|
|
329
|
+
onOpenChange: he,
|
|
341
330
|
items: [{
|
|
342
331
|
value: "",
|
|
343
332
|
label: f("noDoc")
|
|
344
|
-
}, ...
|
|
333
|
+
}, ..._e.map((e) => ({
|
|
345
334
|
value: e.key,
|
|
346
335
|
label: e.title,
|
|
347
|
-
icon: /* @__PURE__ */
|
|
336
|
+
icon: /* @__PURE__ */ w(u, { className: "size-3.5" })
|
|
348
337
|
}))],
|
|
349
|
-
value:
|
|
338
|
+
value: W,
|
|
350
339
|
onValueChange: (e) => {
|
|
351
|
-
e !== null && (
|
|
340
|
+
e !== null && (pe(e), K(""));
|
|
352
341
|
},
|
|
353
|
-
onQueryChange:
|
|
342
|
+
onQueryChange: ge,
|
|
354
343
|
placeholder: f("chooseDoc"),
|
|
355
|
-
trigger: /* @__PURE__ */
|
|
344
|
+
trigger: /* @__PURE__ */ T(h, {
|
|
356
345
|
type: "button",
|
|
357
346
|
className: "max-w-56",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ w(u, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ w("span", {
|
|
359
348
|
className: "truncate",
|
|
360
349
|
children: ye?.title ?? f("chooseDoc")
|
|
361
350
|
})]
|
|
362
351
|
})
|
|
363
|
-
}),
|
|
352
|
+
}), W && /* @__PURE__ */ w(y, {
|
|
364
353
|
"aria-label": f("section"),
|
|
365
354
|
width: "content",
|
|
366
|
-
value:
|
|
367
|
-
onValueChange:
|
|
355
|
+
value: G,
|
|
356
|
+
onValueChange: K,
|
|
368
357
|
items: [
|
|
369
358
|
{
|
|
370
359
|
value: "",
|
|
@@ -374,25 +363,25 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
374
363
|
value: e.text,
|
|
375
364
|
label: e.text
|
|
376
365
|
})),
|
|
377
|
-
...
|
|
378
|
-
value:
|
|
379
|
-
label:
|
|
366
|
+
...G && !Q.some((e) => e.text === G) ? [{
|
|
367
|
+
value: G,
|
|
368
|
+
label: G
|
|
380
369
|
}] : []
|
|
381
370
|
]
|
|
382
371
|
})]
|
|
383
372
|
}),
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
value:
|
|
386
|
-
onChange: (e) =>
|
|
373
|
+
/* @__PURE__ */ w(v, {
|
|
374
|
+
value: q,
|
|
375
|
+
onChange: (e) => me(e.target.value),
|
|
387
376
|
placeholder: f("issuePlaceholder"),
|
|
388
377
|
"aria-label": f("issue"),
|
|
389
378
|
className: "max-w-40"
|
|
390
379
|
})
|
|
391
380
|
]
|
|
392
381
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ w(_, { children: ve })
|
|
394
383
|
]
|
|
395
384
|
})
|
|
396
385
|
});
|
|
397
386
|
}
|
|
398
|
-
export { N as EntryDialog,
|
|
387
|
+
export { N as EntryDialog, j as useKnowledgeActions, M as useKnowledgeMenu, A as useTermRefs };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/lib/knowledgeKinds.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"term",
|
|
4
|
+
"decision",
|
|
5
|
+
"system",
|
|
6
|
+
"role"
|
|
7
|
+
];
|
|
8
|
+
function t(e, t) {
|
|
9
|
+
return `/${e}/knowledge/${encodeURIComponent(t)}`;
|
|
10
|
+
}
|
|
11
|
+
function n(e) {
|
|
12
|
+
return e.slug || e.id;
|
|
13
|
+
}
|
|
14
|
+
export { t as entryPath, e as kinds, n as termRef };
|
package/lib/projectList.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { healthStates as e, projectStatuses as t } from "
|
|
1
|
+
import { healthStates as e, projectStatuses as t } from "./projectStates.js";
|
|
2
2
|
// src/lib/projectList.ts
|
|
3
3
|
var n = (e) => e ? "tandem-team-projects-layout" : "tandem-projects-layout";
|
|
4
4
|
function r(e) {
|
package/lib/router.js
CHANGED
|
@@ -1,51 +1,37 @@
|
|
|
1
|
-
import { appPath as e,
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { appPath as e, routerPath as t } from "./base.js";
|
|
2
|
+
import * as n from "@tanstack/react-router";
|
|
3
|
+
import { useCallback as r } from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
5
|
// src/lib/router.tsx
|
|
6
|
-
function
|
|
7
|
-
return typeof e == "string" && e.startsWith("/") ?
|
|
6
|
+
function a(e) {
|
|
7
|
+
return typeof e == "string" && e.startsWith("/") ? t(e) : e;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var o = ((e) => /* @__PURE__ */ i(n.Link, {
|
|
10
10
|
preload: "intent",
|
|
11
11
|
...e,
|
|
12
|
-
...e.to !== void 0 && { to:
|
|
13
|
-
...typeof e.to == "string" && r(e.to) && { reloadDocument: !0 }
|
|
12
|
+
...e.to !== void 0 && { to: a(e.to) }
|
|
14
13
|
}));
|
|
15
|
-
function
|
|
16
|
-
let { to:
|
|
17
|
-
|
|
18
|
-
let n = new URLSearchParams(Object.entries(e.search ?? {}).flatMap(([e, t]) => t === void 0 ? [] : [[e, String(t)]])).toString();
|
|
19
|
-
return {
|
|
20
|
-
...e,
|
|
21
|
-
to: void 0,
|
|
22
|
-
href: t + i + (n ? `?${n}` : ""),
|
|
23
|
-
reloadDocument: !0
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
return typeof a == "string" && a.startsWith("/") ? r(a) ? {
|
|
27
|
-
...e,
|
|
28
|
-
href: t + a,
|
|
29
|
-
reloadDocument: !0
|
|
30
|
-
} : {
|
|
14
|
+
function s(e) {
|
|
15
|
+
let { to: n, href: r } = e;
|
|
16
|
+
return typeof r == "string" && r.startsWith("/") ? {
|
|
31
17
|
...e,
|
|
32
|
-
href:
|
|
18
|
+
href: t(r)
|
|
33
19
|
} : {
|
|
34
20
|
...e,
|
|
35
|
-
to:
|
|
21
|
+
to: a(n)
|
|
36
22
|
};
|
|
37
23
|
}
|
|
38
|
-
var
|
|
39
|
-
let t =
|
|
40
|
-
return
|
|
41
|
-
},
|
|
24
|
+
var c = (e) => {
|
|
25
|
+
let t = n.useNavigate(e);
|
|
26
|
+
return r((e) => t(s(e)), [t]);
|
|
27
|
+
}, l = (e) => n.redirect(s(e)), u = (t) => n.useLocation({ select: (n) => {
|
|
42
28
|
let r = {
|
|
43
29
|
...n,
|
|
44
30
|
pathname: e(n.pathname)
|
|
45
31
|
};
|
|
46
32
|
return t?.select ? t.select(r) : r;
|
|
47
33
|
} });
|
|
48
|
-
function
|
|
49
|
-
return
|
|
34
|
+
function d() {
|
|
35
|
+
return n.useRouterState({ select: (t) => e(t.location.pathname) });
|
|
50
36
|
}
|
|
51
|
-
export {
|
|
37
|
+
export { o as Link, l as redirect, u as useLocation, c as useNavigate, d as usePathname };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/tandem-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.139.0",
|
|
4
4
|
"description": "Tandem's pages, for a host app to render in its own",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"yjs": "^13.6.33"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@parallelworks/ui": "
|
|
52
|
-
"@tanstack/react-router": "^1.170.
|
|
53
|
-
"react": "^19.3.
|
|
54
|
-
"react-dom": "^19.3.
|
|
55
|
-
"use-intl": "^4.14.
|
|
51
|
+
"@parallelworks/ui": ">=0.105.0 <1",
|
|
52
|
+
"@tanstack/react-router": "^1.170.0",
|
|
53
|
+
"react": "^19.3.0",
|
|
54
|
+
"react-dom": "^19.3.0",
|
|
55
|
+
"use-intl": "^4.14.0"
|
|
56
56
|
}
|
|
57
57
|
}
|