@parallelworks/tandem-web 0.171.1 → 0.171.2
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/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +23 -23
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +12 -12
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +4 -4
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +4 -4
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +109 -109
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
package/lib/knowledge.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import "./base.js";
|
|
2
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
2
|
+
import { areasQuery as n, docQuery as r, docsQuery as i, knowledgeQuery as a, teamsQuery as o, workspaceQuery as s } from "../api/queries.js";
|
|
3
|
+
import { AreaIcon as c, FileTextIcon as l } from "../components/icons.js";
|
|
4
|
+
import "./base.js";
|
|
5
|
+
import { headings as ee } from "./glossary.js";
|
|
6
|
+
import { entryPath as u, kinds as d, termRef as f } from "./knowledgeKinds.js";
|
|
7
|
+
import { copyItem as p, useLinkItems as m } from "./menus.js";
|
|
8
|
+
import { useNavigate as h } from "./router.js";
|
|
9
|
+
import { Button as g, Combobox as _, ErrorText as v, Input as y, Modal as te, Select as b, Textarea as ne, menuDivider as x } from "@parallelworks/ui";
|
|
10
|
+
import { useCallback as S, useState as C } from "react";
|
|
11
|
+
import { useErrorMessage as re } from "@parallelworks/problem/react";
|
|
12
|
+
import { useTranslations as w } from "use-intl";
|
|
13
|
+
import { Fragment as ie, jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
14
|
+
import { keepPreviousData as ae, useMutation as D, useQuery as O, useQueryClient as k, useSuspenseQuery as A } from "@tanstack/react-query";
|
|
15
15
|
// src/lib/knowledge.tsx
|
|
16
|
-
function
|
|
17
|
-
let { data: t } =
|
|
18
|
-
return
|
|
16
|
+
function j(e) {
|
|
17
|
+
let { data: t } = O(a(e));
|
|
18
|
+
return S((e) => {
|
|
19
19
|
let n = t?.find((t) => t.id === e);
|
|
20
|
-
return n ?
|
|
20
|
+
return n ? f(n) : e;
|
|
21
21
|
}, [t]);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let r =
|
|
23
|
+
function M(n) {
|
|
24
|
+
let r = k(), i = () => {
|
|
25
25
|
r.invalidateQueries({ queryKey: [
|
|
26
26
|
"workspace",
|
|
27
27
|
n,
|
|
@@ -40,122 +40,122 @@ function j(n) {
|
|
|
40
40
|
entry: e
|
|
41
41
|
} });
|
|
42
42
|
return {
|
|
43
|
-
create:
|
|
43
|
+
create: D({
|
|
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: D({
|
|
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: D({
|
|
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: D({
|
|
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: D({
|
|
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
|
|
76
|
-
return
|
|
77
|
-
let c = [...
|
|
78
|
-
label:
|
|
79
|
-
onClick: () =>
|
|
74
|
+
function N(e, t) {
|
|
75
|
+
let n = w("knowledge"), r = w("common"), i = M(e), a = m(), o = h();
|
|
76
|
+
return S((s) => {
|
|
77
|
+
let c = [...a(u(e, f(s))), p(r("copyName"), s.name)], l = {
|
|
78
|
+
label: r("open"),
|
|
79
|
+
onClick: () => o({
|
|
80
80
|
to: "/$workspace/knowledge/$term",
|
|
81
81
|
params: {
|
|
82
82
|
workspace: e,
|
|
83
|
-
term:
|
|
83
|
+
term: f(s)
|
|
84
84
|
}
|
|
85
85
|
})
|
|
86
86
|
};
|
|
87
|
-
return
|
|
88
|
-
|
|
87
|
+
return s.archivedAt ? [
|
|
88
|
+
l,
|
|
89
89
|
{
|
|
90
|
-
label:
|
|
91
|
-
onClick: () =>
|
|
90
|
+
label: n("restore"),
|
|
91
|
+
onClick: () => i.restore.mutate(s.id)
|
|
92
92
|
},
|
|
93
|
-
|
|
93
|
+
x,
|
|
94
94
|
...c
|
|
95
95
|
] : [
|
|
96
|
-
|
|
96
|
+
l,
|
|
97
97
|
{
|
|
98
|
-
label:
|
|
98
|
+
label: n("edit"),
|
|
99
99
|
onClick: () => t({
|
|
100
100
|
kind: "edit",
|
|
101
|
-
entry:
|
|
101
|
+
entry: s
|
|
102
102
|
})
|
|
103
103
|
},
|
|
104
|
-
...
|
|
105
|
-
label:
|
|
106
|
-
onClick: () =>
|
|
107
|
-
id:
|
|
104
|
+
...s.status === "superseded" ? [{
|
|
105
|
+
label: n("reopen"),
|
|
106
|
+
onClick: () => i.update.mutate({
|
|
107
|
+
id: s.id,
|
|
108
108
|
status: "decided"
|
|
109
109
|
})
|
|
110
|
-
}] :
|
|
111
|
-
label:
|
|
112
|
-
onClick: () =>
|
|
113
|
-
id:
|
|
110
|
+
}] : s.status === "added" ? [{
|
|
111
|
+
label: n("confirm"),
|
|
112
|
+
onClick: () => i.update.mutate({
|
|
113
|
+
id: s.id,
|
|
114
114
|
status: "decided"
|
|
115
115
|
})
|
|
116
116
|
}] : [],
|
|
117
|
-
...
|
|
118
|
-
label:
|
|
117
|
+
...s.status === "superseded" ? [] : [{
|
|
118
|
+
label: n("supersede"),
|
|
119
119
|
onClick: () => t({
|
|
120
120
|
kind: "create",
|
|
121
|
-
supersedes:
|
|
121
|
+
supersedes: s,
|
|
122
122
|
defaults: {
|
|
123
|
-
kind:
|
|
124
|
-
name:
|
|
123
|
+
kind: s.kind,
|
|
124
|
+
name: s.name
|
|
125
125
|
}
|
|
126
126
|
})
|
|
127
127
|
}],
|
|
128
|
-
|
|
128
|
+
x,
|
|
129
129
|
...c,
|
|
130
|
-
|
|
130
|
+
x,
|
|
131
131
|
{
|
|
132
|
-
label:
|
|
132
|
+
label: n("archive"),
|
|
133
133
|
destructive: !0,
|
|
134
|
-
onClick: () =>
|
|
134
|
+
onClick: () => i.archive.mutate(s.id)
|
|
135
135
|
}
|
|
136
136
|
];
|
|
137
137
|
}, [
|
|
138
138
|
e,
|
|
139
139
|
t,
|
|
140
|
+
i,
|
|
140
141
|
a,
|
|
141
142
|
o,
|
|
142
|
-
|
|
143
|
-
r
|
|
144
|
-
i
|
|
143
|
+
n,
|
|
144
|
+
r
|
|
145
145
|
]);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
let
|
|
149
|
-
...
|
|
147
|
+
function P({ workspace: e, mode: t, onClose: a, onSaved: u }) {
|
|
148
|
+
let f = w("planning"), p = w("knowledge"), m = w("common"), h = re(), { data: x } = A(o(e)), { data: S } = A(s(e)), D = M(e), k = t.kind === "edit" ? t.entry : void 0, j = t.kind === "create" ? t.defaults ?? {} : {}, N = t.kind === "create" ? t.supersedes : void 0, [P, oe] = C(k?.name ?? j.name ?? ""), [F, se] = C((k?.aliases ?? j.aliases ?? []).join(", ")), [I, ce] = C(k?.kind ?? j.kind ?? "term"), [L, le] = C(k?.definition ?? j.definition ?? ""), [R, ue] = C(j.team ?? x.find((e) => e.id === N?.teamId)?.key ?? ""), [z, B] = C(k?.areaId ?? ""), { data: V = [] } = O(n(e)), H = k ? k.teamId : x.find((e) => e.key === R)?.id, U = V.find((e) => e.id === z)?.key ?? "", [W, de] = C(k?.source.doc?.key ?? j.source?.doc ?? ""), [G, K] = C(k?.source.section ?? j.source?.section ?? ""), [q, fe] = C(k?.source.identifier ?? j.source?.issue ?? ""), [J, pe] = C(!1), [Y, me] = C(""), { data: he = [] } = O({
|
|
149
|
+
...i(e, Y ? { title: Y } : {
|
|
150
150
|
top: !0,
|
|
151
151
|
limit: 20
|
|
152
152
|
}),
|
|
153
153
|
enabled: J,
|
|
154
|
-
placeholderData:
|
|
155
|
-
}), [ge, X] =
|
|
156
|
-
...
|
|
154
|
+
placeholderData: ae
|
|
155
|
+
}), [ge, X] = C(null), { data: Z } = O({
|
|
156
|
+
...r(e, W),
|
|
157
157
|
enabled: !!W
|
|
158
|
-
}), _e = Z ?? (
|
|
158
|
+
}), _e = Z ?? (k?.source.doc?.key === W ? k.source.doc : void 0), Q = ee(Z?.body ?? ""), $ = D.create.isPending || D.update.isPending || D.supersede.isPending, ve = async () => {
|
|
159
159
|
X(null);
|
|
160
160
|
let e = {
|
|
161
161
|
...W && { doc: W },
|
|
@@ -163,89 +163,89 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
163
163
|
...q.trim() && { issue: q.trim() }
|
|
164
164
|
}, t = F.split(",").map((e) => e.trim()).filter(Boolean);
|
|
165
165
|
try {
|
|
166
|
-
let
|
|
167
|
-
|
|
168
|
-
id:
|
|
169
|
-
name:
|
|
166
|
+
let n;
|
|
167
|
+
k ? n = await D.update.mutateAsync({
|
|
168
|
+
id: k.id,
|
|
169
|
+
name: P,
|
|
170
170
|
aliases: t,
|
|
171
171
|
kind: I,
|
|
172
172
|
definition: L,
|
|
173
173
|
...(!z || U) && { area: U },
|
|
174
174
|
source: e,
|
|
175
|
-
ifVersion:
|
|
176
|
-
}) : (
|
|
177
|
-
name:
|
|
175
|
+
ifVersion: k.version
|
|
176
|
+
}) : (n = await D.create.mutateAsync({
|
|
177
|
+
name: P,
|
|
178
178
|
aliases: t,
|
|
179
179
|
kind: I,
|
|
180
180
|
definition: L,
|
|
181
181
|
...R && { team: R },
|
|
182
182
|
...U && { area: U },
|
|
183
183
|
source: e
|
|
184
|
-
}),
|
|
185
|
-
id:
|
|
186
|
-
by:
|
|
187
|
-
})),
|
|
184
|
+
}), N && await D.supersede.mutateAsync({
|
|
185
|
+
id: N.id,
|
|
186
|
+
by: n.id
|
|
187
|
+
})), u?.(n), a();
|
|
188
188
|
} catch (e) {
|
|
189
|
-
X(
|
|
189
|
+
X(h(e));
|
|
190
190
|
}
|
|
191
|
-
}, ye =
|
|
192
|
-
return /* @__PURE__ */
|
|
191
|
+
}, ye = k ? p("editTitle", { name: k.name }) : N ? p("supersedeTitle", { name: N.name }) : p("newTitle");
|
|
192
|
+
return /* @__PURE__ */ T(te, {
|
|
193
193
|
open: !0,
|
|
194
|
-
onClose:
|
|
194
|
+
onClose: a,
|
|
195
195
|
dismissible: !$,
|
|
196
196
|
size: "lg",
|
|
197
197
|
title: ye,
|
|
198
|
-
description:
|
|
198
|
+
description: N ? p("supersedeHint") : void 0,
|
|
199
199
|
onSubmit: () => ve(),
|
|
200
|
-
footer: /* @__PURE__ */
|
|
200
|
+
footer: /* @__PURE__ */ E(ie, { children: [/* @__PURE__ */ T(g, {
|
|
201
201
|
type: "button",
|
|
202
202
|
variant: "ghost",
|
|
203
|
-
onClick:
|
|
204
|
-
children:
|
|
205
|
-
}), /* @__PURE__ */
|
|
203
|
+
onClick: a,
|
|
204
|
+
children: m("cancel")
|
|
205
|
+
}), /* @__PURE__ */ T(g, {
|
|
206
206
|
type: "submit",
|
|
207
207
|
variant: "primary",
|
|
208
|
-
disabled: !
|
|
208
|
+
disabled: !P.trim() || !L.trim(),
|
|
209
209
|
loading: $,
|
|
210
|
-
children:
|
|
210
|
+
children: N ? p("saveAndSupersede") : m("save")
|
|
211
211
|
})] }),
|
|
212
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ E("div", {
|
|
213
213
|
className: "space-y-3",
|
|
214
214
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ E("label", {
|
|
216
216
|
className: "block text-xs font-medium text-muted-foreground",
|
|
217
|
-
children: [
|
|
218
|
-
value:
|
|
219
|
-
onChange: (e) =>
|
|
217
|
+
children: [p("name"), /* @__PURE__ */ T(y, {
|
|
218
|
+
value: P,
|
|
219
|
+
onChange: (e) => oe(e.target.value),
|
|
220
220
|
maxLength: 100,
|
|
221
221
|
required: !0,
|
|
222
222
|
className: "mt-1"
|
|
223
223
|
})]
|
|
224
224
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ E("label", {
|
|
226
226
|
className: "block text-xs font-medium text-muted-foreground",
|
|
227
|
-
children: [
|
|
227
|
+
children: [p("aliases"), /* @__PURE__ */ T(y, {
|
|
228
228
|
value: F,
|
|
229
229
|
onChange: (e) => se(e.target.value),
|
|
230
|
-
placeholder:
|
|
230
|
+
placeholder: p("aliasesPlaceholder"),
|
|
231
231
|
className: "mt-1"
|
|
232
232
|
})]
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ E("div", {
|
|
235
235
|
className: "flex flex-wrap gap-2",
|
|
236
236
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
"aria-label":
|
|
237
|
+
/* @__PURE__ */ T(b, {
|
|
238
|
+
"aria-label": p("kindLabel"),
|
|
239
239
|
width: "content",
|
|
240
240
|
value: I,
|
|
241
241
|
onValueChange: ce,
|
|
242
|
-
items:
|
|
242
|
+
items: d.map((e) => ({
|
|
243
243
|
value: e,
|
|
244
|
-
label:
|
|
244
|
+
label: p(`kind.${e}`)
|
|
245
245
|
}))
|
|
246
246
|
}),
|
|
247
|
-
!
|
|
248
|
-
"aria-label":
|
|
247
|
+
!k && /* @__PURE__ */ T(b, {
|
|
248
|
+
"aria-label": p("spaceLabel"),
|
|
249
249
|
width: "content",
|
|
250
250
|
value: R,
|
|
251
251
|
onValueChange: (e) => {
|
|
@@ -253,89 +253,89 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
253
253
|
},
|
|
254
254
|
items: [{
|
|
255
255
|
value: "",
|
|
256
|
-
label:
|
|
257
|
-
}, ...
|
|
256
|
+
label: S.name
|
|
257
|
+
}, ...x.filter((e) => !e.archivedAt).map((e) => ({
|
|
258
258
|
value: e.key,
|
|
259
259
|
label: e.name
|
|
260
260
|
}))]
|
|
261
261
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ T(_, {
|
|
263
263
|
items: [{
|
|
264
264
|
value: "",
|
|
265
|
-
label:
|
|
265
|
+
label: f("noArea")
|
|
266
266
|
}, ...V.filter((e) => !e.teamId || e.teamId === H).map((e) => ({
|
|
267
267
|
value: e.id,
|
|
268
268
|
label: e.title
|
|
269
269
|
}))],
|
|
270
270
|
value: z,
|
|
271
271
|
onValueChange: (e) => e !== null && B(e),
|
|
272
|
-
placeholder:
|
|
273
|
-
trigger: /* @__PURE__ */
|
|
272
|
+
placeholder: f("area"),
|
|
273
|
+
trigger: /* @__PURE__ */ E(g, {
|
|
274
274
|
type: "button",
|
|
275
|
-
"aria-label":
|
|
276
|
-
children: [/* @__PURE__ */
|
|
275
|
+
"aria-label": f("area"),
|
|
276
|
+
children: [/* @__PURE__ */ T(c, { className: "size-3.5 shrink-0 text-muted-foreground" }), V.find((e) => e.id === z)?.title ?? /* @__PURE__ */ T("span", {
|
|
277
277
|
className: "text-muted-foreground",
|
|
278
|
-
children:
|
|
278
|
+
children: f("noArea")
|
|
279
279
|
})]
|
|
280
280
|
})
|
|
281
281
|
})
|
|
282
282
|
]
|
|
283
283
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ E("label", {
|
|
285
285
|
className: "block text-xs font-medium text-muted-foreground",
|
|
286
|
-
children: [
|
|
286
|
+
children: [p("definition"), /* @__PURE__ */ T(ne, {
|
|
287
287
|
value: L,
|
|
288
288
|
onChange: (e) => le(e.target.value),
|
|
289
289
|
maxLength: 1e3,
|
|
290
290
|
required: !0,
|
|
291
291
|
rows: 3,
|
|
292
|
-
placeholder:
|
|
292
|
+
placeholder: p("definitionPlaceholder"),
|
|
293
293
|
className: "mt-1"
|
|
294
294
|
})]
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ E("fieldset", {
|
|
297
297
|
className: "space-y-2",
|
|
298
298
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ T("legend", {
|
|
300
300
|
className: "text-xs font-medium text-muted-foreground",
|
|
301
|
-
children:
|
|
301
|
+
children: p("source")
|
|
302
302
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ E("div", {
|
|
304
304
|
className: "flex flex-wrap items-center gap-2",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ T(_, {
|
|
306
306
|
open: J,
|
|
307
307
|
onOpenChange: pe,
|
|
308
308
|
items: [{
|
|
309
309
|
value: "",
|
|
310
|
-
label:
|
|
310
|
+
label: p("noDoc")
|
|
311
311
|
}, ...he.map((e) => ({
|
|
312
312
|
value: e.key,
|
|
313
313
|
label: e.title,
|
|
314
|
-
icon: /* @__PURE__ */
|
|
314
|
+
icon: /* @__PURE__ */ T(l, { className: "size-3.5" })
|
|
315
315
|
}))],
|
|
316
316
|
value: W,
|
|
317
317
|
onValueChange: (e) => {
|
|
318
318
|
e !== null && (de(e), K(""));
|
|
319
319
|
},
|
|
320
320
|
onQueryChange: me,
|
|
321
|
-
placeholder:
|
|
322
|
-
trigger: /* @__PURE__ */
|
|
321
|
+
placeholder: p("chooseDoc"),
|
|
322
|
+
trigger: /* @__PURE__ */ E(g, {
|
|
323
323
|
type: "button",
|
|
324
324
|
className: "max-w-56",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ T(l, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ T("span", {
|
|
326
326
|
className: "truncate",
|
|
327
|
-
children: _e?.title ??
|
|
327
|
+
children: _e?.title ?? p("chooseDoc")
|
|
328
328
|
})]
|
|
329
329
|
})
|
|
330
|
-
}), W && /* @__PURE__ */
|
|
331
|
-
"aria-label":
|
|
330
|
+
}), W && /* @__PURE__ */ T(b, {
|
|
331
|
+
"aria-label": p("section"),
|
|
332
332
|
width: "content",
|
|
333
333
|
value: G,
|
|
334
334
|
onValueChange: K,
|
|
335
335
|
items: [
|
|
336
336
|
{
|
|
337
337
|
value: "",
|
|
338
|
-
label:
|
|
338
|
+
label: p("wholeDoc")
|
|
339
339
|
},
|
|
340
340
|
...Q.map((e) => ({
|
|
341
341
|
value: e.text,
|
|
@@ -348,18 +348,18 @@ function N({ workspace: e, mode: t, onClose: n, onSaved: o }) {
|
|
|
348
348
|
]
|
|
349
349
|
})]
|
|
350
350
|
}),
|
|
351
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ T(y, {
|
|
352
352
|
value: q,
|
|
353
353
|
onChange: (e) => fe(e.target.value),
|
|
354
|
-
placeholder:
|
|
355
|
-
"aria-label":
|
|
354
|
+
placeholder: p("issuePlaceholder"),
|
|
355
|
+
"aria-label": p("issue"),
|
|
356
356
|
className: "max-w-40"
|
|
357
357
|
})
|
|
358
358
|
]
|
|
359
359
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ T(v, { children: ge })
|
|
361
361
|
]
|
|
362
362
|
})
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
export {
|
|
365
|
+
export { P as EntryDialog, M as useKnowledgeActions, N as useKnowledgeMenu, j as useTermRefs };
|