@parallelworks/tandem-web 0.150.3 → 0.151.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 +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +1 -1
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
package/lib/knowledge.js
CHANGED
|
@@ -2,26 +2,26 @@ import "./base.js";
|
|
|
2
2
|
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
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { copyItem as p, useLinkItems as m } from "./menus.js";
|
|
5
|
+
import { copyItem as l, useLinkItems as u } from "./menus.js";
|
|
6
|
+
import { AreaIcon as ee, FileTextIcon as d } from "../components/icons.js";
|
|
8
7
|
import { headings as te } from "./glossary.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { entryPath as f, kinds as ne, termRef as p } from "./knowledgeKinds.js";
|
|
9
|
+
import { Button as m, Combobox as h, ErrorText as g, Input as _, Modal as re, Select as v, Textarea as ie, menuDivider as y } from "@parallelworks/ui";
|
|
10
|
+
import { useCallback as b, useState as x } from "react";
|
|
11
|
+
import { useErrorMessage as ae } from "@parallelworks/problem/react";
|
|
12
|
+
import { useTranslations as S } from "use-intl";
|
|
13
|
+
import { Fragment as oe, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
14
|
+
import { keepPreviousData as se, useMutation as T, useQuery as E, useQueryClient as D, useSuspenseQuery as O } from "@tanstack/react-query";
|
|
15
15
|
// src/lib/knowledge.tsx
|
|
16
|
-
function
|
|
17
|
-
let { data: t } =
|
|
18
|
-
return
|
|
16
|
+
function k(e) {
|
|
17
|
+
let { data: t } = E(o(e));
|
|
18
|
+
return b((e) => {
|
|
19
19
|
let n = t?.find((t) => t.id === e);
|
|
20
|
-
return n ?
|
|
20
|
+
return n ? p(n) : e;
|
|
21
21
|
}, [t]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let r =
|
|
23
|
+
function A(n) {
|
|
24
|
+
let r = D(), i = () => {
|
|
25
25
|
r.invalidateQueries({ queryKey: [
|
|
26
26
|
"workspace",
|
|
27
27
|
n,
|
|
@@ -40,60 +40,60 @@ function j(n) {
|
|
|
40
40
|
entry: e
|
|
41
41
|
} });
|
|
42
42
|
return {
|
|
43
|
-
create:
|
|
43
|
+
create: T({
|
|
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: T({
|
|
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: T({
|
|
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: T({
|
|
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: T({
|
|
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(
|
|
74
|
+
function j(e, t) {
|
|
75
|
+
let r = S("knowledge"), i = S("common"), a = A(e), o = u(), s = n();
|
|
76
|
+
return b((n) => {
|
|
77
|
+
let c = [...o(f(e, p(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: p(n)
|
|
84
84
|
}
|
|
85
85
|
})
|
|
86
86
|
};
|
|
87
87
|
return n.archivedAt ? [
|
|
88
|
-
|
|
88
|
+
u,
|
|
89
89
|
{
|
|
90
90
|
label: r("restore"),
|
|
91
91
|
onClick: () => a.restore.mutate(n.id)
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
y,
|
|
94
94
|
...c
|
|
95
95
|
] : [
|
|
96
|
-
|
|
96
|
+
u,
|
|
97
97
|
{
|
|
98
98
|
label: r("edit"),
|
|
99
99
|
onClick: () => t({
|
|
@@ -132,9 +132,9 @@ function M(e, t) {
|
|
|
132
132
|
}
|
|
133
133
|
})
|
|
134
134
|
}],
|
|
135
|
-
|
|
135
|
+
y,
|
|
136
136
|
...c,
|
|
137
|
-
|
|
137
|
+
y,
|
|
138
138
|
{
|
|
139
139
|
label: r("archive"),
|
|
140
140
|
destructive: !0,
|
|
@@ -151,38 +151,38 @@ function M(e, t) {
|
|
|
151
151
|
i
|
|
152
152
|
]);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
let
|
|
154
|
+
function M({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
155
|
+
let l = S("planning"), u = S("knowledge"), f = S("common"), p = ae(), { data: y } = O(s(e)), { data: b } = O(c(e)), T = A(e), D = t.kind === "edit" ? t.entry : void 0, k = t.kind === "create" ? t.defaults ?? {} : {}, j = t.kind === "create" ? t.supersedes : void 0, [M, ce] = x(D?.name ?? k.name ?? ""), [N, P] = x((D?.aliases ?? k.aliases ?? []).join(", ")), [F, le] = x(D?.kind ?? k.kind ?? "term"), [I, ue] = x(k.status ?? "proposed"), [L, de] = x(D?.definition ?? k.definition ?? ""), [R, fe] = x(k.team ?? y.find((e) => e.id === j?.teamId)?.key ?? ""), [z, B] = x(D?.areaId ?? ""), { data: V = [] } = E(r(e)), H = D ? D.teamId : y.find((e) => e.key === R)?.id, U = V.find((e) => e.id === z)?.key ?? "", [W, pe] = x(D?.source.doc?.key ?? k.source?.doc ?? ""), [G, K] = x(D?.source.section ?? k.source?.section ?? ""), [q, me] = x(D?.source.identifier ?? k.source?.issue ?? ""), [J, he] = x(!1), [Y, ge] = x(""), { data: _e = [] } = E({
|
|
156
156
|
...a(e, Y ? { title: Y } : {
|
|
157
157
|
top: !0,
|
|
158
158
|
limit: 20
|
|
159
159
|
}),
|
|
160
160
|
enabled: J,
|
|
161
|
-
placeholderData:
|
|
162
|
-
}), [ve, X] =
|
|
161
|
+
placeholderData: se
|
|
162
|
+
}), [ve, X] = x(null), { data: Z } = E({
|
|
163
163
|
...i(e, W),
|
|
164
164
|
enabled: !!W
|
|
165
|
-
}), ye = Z ?? (
|
|
165
|
+
}), ye = Z ?? (D?.source.doc?.key === W ? D.source.doc : void 0), Q = te(Z?.body ?? ""), $ = T.create.isPending || T.update.isPending || T.supersede.isPending, be = async () => {
|
|
166
166
|
X(null);
|
|
167
167
|
let e = {
|
|
168
168
|
...W && { doc: W },
|
|
169
169
|
...W && G && { section: G },
|
|
170
170
|
...q.trim() && { issue: q.trim() },
|
|
171
|
-
...
|
|
172
|
-
}, t =
|
|
171
|
+
...k.source?.decision && { decision: k.source.decision }
|
|
172
|
+
}, t = N.split(",").map((e) => e.trim()).filter(Boolean);
|
|
173
173
|
try {
|
|
174
174
|
let r;
|
|
175
|
-
|
|
176
|
-
id:
|
|
177
|
-
name:
|
|
175
|
+
D ? r = await T.update.mutateAsync({
|
|
176
|
+
id: D.id,
|
|
177
|
+
name: M,
|
|
178
178
|
aliases: t,
|
|
179
179
|
kind: F,
|
|
180
180
|
definition: L,
|
|
181
181
|
...(!z || U) && { area: U },
|
|
182
182
|
source: e,
|
|
183
|
-
ifVersion:
|
|
184
|
-
}) : (r = await
|
|
185
|
-
name:
|
|
183
|
+
ifVersion: D.version
|
|
184
|
+
}) : (r = await T.create.mutateAsync({
|
|
185
|
+
name: M,
|
|
186
186
|
aliases: t,
|
|
187
187
|
kind: F,
|
|
188
188
|
status: I,
|
|
@@ -190,84 +190,84 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
190
190
|
...R && { team: R },
|
|
191
191
|
...U && { area: U },
|
|
192
192
|
source: e
|
|
193
|
-
}),
|
|
194
|
-
id:
|
|
193
|
+
}), j && await T.supersede.mutateAsync({
|
|
194
|
+
id: j.id,
|
|
195
195
|
by: r.id
|
|
196
196
|
})), o?.(r), n();
|
|
197
197
|
} catch (e) {
|
|
198
|
-
X(
|
|
198
|
+
X(p(e));
|
|
199
199
|
}
|
|
200
|
-
}, xe =
|
|
201
|
-
return /* @__PURE__ */
|
|
200
|
+
}, xe = D ? u("editTitle", { name: D.name }) : j ? u("supersedeTitle", { name: j.name }) : u("newTitle");
|
|
201
|
+
return /* @__PURE__ */ C(re, {
|
|
202
202
|
open: !0,
|
|
203
203
|
onClose: n,
|
|
204
204
|
dismissible: !$,
|
|
205
205
|
size: "lg",
|
|
206
206
|
title: xe,
|
|
207
|
-
description:
|
|
207
|
+
description: j ? u("supersedeHint") : void 0,
|
|
208
208
|
onSubmit: () => be(),
|
|
209
|
-
footer: /* @__PURE__ */
|
|
209
|
+
footer: /* @__PURE__ */ w(oe, { children: [/* @__PURE__ */ C(m, {
|
|
210
210
|
type: "button",
|
|
211
211
|
variant: "ghost",
|
|
212
212
|
onClick: n,
|
|
213
|
-
children:
|
|
214
|
-
}), /* @__PURE__ */
|
|
213
|
+
children: f("cancel")
|
|
214
|
+
}), /* @__PURE__ */ C(m, {
|
|
215
215
|
type: "submit",
|
|
216
216
|
variant: "primary",
|
|
217
|
-
disabled: !
|
|
217
|
+
disabled: !M.trim() || !L.trim(),
|
|
218
218
|
loading: $,
|
|
219
|
-
children:
|
|
219
|
+
children: j ? u("saveAndSupersede") : f("save")
|
|
220
220
|
})] }),
|
|
221
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ w("div", {
|
|
222
222
|
className: "space-y-3",
|
|
223
223
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ w("label", {
|
|
225
225
|
className: "block text-xs font-medium text-muted-foreground",
|
|
226
|
-
children: [
|
|
227
|
-
value:
|
|
228
|
-
onChange: (e) =>
|
|
226
|
+
children: [u("name"), /* @__PURE__ */ C(_, {
|
|
227
|
+
value: M,
|
|
228
|
+
onChange: (e) => ce(e.target.value),
|
|
229
229
|
maxLength: 100,
|
|
230
230
|
required: !0,
|
|
231
231
|
className: "mt-1"
|
|
232
232
|
})]
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ w("label", {
|
|
235
235
|
className: "block text-xs font-medium text-muted-foreground",
|
|
236
|
-
children: [
|
|
237
|
-
value:
|
|
238
|
-
onChange: (e) =>
|
|
239
|
-
placeholder:
|
|
236
|
+
children: [u("aliases"), /* @__PURE__ */ C(_, {
|
|
237
|
+
value: N,
|
|
238
|
+
onChange: (e) => P(e.target.value),
|
|
239
|
+
placeholder: u("aliasesPlaceholder"),
|
|
240
240
|
className: "mt-1"
|
|
241
241
|
})]
|
|
242
242
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ w("div", {
|
|
244
244
|
className: "flex flex-wrap gap-2",
|
|
245
245
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
"aria-label":
|
|
246
|
+
/* @__PURE__ */ C(v, {
|
|
247
|
+
"aria-label": u("kindLabel"),
|
|
248
248
|
width: "content",
|
|
249
249
|
value: F,
|
|
250
250
|
onValueChange: le,
|
|
251
|
-
items:
|
|
251
|
+
items: ne.map((e) => ({
|
|
252
252
|
value: e,
|
|
253
|
-
label:
|
|
253
|
+
label: u(`kind.${e}`)
|
|
254
254
|
}))
|
|
255
255
|
}),
|
|
256
|
-
!
|
|
257
|
-
"aria-label":
|
|
256
|
+
!D && F !== "term" && /* @__PURE__ */ C(v, {
|
|
257
|
+
"aria-label": u("statusLabel"),
|
|
258
258
|
width: "content",
|
|
259
259
|
value: I,
|
|
260
260
|
onValueChange: ue,
|
|
261
261
|
items: [{
|
|
262
262
|
value: "proposed",
|
|
263
|
-
label:
|
|
263
|
+
label: u("status.proposed")
|
|
264
264
|
}, {
|
|
265
265
|
value: "decided",
|
|
266
|
-
label:
|
|
266
|
+
label: u("status.decided")
|
|
267
267
|
}]
|
|
268
268
|
}),
|
|
269
|
-
!
|
|
270
|
-
"aria-label":
|
|
269
|
+
!D && /* @__PURE__ */ C(v, {
|
|
270
|
+
"aria-label": u("spaceLabel"),
|
|
271
271
|
width: "content",
|
|
272
272
|
value: R,
|
|
273
273
|
onValueChange: (e) => {
|
|
@@ -275,89 +275,89 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
275
275
|
},
|
|
276
276
|
items: [{
|
|
277
277
|
value: "",
|
|
278
|
-
label:
|
|
279
|
-
}, ...
|
|
278
|
+
label: b.name
|
|
279
|
+
}, ...y.filter((e) => !e.archivedAt).map((e) => ({
|
|
280
280
|
value: e.key,
|
|
281
281
|
label: e.name
|
|
282
282
|
}))]
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ C(h, {
|
|
285
285
|
items: [{
|
|
286
286
|
value: "",
|
|
287
|
-
label:
|
|
287
|
+
label: l("noArea")
|
|
288
288
|
}, ...V.filter((e) => !e.teamId || e.teamId === H).map((e) => ({
|
|
289
289
|
value: e.id,
|
|
290
290
|
label: e.title
|
|
291
291
|
}))],
|
|
292
292
|
value: z,
|
|
293
293
|
onValueChange: (e) => e !== null && B(e),
|
|
294
|
-
placeholder:
|
|
295
|
-
trigger: /* @__PURE__ */
|
|
294
|
+
placeholder: l("area"),
|
|
295
|
+
trigger: /* @__PURE__ */ w(m, {
|
|
296
296
|
type: "button",
|
|
297
|
-
"aria-label":
|
|
298
|
-
children: [/* @__PURE__ */
|
|
297
|
+
"aria-label": l("area"),
|
|
298
|
+
children: [/* @__PURE__ */ C(ee, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ C("span", {
|
|
299
299
|
className: "text-muted-foreground",
|
|
300
|
-
children:
|
|
300
|
+
children: l("noArea")
|
|
301
301
|
})]
|
|
302
302
|
})
|
|
303
303
|
})
|
|
304
304
|
]
|
|
305
305
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ w("label", {
|
|
307
307
|
className: "block text-xs font-medium text-muted-foreground",
|
|
308
|
-
children: [
|
|
308
|
+
children: [u("definition"), /* @__PURE__ */ C(ie, {
|
|
309
309
|
value: L,
|
|
310
310
|
onChange: (e) => de(e.target.value),
|
|
311
311
|
maxLength: 1e3,
|
|
312
312
|
required: !0,
|
|
313
313
|
rows: 3,
|
|
314
|
-
placeholder:
|
|
314
|
+
placeholder: u("definitionPlaceholder"),
|
|
315
315
|
className: "mt-1"
|
|
316
316
|
})]
|
|
317
317
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ w("fieldset", {
|
|
319
319
|
className: "space-y-2",
|
|
320
320
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ C("legend", {
|
|
322
322
|
className: "text-xs font-medium text-muted-foreground",
|
|
323
|
-
children:
|
|
323
|
+
children: u("source")
|
|
324
324
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ w("div", {
|
|
326
326
|
className: "flex flex-wrap items-center gap-2",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ C(h, {
|
|
328
328
|
open: J,
|
|
329
329
|
onOpenChange: he,
|
|
330
330
|
items: [{
|
|
331
331
|
value: "",
|
|
332
|
-
label:
|
|
332
|
+
label: u("noDoc")
|
|
333
333
|
}, ..._e.map((e) => ({
|
|
334
334
|
value: e.key,
|
|
335
335
|
label: e.title,
|
|
336
|
-
icon: /* @__PURE__ */
|
|
336
|
+
icon: /* @__PURE__ */ C(d, { className: "size-3.5" })
|
|
337
337
|
}))],
|
|
338
338
|
value: W,
|
|
339
339
|
onValueChange: (e) => {
|
|
340
340
|
e !== null && (pe(e), K(""));
|
|
341
341
|
},
|
|
342
342
|
onQueryChange: ge,
|
|
343
|
-
placeholder:
|
|
344
|
-
trigger: /* @__PURE__ */
|
|
343
|
+
placeholder: u("chooseDoc"),
|
|
344
|
+
trigger: /* @__PURE__ */ w(m, {
|
|
345
345
|
type: "button",
|
|
346
346
|
className: "max-w-56",
|
|
347
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ C(d, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ C("span", {
|
|
348
348
|
className: "truncate",
|
|
349
|
-
children: ye?.title ??
|
|
349
|
+
children: ye?.title ?? u("chooseDoc")
|
|
350
350
|
})]
|
|
351
351
|
})
|
|
352
|
-
}), W && /* @__PURE__ */
|
|
353
|
-
"aria-label":
|
|
352
|
+
}), W && /* @__PURE__ */ C(v, {
|
|
353
|
+
"aria-label": u("section"),
|
|
354
354
|
width: "content",
|
|
355
355
|
value: G,
|
|
356
356
|
onValueChange: K,
|
|
357
357
|
items: [
|
|
358
358
|
{
|
|
359
359
|
value: "",
|
|
360
|
-
label:
|
|
360
|
+
label: u("wholeDoc")
|
|
361
361
|
},
|
|
362
362
|
...Q.map((e) => ({
|
|
363
363
|
value: e.text,
|
|
@@ -370,18 +370,18 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
370
370
|
]
|
|
371
371
|
})]
|
|
372
372
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ C(_, {
|
|
374
374
|
value: q,
|
|
375
375
|
onChange: (e) => me(e.target.value),
|
|
376
|
-
placeholder:
|
|
377
|
-
"aria-label":
|
|
376
|
+
placeholder: u("issuePlaceholder"),
|
|
377
|
+
"aria-label": u("issue"),
|
|
378
378
|
className: "max-w-40"
|
|
379
379
|
})
|
|
380
380
|
]
|
|
381
381
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ C(g, { children: ve })
|
|
383
383
|
]
|
|
384
384
|
})
|
|
385
385
|
});
|
|
386
386
|
}
|
|
387
|
-
export {
|
|
387
|
+
export { M as EntryDialog, A as useKnowledgeActions, j as useKnowledgeMenu, k as useTermRefs };
|
package/lib/views.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { useNavigate as n } from "./router.js";
|
|
3
3
|
import { viewsQuery as r } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useLinkItems as i } from "./menus.js";
|
|
5
|
+
import { useConfirm as a } from "./confirm.js";
|
|
6
|
+
import { viewRef as o } from "./refs.js";
|
|
7
|
+
import { issuesHref as s } from "./teamPaths.js";
|
|
8
8
|
import { ViewDialog as c } from "../components/ViewDialog.js";
|
|
9
9
|
import { menuDivider as l } from "@parallelworks/ui";
|
|
10
10
|
import { useState as u } from "react";
|
|
@@ -46,11 +46,11 @@ function b(e, t) {
|
|
|
46
46
|
function x(e) {
|
|
47
47
|
return {
|
|
48
48
|
...y(e.filters),
|
|
49
|
-
saved:
|
|
49
|
+
saved: o(e)
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
function S(e, t) {
|
|
53
|
-
return
|
|
53
|
+
return s(e, x(t));
|
|
54
54
|
}
|
|
55
55
|
function C(n) {
|
|
56
56
|
let i = _(), { data: a = [] } = g(r(n)), o = () => i.invalidateQueries({ queryKey: r(n).queryKey });
|
|
@@ -83,12 +83,12 @@ function C(n) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
function w(e) {
|
|
86
|
-
let t = d("savedViews"), r = d("common"),
|
|
86
|
+
let t = d("savedViews"), r = d("common"), o = n(), s = i(), { update: h, remove: g } = C(e), { confirm: _, dialog: v } = a(), [y, b] = u(null);
|
|
87
87
|
return {
|
|
88
88
|
menu: (n) => [
|
|
89
89
|
{
|
|
90
90
|
label: r("open"),
|
|
91
|
-
onClick: () =>
|
|
91
|
+
onClick: () => o({
|
|
92
92
|
to: "/$workspace/issues",
|
|
93
93
|
params: { workspace: e },
|
|
94
94
|
search: x(n)
|
|
@@ -100,7 +100,7 @@ function w(e) {
|
|
|
100
100
|
onClick: () => b(n)
|
|
101
101
|
},
|
|
102
102
|
l,
|
|
103
|
-
...
|
|
103
|
+
...s(S(e, n)),
|
|
104
104
|
l,
|
|
105
105
|
{
|
|
106
106
|
label: t("delete"),
|