@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/components/GitHub.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
+
import { githubAccountQuery as n, githubSettingsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
3
|
+
import { basePath as a } from "../lib/base.js";
|
|
4
|
+
import { useConfirm as o } from "../lib/confirm.js";
|
|
5
|
+
import { ConnectionCard as s } from "./ConnectionCard.js";
|
|
6
|
+
import { CheckIcon as c, CodeHostIcon as l } from "./icons.js";
|
|
7
|
+
import { cardList as u, useFormError as d } from "./settings.js";
|
|
8
8
|
import { TeamName as f } from "./TeamName.js";
|
|
9
9
|
import { Button as p, ErrorText as m, ProgressBar as h, Select as g, SettingsCard as _, StatusLabel as v, Tooltip as y, buttonClasses as b } from "@parallelworks/ui";
|
|
10
10
|
import { useEffect as x, useState as S } from "react";
|
|
@@ -42,27 +42,27 @@ async function I(e) {
|
|
|
42
42
|
let { url: t } = await e();
|
|
43
43
|
window.location.assign(t);
|
|
44
44
|
}
|
|
45
|
-
var L = () => window.location.pathname.slice(
|
|
45
|
+
var L = () => window.location.pathname.slice(a.length) || "/";
|
|
46
46
|
function R() {
|
|
47
|
-
let { data:
|
|
48
|
-
mutationFn: () => I(async () =>
|
|
49
|
-
onMutate:
|
|
50
|
-
onError:
|
|
47
|
+
let { data: r } = M(n), i = T("github"), a = j(), c = d(), u = P(), f = k({
|
|
48
|
+
mutationFn: () => I(async () => t(await e.POST("/api/v1/me/github", { body: { returnTo: L() } }))),
|
|
49
|
+
onMutate: c.clear,
|
|
50
|
+
onError: c.set
|
|
51
51
|
}), m = k({
|
|
52
|
-
mutationFn: async () =>
|
|
53
|
-
onMutate:
|
|
54
|
-
onSettled: () => a.invalidateQueries({ queryKey:
|
|
55
|
-
}), { confirm: h, dialog: g } =
|
|
56
|
-
if (!
|
|
57
|
-
let _ =
|
|
58
|
-
login:
|
|
59
|
-
url:
|
|
60
|
-
}) : _, x = !
|
|
52
|
+
mutationFn: async () => t(await e.DELETE("/api/v1/me/github")),
|
|
53
|
+
onMutate: c.clear,
|
|
54
|
+
onSettled: () => a.invalidateQueries({ queryKey: n.queryKey })
|
|
55
|
+
}), { confirm: h, dialog: g } = o();
|
|
56
|
+
if (!r.enabled) return null;
|
|
57
|
+
let _ = r.keepsTokens ? i("accountDescriptionBothWays") : i("accountDescription"), y = r.login ? /* @__PURE__ */ D(z, {
|
|
58
|
+
login: r.login,
|
|
59
|
+
url: r.url
|
|
60
|
+
}) : _, x = !r.login && /* @__PURE__ */ D(v, {
|
|
61
61
|
off: !0,
|
|
62
62
|
children: i("notLinkedLabel")
|
|
63
63
|
});
|
|
64
|
-
if (
|
|
65
|
-
icon: /* @__PURE__ */ D(
|
|
64
|
+
if (r.linkedByHost) return /* @__PURE__ */ D(s, {
|
|
65
|
+
icon: /* @__PURE__ */ D(l, { className: "size-7" }),
|
|
66
66
|
name: i("accountTitle"),
|
|
67
67
|
status: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
|
|
68
68
|
className: "block",
|
|
@@ -71,19 +71,19 @@ function R() {
|
|
|
71
71
|
className: "block",
|
|
72
72
|
children: i("linkedByHost")
|
|
73
73
|
})] }),
|
|
74
|
-
action:
|
|
75
|
-
href:
|
|
76
|
-
className: b({ variant:
|
|
77
|
-
children:
|
|
74
|
+
action: r.linkURL && /* @__PURE__ */ O(E, { children: [x, /* @__PURE__ */ D("a", {
|
|
75
|
+
href: r.linkURL,
|
|
76
|
+
className: b({ variant: r.login ? "outline" : "primary" }),
|
|
77
|
+
children: r.login ? i("manageLink") : i("link")
|
|
78
78
|
})] })
|
|
79
79
|
});
|
|
80
|
-
let S = !!
|
|
81
|
-
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(
|
|
82
|
-
icon: /* @__PURE__ */ D(
|
|
80
|
+
let S = !!r.login && r.keepsTokens && !r.actsAsYou;
|
|
81
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(s, {
|
|
82
|
+
icon: /* @__PURE__ */ D(l, { className: "size-7" }),
|
|
83
83
|
name: i("accountTitle"),
|
|
84
84
|
status: y,
|
|
85
|
-
error:
|
|
86
|
-
action:
|
|
85
|
+
error: c.error,
|
|
86
|
+
action: r.login ? /* @__PURE__ */ D(p, {
|
|
87
87
|
variant: "outline",
|
|
88
88
|
type: "button",
|
|
89
89
|
loading: m.isPending,
|
|
@@ -101,7 +101,7 @@ function R() {
|
|
|
101
101
|
onClick: () => f.mutate(),
|
|
102
102
|
children: i("link")
|
|
103
103
|
})] }),
|
|
104
|
-
children: (
|
|
104
|
+
children: (u || S) && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(F, { outcome: u }), S && /* @__PURE__ */ O("div", {
|
|
105
105
|
className: "flex items-center gap-3 rounded-lg border border-border px-4 py-3 text-sm",
|
|
106
106
|
children: [/* @__PURE__ */ D("p", {
|
|
107
107
|
className: "min-w-0 flex-1",
|
|
@@ -129,20 +129,20 @@ function z({ login: e, url: t }) {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
function B({ workspace: e }) {
|
|
132
|
-
let { data: t } = M(
|
|
132
|
+
let { data: t } = M(r(e)), { data: n = [] } = A(i(e)), a = T("github");
|
|
133
133
|
return t.enabled ? /* @__PURE__ */ D(_, {
|
|
134
|
-
title:
|
|
135
|
-
description:
|
|
134
|
+
title: a("settingsTitle"),
|
|
135
|
+
description: a("settingsDescription"),
|
|
136
136
|
children: /* @__PURE__ */ O("ul", {
|
|
137
|
-
className:
|
|
137
|
+
className: u,
|
|
138
138
|
children: [t.repositories.map((t) => {
|
|
139
|
-
let
|
|
139
|
+
let r = n.find((e) => e.key === t.team)?.name ?? t.team;
|
|
140
140
|
return /* @__PURE__ */ D("li", {
|
|
141
141
|
className: "px-3 py-2 text-sm",
|
|
142
142
|
children: /* @__PURE__ */ D(U, {
|
|
143
143
|
workspace: e,
|
|
144
144
|
repository: t,
|
|
145
|
-
teamName:
|
|
145
|
+
teamName: r,
|
|
146
146
|
children: /* @__PURE__ */ O("div", {
|
|
147
147
|
className: "min-w-48 flex-1",
|
|
148
148
|
children: [/* @__PURE__ */ D("p", {
|
|
@@ -151,9 +151,9 @@ function B({ workspace: e }) {
|
|
|
151
151
|
}), /* @__PURE__ */ O("p", {
|
|
152
152
|
className: "text-xs text-muted-foreground",
|
|
153
153
|
children: [
|
|
154
|
-
|
|
154
|
+
r,
|
|
155
155
|
" · ",
|
|
156
|
-
t.syncMode ?
|
|
156
|
+
t.syncMode ? a("imported", { count: t.imported }) : a("notSynced")
|
|
157
157
|
]
|
|
158
158
|
})]
|
|
159
159
|
})
|
|
@@ -161,32 +161,32 @@ function B({ workspace: e }) {
|
|
|
161
161
|
}, `${t.id}:${t.team}`);
|
|
162
162
|
}), t.repositories.length === 0 && /* @__PURE__ */ D("li", {
|
|
163
163
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
164
|
-
children:
|
|
164
|
+
children: a("noRepositories")
|
|
165
165
|
})]
|
|
166
166
|
})
|
|
167
167
|
}) : null;
|
|
168
168
|
}
|
|
169
169
|
var V = "", H = 2e3;
|
|
170
|
-
function U({ workspace:
|
|
171
|
-
let
|
|
170
|
+
function U({ workspace: n, repository: a, teamName: s, children: l }) {
|
|
171
|
+
let u = T("github"), h = j(), _ = d(), { confirm: v, dialog: y } = o(), { data: b } = A(r(n)), { data: C = [] } = A(i(n)), w = (e) => C.find((t) => t.key === e) ?? {
|
|
172
172
|
icon: "",
|
|
173
173
|
name: e
|
|
174
|
-
}, M = (e) => w(e).name, N = (e) => () => /* @__PURE__ */ D(f, { team: w(e) }), P = (b?.repositories ?? []).filter((e) => e.id ===
|
|
174
|
+
}, M = (e) => w(e).name, N = (e) => () => /* @__PURE__ */ D(f, { team: w(e) }), P = (b?.repositories ?? []).filter((e) => e.id === a.id && e.team !== a.team), F = P.find((e) => e.syncMode), [I, L] = S(!1);
|
|
175
175
|
x(() => {
|
|
176
176
|
if (!I) return;
|
|
177
177
|
let e = setTimeout(() => L(!1), H);
|
|
178
178
|
return () => clearTimeout(e);
|
|
179
179
|
}, [I]);
|
|
180
180
|
let R = {
|
|
181
|
-
workspace:
|
|
182
|
-
repositoryId:
|
|
183
|
-
}, z = () => h.invalidateQueries({ queryKey:
|
|
184
|
-
mutationFn: async ({ syncMode:
|
|
181
|
+
workspace: n,
|
|
182
|
+
repositoryId: a.id
|
|
183
|
+
}, z = () => h.invalidateQueries({ queryKey: r(n).queryKey }), B = k({
|
|
184
|
+
mutationFn: async ({ syncMode: n, takeOver: r = !1 }) => t(n === V ? await e.DELETE("/api/v1/workspaces/{workspace}/github/repositories/{repositoryId}", { params: { path: R } }) : await e.PUT("/api/v1/workspaces/{workspace}/github/repositories/{repositoryId}", {
|
|
185
185
|
params: { path: R },
|
|
186
186
|
body: {
|
|
187
|
-
team:
|
|
188
|
-
syncMode:
|
|
189
|
-
takeOver:
|
|
187
|
+
team: a.team,
|
|
188
|
+
syncMode: n,
|
|
189
|
+
takeOver: r
|
|
190
190
|
}
|
|
191
191
|
})),
|
|
192
192
|
onMutate: () => {
|
|
@@ -196,55 +196,55 @@ function U({ workspace: e, repository: r, teamName: s, children: l }) {
|
|
|
196
196
|
onSettled: z,
|
|
197
197
|
onError: _.set
|
|
198
198
|
}), U = k({
|
|
199
|
-
mutationFn: async () =>
|
|
199
|
+
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/github/repositories/{repositoryId}/import", { params: { path: R } })),
|
|
200
200
|
onMutate: _.clear,
|
|
201
201
|
onSettled: z,
|
|
202
202
|
onError: _.set
|
|
203
203
|
}), G = k({
|
|
204
|
-
mutationFn: async (
|
|
204
|
+
mutationFn: async (n) => {
|
|
205
205
|
let r = { params: { path: R } }, i = "/api/v1/workspaces/{workspace}/github/repositories/{repositoryId}/import";
|
|
206
|
-
switch (
|
|
207
|
-
case "pause": return
|
|
208
|
-
case "resume": return
|
|
209
|
-
case "cancel": return
|
|
206
|
+
switch (n) {
|
|
207
|
+
case "pause": return t(await e.POST(`${i}/pause`, r));
|
|
208
|
+
case "resume": return t(await e.POST(`${i}/resume`, r));
|
|
209
|
+
case "cancel": return t(await e.POST(`${i}/cancel`, r));
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
212
|
onMutate: _.clear,
|
|
213
213
|
onSettled: z,
|
|
214
214
|
onError: _.set
|
|
215
|
-
}), K = (B.isPending ? B.variables.syncMode :
|
|
215
|
+
}), K = (B.isPending ? B.variables.syncMode : a.syncMode) ?? V, q = (e) => {
|
|
216
216
|
if (!F || e === V) {
|
|
217
217
|
B.mutate({ syncMode: e });
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
220
|
let t = M(F.team);
|
|
221
221
|
v({
|
|
222
|
-
title:
|
|
222
|
+
title: u("takeOverTitle", {
|
|
223
223
|
from: t,
|
|
224
|
-
repository:
|
|
224
|
+
repository: a.fullName
|
|
225
225
|
}),
|
|
226
|
-
description: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", { children:
|
|
226
|
+
description: /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", { children: u.rich("takeOverIntro", {
|
|
227
227
|
teamName: s,
|
|
228
|
-
team: N(
|
|
228
|
+
team: N(a.team)
|
|
229
229
|
}) }), /* @__PURE__ */ O("ul", {
|
|
230
230
|
className: "mt-2 list-disc space-y-1 pl-5",
|
|
231
|
-
children: [/* @__PURE__ */ D("li", { children:
|
|
231
|
+
children: [/* @__PURE__ */ D("li", { children: u.rich("takeOverNew", {
|
|
232
232
|
teamName: s,
|
|
233
|
-
team: N(
|
|
234
|
-
}) }), F.imported > 0 && /* @__PURE__ */ D("li", { children:
|
|
233
|
+
team: N(a.team)
|
|
234
|
+
}) }), F.imported > 0 && /* @__PURE__ */ D("li", { children: u.rich("takeOverKeeps", {
|
|
235
235
|
fromName: t,
|
|
236
236
|
from: N(F.team),
|
|
237
237
|
count: F.imported
|
|
238
238
|
}) })]
|
|
239
239
|
})] }),
|
|
240
|
-
confirmLabel:
|
|
240
|
+
confirmLabel: u("takeOver", { team: s }),
|
|
241
241
|
destructive: !1,
|
|
242
242
|
onConfirm: () => B.mutateAsync({
|
|
243
243
|
syncMode: e,
|
|
244
244
|
takeOver: !0
|
|
245
245
|
})
|
|
246
246
|
});
|
|
247
|
-
}, J =
|
|
247
|
+
}, J = a.import, Y = J?.status, X = U.isPending || G.isPending, Z = (e, t) => /* @__PURE__ */ D(p, {
|
|
248
248
|
size: "sm",
|
|
249
249
|
type: "button",
|
|
250
250
|
disabled: X,
|
|
@@ -260,14 +260,14 @@ function U({ workspace: e, repository: r, teamName: s, children: l }) {
|
|
|
260
260
|
role: "status",
|
|
261
261
|
className: "flex items-center gap-1 text-xs text-muted-foreground",
|
|
262
262
|
children: [
|
|
263
|
-
/* @__PURE__ */ D(
|
|
263
|
+
/* @__PURE__ */ D(c, { className: "size-3.5" }),
|
|
264
264
|
" ",
|
|
265
|
-
|
|
265
|
+
u("saved")
|
|
266
266
|
]
|
|
267
267
|
}),
|
|
268
268
|
/* @__PURE__ */ D(g, {
|
|
269
|
-
"aria-label":
|
|
270
|
-
repository:
|
|
269
|
+
"aria-label": u("modeFor", {
|
|
270
|
+
repository: a.fullName,
|
|
271
271
|
team: s
|
|
272
272
|
}),
|
|
273
273
|
value: K,
|
|
@@ -275,40 +275,40 @@ function U({ workspace: e, repository: r, teamName: s, children: l }) {
|
|
|
275
275
|
items: [
|
|
276
276
|
{
|
|
277
277
|
value: V,
|
|
278
|
-
label:
|
|
278
|
+
label: u("notSynced")
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
281
|
value: "two_way",
|
|
282
|
-
label:
|
|
283
|
-
description:
|
|
282
|
+
label: u("twoWay"),
|
|
283
|
+
description: u("twoWayDescription")
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
286
|
value: "import",
|
|
287
|
-
label:
|
|
288
|
-
description:
|
|
287
|
+
label: u("importOnly"),
|
|
288
|
+
description: u("importOnlyDescription")
|
|
289
289
|
}
|
|
290
290
|
],
|
|
291
291
|
onValueChange: q,
|
|
292
292
|
width: "content"
|
|
293
293
|
}),
|
|
294
|
-
|
|
294
|
+
a.syncMode && (Y === "running" ? [Z(u("pauseImport"), () => G.mutate("pause")), Z(u("cancelImport"), () => G.mutate("cancel"))] : Y === "paused" ? [Z(u("resumeImport"), () => G.mutate("resume")), Z(u("cancelImport"), () => G.mutate("cancel"))] : [Y === "failed" && Z(u("resumeImport"), () => G.mutate("resume")), Z(u(J ? "importAgain" : "import"), () => U.mutate())])
|
|
295
295
|
]
|
|
296
296
|
}),
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
a.syncMode && J && /* @__PURE__ */ D(W, { progress: J }),
|
|
298
|
+
a.syncMode && !J && /* @__PURE__ */ D("p", {
|
|
299
299
|
className: "mt-1 text-xs text-muted-foreground",
|
|
300
|
-
children:
|
|
300
|
+
children: u("importHint")
|
|
301
301
|
}),
|
|
302
|
-
!
|
|
302
|
+
!a.syncMode && F && /* @__PURE__ */ D("p", {
|
|
303
303
|
className: "mt-1 text-xs text-muted-foreground",
|
|
304
|
-
children:
|
|
304
|
+
children: u.rich("syncedBy", {
|
|
305
305
|
teamName: M(F.team),
|
|
306
306
|
team: N(F.team)
|
|
307
307
|
})
|
|
308
308
|
}),
|
|
309
|
-
|
|
309
|
+
a.syncMode && P.filter((e) => e.imported > 0).map((e) => /* @__PURE__ */ D("p", {
|
|
310
310
|
className: "mt-1 text-xs text-muted-foreground",
|
|
311
|
-
children:
|
|
311
|
+
children: u.rich("issuesElsewhere", {
|
|
312
312
|
count: e.imported,
|
|
313
313
|
teamName: M(e.team),
|
|
314
314
|
team: N(e.team)
|
|
@@ -398,7 +398,7 @@ function K({ links: e }) {
|
|
|
398
398
|
target: "_blank",
|
|
399
399
|
rel: "noreferrer",
|
|
400
400
|
className: "flex min-w-0 items-center gap-1.5 text-muted-foreground hover:text-foreground hover:underline",
|
|
401
|
-
children: [q.has(e.connector) && /* @__PURE__ */ D(
|
|
401
|
+
children: [q.has(e.connector) && /* @__PURE__ */ D(l, {
|
|
402
402
|
provider: e.connector,
|
|
403
403
|
className: "size-3.5"
|
|
404
404
|
}), /* @__PURE__ */ D("span", {
|
|
@@ -418,7 +418,7 @@ function J({ links: e }) {
|
|
|
418
418
|
target: "_blank",
|
|
419
419
|
rel: "noreferrer",
|
|
420
420
|
className: "inline-flex h-6 min-w-0 items-center gap-1.5 rounded-md border border-border px-1.5 text-xs text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
421
|
-
children: [/* @__PURE__ */ D(
|
|
421
|
+
children: [/* @__PURE__ */ D(l, {
|
|
422
422
|
provider: e.connector,
|
|
423
423
|
className: "size-3.5"
|
|
424
424
|
}), /* @__PURE__ */ D("span", {
|
package/components/Graph.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Link as e, useNavigate as t } from "../lib/router.js";
|
|
2
2
|
import { docGraphQuery as n, knowledgeGraphQuery as r, teamsQuery as i, workspaceQuery as a } from "../api/queries.js";
|
|
3
3
|
import { docRef as o } from "../lib/docs.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useTermRefs as s } from "../lib/knowledge.js";
|
|
5
|
+
import { FileTextIcon as c, LibraryIcon as l, ListViewIcon as u } from "./icons.js";
|
|
6
6
|
import { IconButton as d, SegmentedControl as f, Tooltip as p } from "@parallelworks/ui";
|
|
7
7
|
import { useMemo as m, useState as h } from "react";
|
|
8
8
|
import { useTranslations as g } from "use-intl";
|
|
@@ -14,9 +14,9 @@ import { Handle as T, MarkerType as E, Position as D, ReactFlow as O, ReactFlowP
|
|
|
14
14
|
import "@xyflow/react/dist/style.css";
|
|
15
15
|
// src/components/Graph.tsx
|
|
16
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
|
-
doc:
|
|
18
|
-
issue:
|
|
19
|
-
entry:
|
|
17
|
+
doc: c,
|
|
18
|
+
issue: u,
|
|
19
|
+
entry: l
|
|
20
20
|
}, I = "!size-1 !min-h-0 !min-w-0 !border-0 !bg-transparent";
|
|
21
21
|
function L({ data: e }) {
|
|
22
22
|
let { node: t, root: n, kind: r, vertical: i } = e, a = F[t.kind];
|
|
@@ -173,7 +173,7 @@ function B(e, t, n) {
|
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
function V(e) {
|
|
176
|
-
let n = t(), r =
|
|
176
|
+
let n = t(), r = s(e);
|
|
177
177
|
return (t) => {
|
|
178
178
|
t.kind === "doc" ? n({
|
|
179
179
|
to: "/$workspace/docs/$doc",
|
|
@@ -322,12 +322,12 @@ function G({ workspace: e, nodes: t, edges: n, width: r, rooted: o, height: s })
|
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
function K({ workspace: t, nodes: n, label: r }) {
|
|
325
|
-
let i =
|
|
325
|
+
let i = s(t), a = g("graph"), c = H(), l = "flex items-baseline gap-2 rounded-md px-2 py-1 text-sm hover:bg-muted";
|
|
326
326
|
return /* @__PURE__ */ v("ul", {
|
|
327
327
|
className: "mt-3 space-y-px",
|
|
328
328
|
"aria-label": r,
|
|
329
329
|
children: n.map((n) => {
|
|
330
|
-
let r =
|
|
330
|
+
let r = c(n), s = /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
|
|
331
331
|
className: "min-w-0 flex-1 truncate",
|
|
332
332
|
children: n.title
|
|
333
333
|
}), /* @__PURE__ */ v("span", {
|
|
@@ -343,24 +343,24 @@ function K({ workspace: t, nodes: n, label: r }) {
|
|
|
343
343
|
key: n.ref ?? ""
|
|
344
344
|
})
|
|
345
345
|
},
|
|
346
|
-
className:
|
|
347
|
-
children:
|
|
346
|
+
className: l,
|
|
347
|
+
children: s
|
|
348
348
|
}) : n.kind === "issue" ? /* @__PURE__ */ v(e, {
|
|
349
349
|
to: "/$workspace/issues/$identifier",
|
|
350
350
|
params: {
|
|
351
351
|
workspace: t,
|
|
352
352
|
identifier: n.ref ?? ""
|
|
353
353
|
},
|
|
354
|
-
className:
|
|
355
|
-
children:
|
|
354
|
+
className: l,
|
|
355
|
+
children: s
|
|
356
356
|
}) : /* @__PURE__ */ v(e, {
|
|
357
357
|
to: "/$workspace/knowledge/$term",
|
|
358
358
|
params: {
|
|
359
359
|
workspace: t,
|
|
360
360
|
term: i(n.id)
|
|
361
361
|
},
|
|
362
|
-
className:
|
|
363
|
-
children:
|
|
362
|
+
className: l,
|
|
363
|
+
children: s
|
|
364
364
|
}) }, n.id);
|
|
365
365
|
})
|
|
366
366
|
});
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { appLink as e } from "../lib/appLink.js";
|
|
2
|
+
import { useHostPanel as t } from "../lib/hostPanel.js";
|
|
3
3
|
import { Tooltip as n } from "@parallelworks/ui";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
// src/components/HostActions.tsx
|
|
6
6
|
var i = "flex size-8 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground";
|
|
7
7
|
function a({ className: a = "" }) {
|
|
8
|
-
let { actions: s, state: c, toggle: l } =
|
|
8
|
+
let { actions: s, state: c, toggle: l } = t();
|
|
9
9
|
return s.length === 0 ? null : /* @__PURE__ */ r("div", {
|
|
10
10
|
className: `flex items-center ${a}`,
|
|
11
|
-
children: s.map((
|
|
12
|
-
if (
|
|
13
|
-
let
|
|
11
|
+
children: s.map((t) => {
|
|
12
|
+
if (t.panel) {
|
|
13
|
+
let e = c?.id === t.id && c.open;
|
|
14
14
|
return /* @__PURE__ */ r(n, {
|
|
15
|
-
content:
|
|
15
|
+
content: t.label,
|
|
16
16
|
side: "bottom",
|
|
17
17
|
children: /* @__PURE__ */ r("button", {
|
|
18
18
|
type: "button",
|
|
19
|
-
"aria-label":
|
|
20
|
-
"aria-pressed":
|
|
21
|
-
onClick: () => l(
|
|
22
|
-
className: `${i} ${
|
|
23
|
-
children: /* @__PURE__ */ r(o, { action:
|
|
19
|
+
"aria-label": t.label,
|
|
20
|
+
"aria-pressed": e,
|
|
21
|
+
onClick: () => l(t),
|
|
22
|
+
className: `${i} ${e ? "bg-muted text-foreground" : ""}`,
|
|
23
|
+
children: /* @__PURE__ */ r(o, { action: t })
|
|
24
24
|
})
|
|
25
|
-
},
|
|
25
|
+
}, t.id);
|
|
26
26
|
}
|
|
27
|
-
let a = t
|
|
27
|
+
let a = e(t.url);
|
|
28
28
|
return a ? /* @__PURE__ */ r(n, {
|
|
29
|
-
content:
|
|
29
|
+
content: t.label,
|
|
30
30
|
side: "bottom",
|
|
31
31
|
children: /* @__PURE__ */ r("a", {
|
|
32
32
|
href: a,
|
|
33
|
-
"aria-label":
|
|
33
|
+
"aria-label": t.label,
|
|
34
34
|
className: i,
|
|
35
|
-
children: /* @__PURE__ */ r(o, { action:
|
|
35
|
+
children: /* @__PURE__ */ r(o, { action: t })
|
|
36
36
|
})
|
|
37
|
-
},
|
|
37
|
+
}, t.id) : null;
|
|
38
38
|
})
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function o({ action:
|
|
42
|
-
let n =
|
|
41
|
+
function o({ action: t }) {
|
|
42
|
+
let n = t.iconUrl ? e(t.iconUrl) : void 0;
|
|
43
43
|
return n ? /* @__PURE__ */ r("img", {
|
|
44
44
|
src: n,
|
|
45
45
|
alt: "",
|
|
@@ -47,7 +47,7 @@ function o({ action: e }) {
|
|
|
47
47
|
}) : /* @__PURE__ */ r("span", {
|
|
48
48
|
"aria-hidden": "true",
|
|
49
49
|
className: "text-xs font-semibold",
|
|
50
|
-
children:
|
|
50
|
+
children: t.label.trim().charAt(0).toUpperCase()
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
export { a as HostActions };
|
package/components/HostPanel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { appLink as e } from "../lib/appLink.js";
|
|
2
|
+
import { useHostPanel as t } from "../lib/hostPanel.js";
|
|
3
|
+
import { ExpandIcon as n, MinimizeIcon as r, ShrinkIcon as i } from "./icons.js";
|
|
4
4
|
import { IconButton as a } from "@parallelworks/ui";
|
|
5
5
|
import { useRef as o, useState as s } from "react";
|
|
6
6
|
import { useTranslations as c } from "use-intl";
|
|
7
7
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
8
|
// src/components/HostPanel.tsx
|
|
9
9
|
function d() {
|
|
10
|
-
let d = c("workspace"), { actions: f, state: p, close: m, resize: h, maximize: g } =
|
|
10
|
+
let d = c("workspace"), { actions: f, state: p, close: m, resize: h, maximize: g } = t(), [_, v] = s(!1), y = o(null), b = p && f.find((e) => e.id === p.id), x = p && e(p.url);
|
|
11
11
|
if (!p || !b || !x) return null;
|
|
12
12
|
let S = () => Math.max(160, window.innerHeight * .85);
|
|
13
13
|
return /* @__PURE__ */ u("section", {
|
|
@@ -49,14 +49,14 @@ function d() {
|
|
|
49
49
|
/* @__PURE__ */ l(a, {
|
|
50
50
|
size: "sm",
|
|
51
51
|
variant: "ghost",
|
|
52
|
-
icon: p.maximized ? /* @__PURE__ */ l(
|
|
52
|
+
icon: p.maximized ? /* @__PURE__ */ l(i, { className: "size-3.5" }) : /* @__PURE__ */ l(n, { className: "size-3.5" }),
|
|
53
53
|
label: p.maximized ? d("restorePanel") : d("maximizePanel"),
|
|
54
54
|
onClick: () => g(!p.maximized)
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ l(a, {
|
|
57
57
|
size: "sm",
|
|
58
58
|
variant: "ghost",
|
|
59
|
-
icon: /* @__PURE__ */ l(
|
|
59
|
+
icon: /* @__PURE__ */ l(r, { className: "size-3.5" }),
|
|
60
60
|
label: d("minimizePanel"),
|
|
61
61
|
onClick: m
|
|
62
62
|
})
|