@parallelworks/tandem-web 0.164.0 → 0.164.1
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 +4 -9
- package/_virtual/_virtual_i18n/es/common.js +4 -9
- package/_virtual/_virtual_i18n/ja/common.js +4 -9
- package/_virtual/_virtual_i18n/ko/common.js +4 -9
- package/_virtual/_virtual_i18n/zh/common.js +4 -9
- package/components/AgentWork.js +358 -396
- package/components/AreaWork.js +37 -36
- package/components/Graph.js +1 -1
- package/components/HoverCards.js +3 -3
- package/components/WorkCounts.js +1 -1
- package/lib/knowledge.js +97 -119
- package/package.json +1 -1
- package/pages/areas.js +115 -119
- package/routes/_workspace/graph.js +1 -1
- package/routes/_workspace/knowledge/_term2.js +9 -9
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace2.js +12 -12
- package/lib/decisionEntry.js +0 -23
package/components/AreaWork.js
CHANGED
|
@@ -2,14 +2,15 @@ import { Link as e } from "../lib/router.js";
|
|
|
2
2
|
import { ChevronRightIcon as t } from "./icons.js";
|
|
3
3
|
import { termRef as n } from "../lib/knowledgeKinds.js";
|
|
4
4
|
import { AnsweredDecision as r } from "./AgentWork.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { KnowledgeStatus as i } from "./HoverCards.js";
|
|
6
|
+
import { useState as a } from "react";
|
|
7
|
+
import { useTranslations as o } from "use-intl";
|
|
8
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
9
|
// src/components/AreaWork.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
let l =
|
|
12
|
-
return /* @__PURE__ */
|
|
10
|
+
var l = (...e) => e.filter(Boolean).join(" ");
|
|
11
|
+
function u({ workspace: t, entry: r, isNew: a }) {
|
|
12
|
+
let l = o("knowledge"), u = o("areaPage");
|
|
13
|
+
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
|
|
13
14
|
to: "/$workspace/knowledge/$term",
|
|
14
15
|
params: {
|
|
15
16
|
workspace: t,
|
|
@@ -17,89 +18,89 @@ function l({ workspace: t, entry: r, isNew: i }) {
|
|
|
17
18
|
},
|
|
18
19
|
className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
|
|
19
20
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ s("span", {
|
|
21
22
|
className: "shrink-0 font-medium",
|
|
22
23
|
children: r.name
|
|
23
24
|
}),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ s("span", {
|
|
25
26
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
26
27
|
children: l(`kind.${r.kind}`)
|
|
27
28
|
}),
|
|
28
|
-
r.definition !== r.name && /* @__PURE__ */
|
|
29
|
+
r.definition !== r.name && /* @__PURE__ */ s("span", {
|
|
29
30
|
className: "min-w-0 truncate text-muted-foreground",
|
|
30
31
|
children: r.definition
|
|
31
32
|
}),
|
|
32
|
-
r.status === "
|
|
33
|
-
className: "ml-auto shrink-0
|
|
34
|
-
children:
|
|
33
|
+
r.status === "added" && /* @__PURE__ */ s("span", {
|
|
34
|
+
className: "ml-auto shrink-0",
|
|
35
|
+
children: /* @__PURE__ */ s(i, { status: r.status })
|
|
35
36
|
}),
|
|
36
|
-
|
|
37
|
-
className:
|
|
37
|
+
a && /* @__PURE__ */ s("span", {
|
|
38
|
+
className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
|
|
38
39
|
children: u("new")
|
|
39
40
|
})
|
|
40
41
|
]
|
|
41
42
|
}) });
|
|
42
43
|
}
|
|
43
|
-
var
|
|
44
|
-
function
|
|
45
|
-
let f =
|
|
46
|
-
return /* @__PURE__ */
|
|
44
|
+
var d = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
45
|
+
function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
|
|
46
|
+
let f = o("areaPage"), [p, m] = a(!1), h = [n.options.find((e) => e.id === n.answer?.optionId)?.label, n.answer?.text && d(n.answer.text)].filter(Boolean).join(". ");
|
|
47
|
+
return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("button", {
|
|
47
48
|
type: "button",
|
|
48
49
|
"aria-expanded": p,
|
|
49
50
|
onClick: () => m((e) => !e),
|
|
50
51
|
className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ s(t, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
|
|
54
|
+
/* @__PURE__ */ s("span", {
|
|
54
55
|
className: "min-w-0 truncate text-muted-foreground",
|
|
55
|
-
children:
|
|
56
|
+
children: d(n.prompt)
|
|
56
57
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ s("span", {
|
|
58
59
|
className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
|
|
59
60
|
children: h
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ c("span", {
|
|
62
63
|
className: "ml-auto flex shrink-0 items-center gap-2",
|
|
63
|
-
children: [
|
|
64
|
+
children: [u && /* @__PURE__ */ s("span", {
|
|
64
65
|
className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
65
66
|
children: f("notInDocs")
|
|
66
|
-
}),
|
|
67
|
+
}), i && /* @__PURE__ */ s("span", {
|
|
67
68
|
className: "text-[11px] font-medium text-primary",
|
|
68
69
|
children: f("new")
|
|
69
70
|
})]
|
|
70
71
|
})
|
|
71
72
|
]
|
|
72
|
-
}), p && /* @__PURE__ */
|
|
73
|
+
}), p && /* @__PURE__ */ s("div", {
|
|
73
74
|
className: "px-3 pb-3",
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ s(r, {
|
|
75
76
|
workspace: e,
|
|
76
77
|
decision: n,
|
|
77
78
|
showIssue: !0
|
|
78
79
|
})
|
|
79
80
|
})] });
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
return /* @__PURE__ */
|
|
82
|
+
function p({ title: e, count: t, icon: n, extra: r, action: i, bare: a = !1, children: o }) {
|
|
83
|
+
return /* @__PURE__ */ c("section", {
|
|
83
84
|
"aria-label": e,
|
|
84
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
85
86
|
className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
|
|
86
87
|
children: [
|
|
87
88
|
n,
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ s("span", {
|
|
89
90
|
className: "truncate",
|
|
90
91
|
children: e
|
|
91
92
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ s("span", {
|
|
93
94
|
className: "text-muted-foreground tabular-nums",
|
|
94
95
|
children: t
|
|
95
96
|
}),
|
|
96
97
|
r,
|
|
97
|
-
i && /* @__PURE__ */
|
|
98
|
+
i && /* @__PURE__ */ s("span", {
|
|
98
99
|
className: "ml-auto flex",
|
|
99
100
|
children: i
|
|
100
101
|
})
|
|
101
102
|
]
|
|
102
|
-
}), t > 0 && (a ?
|
|
103
|
+
}), t > 0 && (a ? o : /* @__PURE__ */ s("ul", { children: o }))]
|
|
103
104
|
});
|
|
104
105
|
}
|
|
105
|
-
export {
|
|
106
|
+
export { p as AreaGroup, f as FoldedAnswer, u as KnowledgeRow };
|
package/components/Graph.js
CHANGED
|
@@ -13,7 +13,7 @@ import w from "@dagrejs/dagre";
|
|
|
13
13
|
import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowProvider as k, useReactFlow as A } from "@xyflow/react";
|
|
14
14
|
import "@xyflow/react/dist/style.css";
|
|
15
15
|
// src/components/Graph.tsx
|
|
16
|
-
var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "
|
|
16
|
+
var j = 196, M = 48, N = 22, P = (e) => e.kind === "doc" ? "bg-primary" : e.kind === "issue" ? e.status === "completed" || e.status === "canceled" ? "bg-muted-foreground/50" : "bg-primary" : e.status === "decided" ? "bg-success" : e.status === "added" ? "bg-warning" : "bg-muted-foreground/50", F = {
|
|
17
17
|
doc: s,
|
|
18
18
|
issue: l,
|
|
19
19
|
entry: c
|
package/components/HoverCards.js
CHANGED
|
@@ -177,8 +177,8 @@ function z({ workspace: n }) {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
var B = {
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
decided: "success",
|
|
181
|
+
added: "info"
|
|
182
182
|
};
|
|
183
183
|
function V({ status: e }) {
|
|
184
184
|
let t = k("knowledge.status");
|
|
@@ -216,7 +216,7 @@ function H({ workspace: e, entry: t }) {
|
|
|
216
216
|
className: "text-xs text-muted-foreground",
|
|
217
217
|
children: r(`kind.${t.kind}`)
|
|
218
218
|
}),
|
|
219
|
-
(t.kind !== "term" || t.status
|
|
219
|
+
(t.kind !== "term" || t.status !== "decided") && /* @__PURE__ */ j("span", {
|
|
220
220
|
className: "ml-auto",
|
|
221
221
|
children: /* @__PURE__ */ j(V, { status: t.status })
|
|
222
222
|
})
|
package/components/WorkCounts.js
CHANGED
|
@@ -12,7 +12,7 @@ function s({ counts: s, teamId: c, className: l = "" }) {
|
|
|
12
12
|
enabled: !!d
|
|
13
13
|
});
|
|
14
14
|
if (!s) return null;
|
|
15
|
-
let p = f.find((e) => e.id === c)?.key, m = s.
|
|
15
|
+
let p = f.find((e) => e.id === c)?.key, m = s.proposedAreas, h = [
|
|
16
16
|
s.decisions > 0 && {
|
|
17
17
|
key: "decisions",
|
|
18
18
|
label: u("decisions", { count: s.decisions }),
|
package/lib/knowledge.js
CHANGED
|
@@ -5,23 +5,23 @@ import { areasQuery as r, docQuery as i, docsQuery as a, knowledgeQuery as o, te
|
|
|
5
5
|
import { copyItem as l, useLinkItems as u } from "./menus.js";
|
|
6
6
|
import { AreaIcon as ee, FileTextIcon as d } from "../components/icons.js";
|
|
7
7
|
import { headings as te } from "./glossary.js";
|
|
8
|
-
import { entryPath as f, kinds as
|
|
9
|
-
import { Button as
|
|
10
|
-
import { useCallback as
|
|
11
|
-
import { useErrorMessage as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { keepPreviousData as
|
|
8
|
+
import { entryPath as f, kinds as p, termRef as m } from "./knowledgeKinds.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";
|
|
11
|
+
import { useErrorMessage as ie } from "@parallelworks/problem/react";
|
|
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";
|
|
15
15
|
// src/lib/knowledge.tsx
|
|
16
|
-
function
|
|
17
|
-
let { data: t } =
|
|
18
|
-
return
|
|
16
|
+
function A(e) {
|
|
17
|
+
let { data: t } = D(o(e));
|
|
18
|
+
return x((e) => {
|
|
19
19
|
let n = t?.find((t) => t.id === e);
|
|
20
|
-
return n ?
|
|
20
|
+
return n ? m(n) : e;
|
|
21
21
|
}, [t]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let r =
|
|
23
|
+
function j(n) {
|
|
24
|
+
let r = O(), i = () => {
|
|
25
25
|
r.invalidateQueries({ queryKey: [
|
|
26
26
|
"workspace",
|
|
27
27
|
n,
|
|
@@ -40,47 +40,47 @@ function A(n) {
|
|
|
40
40
|
entry: e
|
|
41
41
|
} });
|
|
42
42
|
return {
|
|
43
|
-
create:
|
|
43
|
+
create: E({
|
|
44
44
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge", {
|
|
45
45
|
params: { path: { workspace: n } },
|
|
46
46
|
body: r
|
|
47
47
|
})),
|
|
48
48
|
onSettled: i
|
|
49
49
|
}),
|
|
50
|
-
update:
|
|
50
|
+
update: E({
|
|
51
51
|
mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/knowledge/{entry}", {
|
|
52
52
|
params: a(n),
|
|
53
53
|
body: r
|
|
54
54
|
})),
|
|
55
55
|
onSettled: i
|
|
56
56
|
}),
|
|
57
|
-
supersede:
|
|
57
|
+
supersede: E({
|
|
58
58
|
mutationFn: async ({ id: n, by: r }) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/supersede", {
|
|
59
59
|
params: a(n),
|
|
60
60
|
body: { by: r }
|
|
61
61
|
})),
|
|
62
62
|
onSettled: i
|
|
63
63
|
}),
|
|
64
|
-
archive:
|
|
64
|
+
archive: E({
|
|
65
65
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/archive", { params: a(n) })),
|
|
66
66
|
onSettled: i
|
|
67
67
|
}),
|
|
68
|
-
restore:
|
|
68
|
+
restore: E({
|
|
69
69
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/knowledge/{entry}/restore", { params: a(n) })),
|
|
70
70
|
onSettled: i
|
|
71
71
|
})
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
let r =
|
|
76
|
-
return
|
|
77
|
-
let c = [...o(f(e,
|
|
74
|
+
function M(e, t) {
|
|
75
|
+
let r = C("knowledge"), i = C("common"), a = j(e), o = u(), s = n();
|
|
76
|
+
return x((n) => {
|
|
77
|
+
let c = [...o(f(e, m(n))), l(i("copyName"), n.name)], u = {
|
|
78
78
|
label: i("open"),
|
|
79
79
|
onClick: () => s({
|
|
80
80
|
to: "/$workspace/knowledge/$term",
|
|
81
81
|
params: {
|
|
82
82
|
workspace: e,
|
|
83
|
-
term:
|
|
83
|
+
term: m(n)
|
|
84
84
|
}
|
|
85
85
|
})
|
|
86
86
|
};
|
|
@@ -90,7 +90,7 @@ function j(e, t) {
|
|
|
90
90
|
label: r("restore"),
|
|
91
91
|
onClick: () => a.restore.mutate(n.id)
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
b,
|
|
94
94
|
...c
|
|
95
95
|
] : [
|
|
96
96
|
u,
|
|
@@ -107,19 +107,13 @@ function j(e, t) {
|
|
|
107
107
|
id: n.id,
|
|
108
108
|
status: "decided"
|
|
109
109
|
})
|
|
110
|
-
}] : n.
|
|
111
|
-
label: r("
|
|
110
|
+
}] : n.status === "added" ? [{
|
|
111
|
+
label: r("confirm"),
|
|
112
112
|
onClick: () => a.update.mutate({
|
|
113
113
|
id: n.id,
|
|
114
114
|
status: "decided"
|
|
115
115
|
})
|
|
116
|
-
} :
|
|
117
|
-
label: r("markProposed"),
|
|
118
|
-
onClick: () => a.update.mutate({
|
|
119
|
-
id: n.id,
|
|
120
|
-
status: "proposed"
|
|
121
|
-
})
|
|
122
|
-
}],
|
|
116
|
+
}] : [],
|
|
123
117
|
...n.status === "superseded" ? [] : [{
|
|
124
118
|
label: r("supersede"),
|
|
125
119
|
onClick: () => t({
|
|
@@ -127,14 +121,13 @@ function j(e, t) {
|
|
|
127
121
|
supersedes: n,
|
|
128
122
|
defaults: {
|
|
129
123
|
kind: n.kind,
|
|
130
|
-
status: "decided",
|
|
131
124
|
name: n.name
|
|
132
125
|
}
|
|
133
126
|
})
|
|
134
127
|
}],
|
|
135
|
-
|
|
128
|
+
b,
|
|
136
129
|
...c,
|
|
137
|
-
|
|
130
|
+
b,
|
|
138
131
|
{
|
|
139
132
|
label: r("archive"),
|
|
140
133
|
destructive: !0,
|
|
@@ -151,137 +144,122 @@ function j(e, t) {
|
|
|
151
144
|
i
|
|
152
145
|
]);
|
|
153
146
|
}
|
|
154
|
-
function
|
|
155
|
-
let l =
|
|
147
|
+
function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
148
|
+
let l = C("planning"), u = C("knowledge"), f = 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, P] = S(O?.name ?? A.name ?? ""), [F, se] = S((O?.aliases ?? A.aliases ?? []).join(", ")), [I, ce] = S(O?.kind ?? A.kind ?? "term"), [L, le] = S(O?.definition ?? A.definition ?? ""), [R, ue] = 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, de] = S(O?.source.doc?.key ?? A.source?.doc ?? ""), [G, K] = S(O?.source.section ?? A.source?.section ?? ""), [q, fe] = S(O?.source.identifier ?? A.source?.issue ?? ""), [J, pe] = S(!1), [Y, me] = S(""), { data: he = [] } = D({
|
|
156
149
|
...a(e, Y ? { title: Y } : {
|
|
157
150
|
top: !0,
|
|
158
151
|
limit: 20
|
|
159
152
|
}),
|
|
160
153
|
enabled: J,
|
|
161
|
-
placeholderData:
|
|
162
|
-
}), [
|
|
154
|
+
placeholderData: oe
|
|
155
|
+
}), [ge, X] = S(null), { data: Z } = D({
|
|
163
156
|
...i(e, W),
|
|
164
157
|
enabled: !!W
|
|
165
|
-
}),
|
|
158
|
+
}), _e = Z ?? (O?.source.doc?.key === W ? O.source.doc : void 0), Q = te(Z?.body ?? ""), $ = E.create.isPending || E.update.isPending || E.supersede.isPending, ve = async () => {
|
|
166
159
|
X(null);
|
|
167
160
|
let e = {
|
|
168
161
|
...W && { doc: W },
|
|
169
162
|
...W && G && { section: G },
|
|
170
|
-
...q.trim() && { issue: q.trim() }
|
|
171
|
-
|
|
172
|
-
}, t = N.split(",").map((e) => e.trim()).filter(Boolean);
|
|
163
|
+
...q.trim() && { issue: q.trim() }
|
|
164
|
+
}, t = F.split(",").map((e) => e.trim()).filter(Boolean);
|
|
173
165
|
try {
|
|
174
166
|
let r;
|
|
175
|
-
|
|
176
|
-
id:
|
|
177
|
-
name:
|
|
167
|
+
O ? r = await E.update.mutateAsync({
|
|
168
|
+
id: O.id,
|
|
169
|
+
name: N,
|
|
178
170
|
aliases: t,
|
|
179
|
-
kind:
|
|
171
|
+
kind: I,
|
|
180
172
|
definition: L,
|
|
181
173
|
...(!z || U) && { area: U },
|
|
182
174
|
source: e,
|
|
183
|
-
ifVersion:
|
|
184
|
-
}) : (r = await
|
|
185
|
-
name:
|
|
175
|
+
ifVersion: O.version
|
|
176
|
+
}) : (r = await E.create.mutateAsync({
|
|
177
|
+
name: N,
|
|
186
178
|
aliases: t,
|
|
187
|
-
kind:
|
|
188
|
-
status: I,
|
|
179
|
+
kind: I,
|
|
189
180
|
definition: L,
|
|
190
181
|
...R && { team: R },
|
|
191
182
|
...U && { area: U },
|
|
192
183
|
source: e
|
|
193
|
-
}),
|
|
194
|
-
id:
|
|
184
|
+
}), M && await E.supersede.mutateAsync({
|
|
185
|
+
id: M.id,
|
|
195
186
|
by: r.id
|
|
196
187
|
})), o?.(r), n();
|
|
197
188
|
} catch (e) {
|
|
198
|
-
X(
|
|
189
|
+
X(m(e));
|
|
199
190
|
}
|
|
200
|
-
},
|
|
201
|
-
return /* @__PURE__ */
|
|
191
|
+
}, ye = O ? u("editTitle", { name: O.name }) : M ? u("supersedeTitle", { name: M.name }) : u("newTitle");
|
|
192
|
+
return /* @__PURE__ */ w(ne, {
|
|
202
193
|
open: !0,
|
|
203
194
|
onClose: n,
|
|
204
195
|
dismissible: !$,
|
|
205
196
|
size: "lg",
|
|
206
|
-
title:
|
|
207
|
-
description:
|
|
208
|
-
onSubmit: () =>
|
|
209
|
-
footer: /* @__PURE__ */
|
|
197
|
+
title: ye,
|
|
198
|
+
description: M ? u("supersedeHint") : void 0,
|
|
199
|
+
onSubmit: () => ve(),
|
|
200
|
+
footer: /* @__PURE__ */ T(ae, { children: [/* @__PURE__ */ w(h, {
|
|
210
201
|
type: "button",
|
|
211
202
|
variant: "ghost",
|
|
212
203
|
onClick: n,
|
|
213
204
|
children: f("cancel")
|
|
214
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ w(h, {
|
|
215
206
|
type: "submit",
|
|
216
207
|
variant: "primary",
|
|
217
|
-
disabled: !
|
|
208
|
+
disabled: !N.trim() || !L.trim(),
|
|
218
209
|
loading: $,
|
|
219
|
-
children:
|
|
210
|
+
children: M ? u("saveAndSupersede") : f("save")
|
|
220
211
|
})] }),
|
|
221
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ T("div", {
|
|
222
213
|
className: "space-y-3",
|
|
223
214
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ T("label", {
|
|
225
216
|
className: "block text-xs font-medium text-muted-foreground",
|
|
226
|
-
children: [u("name"), /* @__PURE__ */
|
|
227
|
-
value:
|
|
228
|
-
onChange: (e) =>
|
|
217
|
+
children: [u("name"), /* @__PURE__ */ w(v, {
|
|
218
|
+
value: N,
|
|
219
|
+
onChange: (e) => P(e.target.value),
|
|
229
220
|
maxLength: 100,
|
|
230
221
|
required: !0,
|
|
231
222
|
className: "mt-1"
|
|
232
223
|
})]
|
|
233
224
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ T("label", {
|
|
235
226
|
className: "block text-xs font-medium text-muted-foreground",
|
|
236
|
-
children: [u("aliases"), /* @__PURE__ */
|
|
237
|
-
value:
|
|
238
|
-
onChange: (e) =>
|
|
227
|
+
children: [u("aliases"), /* @__PURE__ */ w(v, {
|
|
228
|
+
value: F,
|
|
229
|
+
onChange: (e) => se(e.target.value),
|
|
239
230
|
placeholder: u("aliasesPlaceholder"),
|
|
240
231
|
className: "mt-1"
|
|
241
232
|
})]
|
|
242
233
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ T("div", {
|
|
244
235
|
className: "flex flex-wrap gap-2",
|
|
245
236
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ w(y, {
|
|
247
238
|
"aria-label": u("kindLabel"),
|
|
248
239
|
width: "content",
|
|
249
|
-
value:
|
|
250
|
-
onValueChange:
|
|
251
|
-
items:
|
|
240
|
+
value: I,
|
|
241
|
+
onValueChange: ce,
|
|
242
|
+
items: p.map((e) => ({
|
|
252
243
|
value: e,
|
|
253
244
|
label: u(`kind.${e}`)
|
|
254
245
|
}))
|
|
255
246
|
}),
|
|
256
|
-
!
|
|
257
|
-
"aria-label": u("statusLabel"),
|
|
258
|
-
width: "content",
|
|
259
|
-
value: I,
|
|
260
|
-
onValueChange: ue,
|
|
261
|
-
items: [{
|
|
262
|
-
value: "proposed",
|
|
263
|
-
label: u("status.proposed")
|
|
264
|
-
}, {
|
|
265
|
-
value: "decided",
|
|
266
|
-
label: u("status.decided")
|
|
267
|
-
}]
|
|
268
|
-
}),
|
|
269
|
-
!D && /* @__PURE__ */ C(v, {
|
|
247
|
+
!O && /* @__PURE__ */ w(y, {
|
|
270
248
|
"aria-label": u("spaceLabel"),
|
|
271
249
|
width: "content",
|
|
272
250
|
value: R,
|
|
273
251
|
onValueChange: (e) => {
|
|
274
|
-
|
|
252
|
+
ue(e), B("");
|
|
275
253
|
},
|
|
276
254
|
items: [{
|
|
277
255
|
value: "",
|
|
278
|
-
label:
|
|
279
|
-
}, ...
|
|
256
|
+
label: x.name
|
|
257
|
+
}, ...b.filter((e) => !e.archivedAt).map((e) => ({
|
|
280
258
|
value: e.key,
|
|
281
259
|
label: e.name
|
|
282
260
|
}))]
|
|
283
261
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ w(g, {
|
|
285
263
|
items: [{
|
|
286
264
|
value: "",
|
|
287
265
|
label: l("noArea")
|
|
@@ -292,10 +270,10 @@ function M({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
292
270
|
value: z,
|
|
293
271
|
onValueChange: (e) => e !== null && B(e),
|
|
294
272
|
placeholder: l("area"),
|
|
295
|
-
trigger: /* @__PURE__ */
|
|
273
|
+
trigger: /* @__PURE__ */ T(h, {
|
|
296
274
|
type: "button",
|
|
297
275
|
"aria-label": l("area"),
|
|
298
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ w(ee, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ w("span", {
|
|
299
277
|
className: "text-muted-foreground",
|
|
300
278
|
children: l("noArea")
|
|
301
279
|
})]
|
|
@@ -303,11 +281,11 @@ function M({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
303
281
|
})
|
|
304
282
|
]
|
|
305
283
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ T("label", {
|
|
307
285
|
className: "block text-xs font-medium text-muted-foreground",
|
|
308
|
-
children: [u("definition"), /* @__PURE__ */
|
|
286
|
+
children: [u("definition"), /* @__PURE__ */ w(re, {
|
|
309
287
|
value: L,
|
|
310
|
-
onChange: (e) =>
|
|
288
|
+
onChange: (e) => le(e.target.value),
|
|
311
289
|
maxLength: 1e3,
|
|
312
290
|
required: !0,
|
|
313
291
|
rows: 3,
|
|
@@ -315,41 +293,41 @@ function M({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
315
293
|
className: "mt-1"
|
|
316
294
|
})]
|
|
317
295
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ T("fieldset", {
|
|
319
297
|
className: "space-y-2",
|
|
320
298
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ w("legend", {
|
|
322
300
|
className: "text-xs font-medium text-muted-foreground",
|
|
323
301
|
children: u("source")
|
|
324
302
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ T("div", {
|
|
326
304
|
className: "flex flex-wrap items-center gap-2",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ w(g, {
|
|
328
306
|
open: J,
|
|
329
|
-
onOpenChange:
|
|
307
|
+
onOpenChange: pe,
|
|
330
308
|
items: [{
|
|
331
309
|
value: "",
|
|
332
310
|
label: u("noDoc")
|
|
333
|
-
}, ...
|
|
311
|
+
}, ...he.map((e) => ({
|
|
334
312
|
value: e.key,
|
|
335
313
|
label: e.title,
|
|
336
|
-
icon: /* @__PURE__ */
|
|
314
|
+
icon: /* @__PURE__ */ w(d, { className: "size-3.5" })
|
|
337
315
|
}))],
|
|
338
316
|
value: W,
|
|
339
317
|
onValueChange: (e) => {
|
|
340
|
-
e !== null && (
|
|
318
|
+
e !== null && (de(e), K(""));
|
|
341
319
|
},
|
|
342
|
-
onQueryChange:
|
|
320
|
+
onQueryChange: me,
|
|
343
321
|
placeholder: u("chooseDoc"),
|
|
344
|
-
trigger: /* @__PURE__ */
|
|
322
|
+
trigger: /* @__PURE__ */ T(h, {
|
|
345
323
|
type: "button",
|
|
346
324
|
className: "max-w-56",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ w(d, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ w("span", {
|
|
348
326
|
className: "truncate",
|
|
349
|
-
children:
|
|
327
|
+
children: _e?.title ?? u("chooseDoc")
|
|
350
328
|
})]
|
|
351
329
|
})
|
|
352
|
-
}), W && /* @__PURE__ */
|
|
330
|
+
}), W && /* @__PURE__ */ w(y, {
|
|
353
331
|
"aria-label": u("section"),
|
|
354
332
|
width: "content",
|
|
355
333
|
value: G,
|
|
@@ -370,18 +348,18 @@ function M({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
370
348
|
]
|
|
371
349
|
})]
|
|
372
350
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ w(v, {
|
|
374
352
|
value: q,
|
|
375
|
-
onChange: (e) =>
|
|
353
|
+
onChange: (e) => fe(e.target.value),
|
|
376
354
|
placeholder: u("issuePlaceholder"),
|
|
377
355
|
"aria-label": u("issue"),
|
|
378
356
|
className: "max-w-40"
|
|
379
357
|
})
|
|
380
358
|
]
|
|
381
359
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ w(_, { children: ge })
|
|
383
361
|
]
|
|
384
362
|
})
|
|
385
363
|
});
|
|
386
364
|
}
|
|
387
|
-
export {
|
|
365
|
+
export { N as EntryDialog, j as useKnowledgeActions, M as useKnowledgeMenu, A as useTermRefs };
|