@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/HoverCards.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { docKey as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { docQuery as n, docsQuery as r, knowledgeQuery as i, membersQuery as a, teamsQuery as o } from "../api/queries.js";
|
|
3
|
+
import { docLooks as s } from "../lib/docLooks.js";
|
|
4
|
+
import { docKey as c, docRef as l } from "../lib/docs.js";
|
|
5
|
+
import { glossary as u, headingAnchor as d } from "../lib/glossary.js";
|
|
6
|
+
import { issueRefs as f } from "../lib/issueRefs.js";
|
|
7
|
+
import { useTermRefs as p } from "../lib/knowledge.js";
|
|
7
8
|
import { termRef as m } from "../lib/knowledgeKinds.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { termCaretEvent as x } from "./editorPlugins.js";
|
|
9
|
+
import { mentionable as h } from "../lib/mentions.js";
|
|
10
|
+
import { Link as g, useNavigate as _ } from "../lib/router.js";
|
|
11
|
+
import { teamNames as v } from "../lib/teamNames.js";
|
|
12
|
+
import { DocIcon as y } from "./DocIcon.js";
|
|
13
|
+
import { termCaretEvent as b } from "./editorPlugins.js";
|
|
14
|
+
import { FileTextIcon as x } from "./icons.js";
|
|
15
15
|
import { PersonCard as S } from "./PersonHoverCard.js";
|
|
16
16
|
import { HoverCard as C, Loader as w, StatusLabel as T } from "@parallelworks/ui";
|
|
17
17
|
import { useEffect as E, useRef as D, useState as O } from "react";
|
|
@@ -43,14 +43,14 @@ function R(e) {
|
|
|
43
43
|
return r?.[1] ? {
|
|
44
44
|
kind: "doc",
|
|
45
45
|
el: t,
|
|
46
|
-
key:
|
|
46
|
+
key: c(r[1])
|
|
47
47
|
} : null;
|
|
48
48
|
}
|
|
49
49
|
function z({ workspace: n }) {
|
|
50
|
-
let [
|
|
51
|
-
|
|
52
|
-
let t =
|
|
53
|
-
|
|
50
|
+
let [c, l] = O(null), d = D(null), p = D(void 0), { data: g } = N(i(n)), y = _(), x = D((e) => {});
|
|
51
|
+
x.current = (e) => {
|
|
52
|
+
let t = g?.find((t) => t.id === e);
|
|
53
|
+
y({
|
|
54
54
|
to: "/$workspace/knowledge/$term",
|
|
55
55
|
params: {
|
|
56
56
|
workspace: n,
|
|
@@ -58,23 +58,23 @@ function z({ workspace: n }) {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}, E(() => {
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
let { data: w } = N(
|
|
61
|
+
u.set(g ?? []);
|
|
62
|
+
}, [g]), E(() => () => u.set([]), []);
|
|
63
|
+
let { data: w } = N(r(n));
|
|
64
64
|
E(() => {
|
|
65
|
-
|
|
66
|
-
}, [w]), E(() => () =>
|
|
67
|
-
let { data: T } = N(
|
|
65
|
+
s.set(w ?? []);
|
|
66
|
+
}, [w]), E(() => () => s.set([]), []);
|
|
67
|
+
let { data: T } = N(a(n));
|
|
68
68
|
E(() => {
|
|
69
|
-
|
|
70
|
-
}, [T]), E(() => () =>
|
|
71
|
-
let { data: k } = N(
|
|
69
|
+
h.set((T ?? []).map((e) => e.user.username));
|
|
70
|
+
}, [T]), E(() => () => h.set([]), []);
|
|
71
|
+
let { data: k } = N(o(n));
|
|
72
72
|
E(() => {
|
|
73
|
-
|
|
74
|
-
}, [k]), E(() => () =>
|
|
73
|
+
v.set(k ?? []);
|
|
74
|
+
}, [k]), E(() => () => v.set([]), []);
|
|
75
75
|
let A = P();
|
|
76
76
|
E(() => {
|
|
77
|
-
|
|
77
|
+
f.set(n, async (r) => {
|
|
78
78
|
let { issues: i } = t(await e.POST("/api/v1/workspaces/{workspace}/issue-refs", {
|
|
79
79
|
params: { path: { workspace: n } },
|
|
80
80
|
body: { identifiers: r }
|
|
@@ -82,14 +82,14 @@ function z({ workspace: n }) {
|
|
|
82
82
|
return new Map(i.map((e) => [e.identifier, e.issue]));
|
|
83
83
|
});
|
|
84
84
|
let r, i = A.getQueryCache().subscribe((e) => {
|
|
85
|
-
e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() =>
|
|
85
|
+
e.type === "updated" && e.query.queryKey[2] === "issues" && (clearTimeout(r), r = setTimeout(() => f.refresh(), 1e3));
|
|
86
86
|
});
|
|
87
87
|
return () => {
|
|
88
|
-
clearTimeout(r), i(),
|
|
88
|
+
clearTimeout(r), i(), f.set("", void 0);
|
|
89
89
|
};
|
|
90
90
|
}, [n, A]);
|
|
91
91
|
let M = D((e) => {});
|
|
92
|
-
M.current = (e) =>
|
|
92
|
+
M.current = (e) => y({
|
|
93
93
|
to: "/$workspace/issues/$identifier",
|
|
94
94
|
params: {
|
|
95
95
|
workspace: n,
|
|
@@ -97,7 +97,7 @@ function z({ workspace: n }) {
|
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
99
|
let F = D((e) => {});
|
|
100
|
-
F.current = (e) =>
|
|
100
|
+
F.current = (e) => y({
|
|
101
101
|
to: "/$workspace/teams/$key/issues",
|
|
102
102
|
params: {
|
|
103
103
|
workspace: n,
|
|
@@ -105,17 +105,17 @@ function z({ workspace: n }) {
|
|
|
105
105
|
}
|
|
106
106
|
}), E(() => {
|
|
107
107
|
let e = (e, t) => {
|
|
108
|
-
clearTimeout(
|
|
108
|
+
clearTimeout(p.current), p.current = setTimeout(e, t);
|
|
109
109
|
}, t = (t) => {
|
|
110
110
|
if (t.pointerType === "touch") return;
|
|
111
111
|
let n = R(t.target);
|
|
112
112
|
n && e(() => l(n), I);
|
|
113
113
|
}, n = (t) => {
|
|
114
114
|
let n = t.relatedTarget;
|
|
115
|
-
n &&
|
|
115
|
+
n && d.current?.contains(n) || R(t.target) && e(() => l(null), L);
|
|
116
116
|
}, r = (e) => {
|
|
117
117
|
let t = R(e.target);
|
|
118
|
-
t && (clearTimeout(
|
|
118
|
+
t && (clearTimeout(p.current), l(t));
|
|
119
119
|
}, i = (e) => {
|
|
120
120
|
e.target.matches?.(".kb-term[tabindex], .prose-issue a[href*=\"/docs/\"]") && r(e);
|
|
121
121
|
}, a = (e) => {
|
|
@@ -132,40 +132,40 @@ function z({ workspace: n }) {
|
|
|
132
132
|
let o = e.target.closest?.(".kb-term");
|
|
133
133
|
if (!o) return;
|
|
134
134
|
let s = o.dataset.term;
|
|
135
|
-
s && (!o.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), l(null),
|
|
135
|
+
s && (!o.closest("[contenteditable=\"true\"]") || e.metaKey || e.ctrlKey) ? (e.preventDefault(), l(null), x.current(s)) : r(e);
|
|
136
136
|
}, o = (e) => {
|
|
137
|
-
e.key === "Escape" &&
|
|
137
|
+
e.key === "Escape" && d.current?.isConnected && (e.stopPropagation(), e.preventDefault(), l((e) => (e?.el.tabIndex === 0 && e.el.focus(), null)));
|
|
138
138
|
};
|
|
139
|
-
return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener(
|
|
140
|
-
clearTimeout(
|
|
139
|
+
return document.addEventListener("pointerover", t), document.addEventListener("pointerout", n), document.addEventListener("focusin", i), document.addEventListener("click", a), document.addEventListener(b, r), document.addEventListener("keydown", o, !0), () => {
|
|
140
|
+
clearTimeout(p.current), document.removeEventListener("pointerover", t), document.removeEventListener("pointerout", n), document.removeEventListener("focusin", i), document.removeEventListener("click", a), document.removeEventListener(b, r), document.removeEventListener("keydown", o, !0);
|
|
141
141
|
};
|
|
142
142
|
}, []), E(() => {
|
|
143
|
-
if (!
|
|
143
|
+
if (!c) return;
|
|
144
144
|
let e = (e) => {
|
|
145
145
|
let t = e.target;
|
|
146
|
-
!
|
|
146
|
+
!d.current?.contains(t) && !c.el.contains(t) && l(null);
|
|
147
147
|
};
|
|
148
148
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
149
|
-
}, [
|
|
150
|
-
let z =
|
|
149
|
+
}, [c]);
|
|
150
|
+
let z = c?.el.isConnected ? c : null;
|
|
151
151
|
return /* @__PURE__ */ j(C, {
|
|
152
152
|
at: z?.el ?? null,
|
|
153
153
|
open: !!z,
|
|
154
154
|
onOpenChange: (e) => {
|
|
155
155
|
e || l(null);
|
|
156
156
|
},
|
|
157
|
-
onPointerEnter: () => clearTimeout(
|
|
157
|
+
onPointerEnter: () => clearTimeout(p.current),
|
|
158
158
|
onPointerLeave: () => {
|
|
159
|
-
clearTimeout(
|
|
159
|
+
clearTimeout(p.current), p.current = setTimeout(() => l(null), L);
|
|
160
160
|
},
|
|
161
161
|
card: z && /* @__PURE__ */ j("div", {
|
|
162
|
-
ref:
|
|
162
|
+
ref: d,
|
|
163
163
|
role: "dialog",
|
|
164
164
|
"aria-label": z.kind === "doc" ? z.key : z.kind === "person" ? z.username : void 0,
|
|
165
165
|
className: z.kind === "person" ? "" : "w-80 max-w-[calc(100vw-16px)] p-3 text-sm",
|
|
166
166
|
children: z.kind === "term" ? /* @__PURE__ */ j(H, {
|
|
167
167
|
workspace: n,
|
|
168
|
-
entry:
|
|
168
|
+
entry: g?.find((e) => e.id === z.id)
|
|
169
169
|
}) : z.kind === "person" ? /* @__PURE__ */ j(S, {
|
|
170
170
|
workspace: n,
|
|
171
171
|
handle: z.username
|
|
@@ -193,17 +193,17 @@ function V({ status: e }) {
|
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
function H({ workspace: e, entry: t }) {
|
|
196
|
-
let
|
|
196
|
+
let n = k("knowledge"), r = p(e);
|
|
197
197
|
if (!t) return /* @__PURE__ */ j("p", {
|
|
198
198
|
className: "text-muted-foreground",
|
|
199
|
-
children:
|
|
199
|
+
children: n("gone")
|
|
200
200
|
});
|
|
201
|
-
let
|
|
201
|
+
let i = t.source.doc;
|
|
202
202
|
return /* @__PURE__ */ M(A, { children: [
|
|
203
203
|
/* @__PURE__ */ M("p", {
|
|
204
204
|
className: "flex items-center gap-2",
|
|
205
205
|
children: [
|
|
206
|
-
/* @__PURE__ */ j(
|
|
206
|
+
/* @__PURE__ */ j(g, {
|
|
207
207
|
to: "/$workspace/knowledge/$term",
|
|
208
208
|
params: {
|
|
209
209
|
workspace: e,
|
|
@@ -214,7 +214,7 @@ function H({ workspace: e, entry: t }) {
|
|
|
214
214
|
}),
|
|
215
215
|
/* @__PURE__ */ j("span", {
|
|
216
216
|
className: "text-xs text-muted-foreground",
|
|
217
|
-
children:
|
|
217
|
+
children: n(`kind.${t.kind}`)
|
|
218
218
|
}),
|
|
219
219
|
(t.kind !== "term" || t.status !== "decided") && /* @__PURE__ */ j("span", {
|
|
220
220
|
className: "ml-auto",
|
|
@@ -228,31 +228,31 @@ function H({ workspace: e, entry: t }) {
|
|
|
228
228
|
}),
|
|
229
229
|
t.supersededBy && /* @__PURE__ */ j("p", {
|
|
230
230
|
className: "mt-1.5 text-xs",
|
|
231
|
-
children: /* @__PURE__ */ j(
|
|
231
|
+
children: /* @__PURE__ */ j(g, {
|
|
232
232
|
to: "/$workspace/knowledge/$term",
|
|
233
233
|
params: {
|
|
234
234
|
workspace: e,
|
|
235
|
-
term:
|
|
235
|
+
term: r(t.supersededBy)
|
|
236
236
|
},
|
|
237
237
|
className: "text-primary hover:underline",
|
|
238
|
-
children:
|
|
238
|
+
children: n("supersededBy", { name: t.supersededByName ?? "" })
|
|
239
239
|
})
|
|
240
240
|
}),
|
|
241
|
-
(
|
|
241
|
+
(i || t.source.identifier) && /* @__PURE__ */ M("p", {
|
|
242
242
|
className: "mt-2 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",
|
|
243
|
-
children: [
|
|
243
|
+
children: [i && /* @__PURE__ */ M(g, {
|
|
244
244
|
to: "/$workspace/docs/$doc",
|
|
245
245
|
params: {
|
|
246
246
|
workspace: e,
|
|
247
|
-
doc:
|
|
247
|
+
doc: l(i)
|
|
248
248
|
},
|
|
249
|
-
...t.source.section && { hash:
|
|
249
|
+
...t.source.section && { hash: d(t.source.section) },
|
|
250
250
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
251
|
-
children: [/* @__PURE__ */ j(
|
|
252
|
-
doc:
|
|
251
|
+
children: [/* @__PURE__ */ j(x, { className: "size-3" }), t.source.section ? n("sourceSection", {
|
|
252
|
+
doc: i.title,
|
|
253
253
|
section: t.source.section
|
|
254
|
-
}) :
|
|
255
|
-
}), t.source.identifier && /* @__PURE__ */ j(
|
|
254
|
+
}) : i.title]
|
|
255
|
+
}), t.source.identifier && /* @__PURE__ */ j(g, {
|
|
256
256
|
to: "/$workspace/issues/$identifier",
|
|
257
257
|
params: {
|
|
258
258
|
workspace: e,
|
|
@@ -262,14 +262,14 @@ function H({ workspace: e, entry: t }) {
|
|
|
262
262
|
children: t.source.identifier
|
|
263
263
|
})]
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */ j(
|
|
265
|
+
/* @__PURE__ */ j(g, {
|
|
266
266
|
to: "/$workspace/knowledge/$term",
|
|
267
267
|
params: {
|
|
268
268
|
workspace: e,
|
|
269
269
|
term: m(t)
|
|
270
270
|
},
|
|
271
271
|
className: "mt-2 block text-xs text-primary hover:underline",
|
|
272
|
-
children:
|
|
272
|
+
children: n("openEntry")
|
|
273
273
|
})
|
|
274
274
|
] });
|
|
275
275
|
}
|
|
@@ -277,26 +277,26 @@ function U(e) {
|
|
|
277
277
|
return e.split("\n").map((e) => e.replace(/^#{1,6}\s+|^[-*>]\s+|^\d+\.\s+|\[[ x]\]\s*/g, "").replace(/[*_`]/g, "")).filter((e) => e.trim()).slice(0, 4).join(" ").slice(0, 280);
|
|
278
278
|
}
|
|
279
279
|
function W({ workspace: e, docKey: t }) {
|
|
280
|
-
let
|
|
281
|
-
...
|
|
280
|
+
let r = k("docLinks"), { data: i, isError: a } = N({
|
|
281
|
+
...n(e, t),
|
|
282
282
|
retry: !1
|
|
283
283
|
});
|
|
284
284
|
return a ? /* @__PURE__ */ j("p", {
|
|
285
285
|
className: "text-muted-foreground",
|
|
286
|
-
children:
|
|
287
|
-
}) :
|
|
286
|
+
children: r("unavailable")
|
|
287
|
+
}) : i ? /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ M("p", {
|
|
288
288
|
className: "flex items-center gap-2 font-semibold",
|
|
289
|
-
children: [/* @__PURE__ */ j(
|
|
290
|
-
icon:
|
|
289
|
+
children: [/* @__PURE__ */ j(y, {
|
|
290
|
+
icon: i.icon,
|
|
291
291
|
className: "size-3.5",
|
|
292
292
|
emojiClassName: "text-xs"
|
|
293
293
|
}), /* @__PURE__ */ j("span", {
|
|
294
294
|
className: "truncate",
|
|
295
|
-
children:
|
|
295
|
+
children: i.title
|
|
296
296
|
})]
|
|
297
297
|
}), /* @__PURE__ */ j("p", {
|
|
298
298
|
className: "mt-1.5 line-clamp-4 text-muted-foreground",
|
|
299
|
-
children: U(
|
|
299
|
+
children: U(i.body ?? "") || r("empty")
|
|
300
300
|
})] }) : /* @__PURE__ */ j(w, { size: 16 });
|
|
301
301
|
}
|
|
302
302
|
export { z as HoverCards, V as KnowledgeStatus };
|
package/components/IssueBoard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { usePeople as e } from "../lib/people.js";
|
|
2
|
+
import { Link as t } from "../lib/router.js";
|
|
3
|
+
import { TypeIcon as n } from "./IssueTypes.js";
|
|
4
|
+
import { PriorityIcon as r, ProjectIcon as i } from "./icons.js";
|
|
5
5
|
import { Avatar as a } from "@parallelworks/ui";
|
|
6
6
|
import { useState as o } from "react";
|
|
7
7
|
import { useTranslations as s } from "use-intl";
|
|
@@ -58,8 +58,8 @@ function u({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
|
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
function d({ workspace: o, issue: s, draggable: u, onDragStart: d, onDragEnd: f, onContextMenu: p }) {
|
|
61
|
-
let { nameOf: m, avatarOf: h } =
|
|
62
|
-
return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l(
|
|
61
|
+
let { nameOf: m, avatarOf: h } = e(o), g = s.assignees[0];
|
|
62
|
+
return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l(t, {
|
|
63
63
|
to: "/$workspace/issues/$identifier",
|
|
64
64
|
params: {
|
|
65
65
|
workspace: o,
|
|
@@ -76,12 +76,15 @@ function d({ workspace: o, issue: s, draggable: u, onDragStart: d, onDragEnd: f,
|
|
|
76
76
|
/* @__PURE__ */ l("span", {
|
|
77
77
|
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */ c(
|
|
80
|
-
s.type && /* @__PURE__ */ c(
|
|
79
|
+
/* @__PURE__ */ c(r, { priority: s.priority }),
|
|
80
|
+
s.type && /* @__PURE__ */ c(n, {
|
|
81
81
|
type: s.type,
|
|
82
82
|
className: "size-3.5"
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */ c("span", {
|
|
84
|
+
/* @__PURE__ */ c("span", {
|
|
85
|
+
className: "shrink-0 whitespace-nowrap",
|
|
86
|
+
children: s.identifier
|
|
87
|
+
}),
|
|
85
88
|
g && /* @__PURE__ */ c(a, {
|
|
86
89
|
name: m(g.kind, g.handle),
|
|
87
90
|
src: h(g.kind, g.handle),
|
|
@@ -98,7 +101,7 @@ function d({ workspace: o, issue: s, draggable: u, onDragStart: d, onDragEnd: f,
|
|
|
98
101
|
className: "flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",
|
|
99
102
|
children: [s.project && /* @__PURE__ */ l("span", {
|
|
100
103
|
className: "inline-flex max-w-full items-center gap-1 truncate",
|
|
101
|
-
children: [/* @__PURE__ */ c(
|
|
104
|
+
children: [/* @__PURE__ */ c(i, { className: "size-3 shrink-0" }), /* @__PURE__ */ c("span", {
|
|
102
105
|
className: "truncate",
|
|
103
106
|
children: s.project.name
|
|
104
107
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { usePeople as
|
|
3
|
-
import {
|
|
1
|
+
import { actorAvatar as e } from "../lib/avatar.js";
|
|
2
|
+
import { usePeople as t } from "../lib/people.js";
|
|
3
|
+
import { CycleIcon as n, PriorityIcon as r, ProjectIcon as i, UserIcon as a, usePriorityNames as o } from "./icons.js";
|
|
4
4
|
import { Avatar as s, Tabs as c } from "@parallelworks/ui";
|
|
5
5
|
import { useLocale as l, useTranslations as u } from "use-intl";
|
|
6
6
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
@@ -31,7 +31,7 @@ var g = [
|
|
|
31
31
|
0
|
|
32
32
|
];
|
|
33
33
|
function _({ workspace: _, issues: b, tabs: x, tab: S, onTabChange: C, focus: w, onFocus: T }) {
|
|
34
|
-
let E = u("planning.issueBreakdown"), D = l(), O =
|
|
34
|
+
let E = u("planning.issueBreakdown"), D = l(), O = o(), { nameOf: k, avatarOf: A } = t(_), j = new Intl.NumberFormat(D, {
|
|
35
35
|
style: "percent",
|
|
36
36
|
maximumFractionDigits: 0
|
|
37
37
|
}), M = /* @__PURE__ */ new Map();
|
|
@@ -48,60 +48,60 @@ function _({ workspace: _, issues: b, tabs: x, tab: S, onTabChange: C, focus: w,
|
|
|
48
48
|
}, M.set(n, r)), r.done += t, r.total++;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
function N(
|
|
51
|
+
function N(t, o) {
|
|
52
52
|
switch (S) {
|
|
53
53
|
case "assignees": {
|
|
54
|
-
if (
|
|
54
|
+
if (o === m) return {
|
|
55
55
|
name: E("noAssignee"),
|
|
56
|
-
icon: /* @__PURE__ */ f(
|
|
56
|
+
icon: /* @__PURE__ */ f(a, { className: "size-5 text-muted-foreground" })
|
|
57
57
|
};
|
|
58
|
-
let
|
|
58
|
+
let n = t.assignees.find((e) => `${e.kind}:${e.handle}` === o), r = n ? k(n.kind, n.handle) : o;
|
|
59
59
|
return {
|
|
60
|
-
name:
|
|
61
|
-
icon:
|
|
60
|
+
name: r,
|
|
61
|
+
icon: n && /* @__PURE__ */ f(s, {
|
|
62
62
|
size: "xs",
|
|
63
|
-
...
|
|
64
|
-
name:
|
|
65
|
-
src: A(
|
|
63
|
+
...e(n.kind),
|
|
64
|
+
name: r,
|
|
65
|
+
src: A(n.kind, n.handle)
|
|
66
66
|
})
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
69
|
case "labels": {
|
|
70
|
-
if (
|
|
70
|
+
if (o === m) return {
|
|
71
71
|
name: E("noLabel"),
|
|
72
72
|
icon: /* @__PURE__ */ f(v, { color: "" })
|
|
73
73
|
};
|
|
74
|
-
let e =
|
|
74
|
+
let e = t.labels.find((e) => e.id === o);
|
|
75
75
|
return {
|
|
76
|
-
name: e?.name ??
|
|
76
|
+
name: e?.name ?? o,
|
|
77
77
|
icon: /* @__PURE__ */ f(v, { color: e?.color ?? "" })
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
case "priority": return {
|
|
81
|
-
name: O[Number(
|
|
82
|
-
icon: /* @__PURE__ */ f(
|
|
83
|
-
priority: Number(
|
|
81
|
+
name: O[Number(o)] ?? o,
|
|
82
|
+
icon: /* @__PURE__ */ f(r, {
|
|
83
|
+
priority: Number(o),
|
|
84
84
|
className: "text-muted-foreground"
|
|
85
85
|
})
|
|
86
86
|
};
|
|
87
|
-
case "projects": return
|
|
87
|
+
case "projects": return o === m ? {
|
|
88
88
|
name: E("noProject"),
|
|
89
|
-
icon: /* @__PURE__ */ f(
|
|
89
|
+
icon: /* @__PURE__ */ f(i, { className: "text-muted-foreground" })
|
|
90
90
|
} : {
|
|
91
|
-
name:
|
|
92
|
-
icon: /* @__PURE__ */ f(
|
|
91
|
+
name: t.project?.name ?? o,
|
|
92
|
+
icon: /* @__PURE__ */ f(i, { className: "text-muted-foreground" })
|
|
93
93
|
};
|
|
94
94
|
case "cycles": {
|
|
95
|
-
let
|
|
96
|
-
return
|
|
95
|
+
let e = /* @__PURE__ */ f(n, { className: "text-muted-foreground" }), r = t.cycle;
|
|
96
|
+
return o === m || !r ? {
|
|
97
97
|
name: E("noCycle"),
|
|
98
|
-
icon:
|
|
98
|
+
icon: e
|
|
99
99
|
} : {
|
|
100
|
-
name:
|
|
101
|
-
number:
|
|
102
|
-
name:
|
|
103
|
-
}) : E("cycle", { number:
|
|
104
|
-
icon:
|
|
100
|
+
name: r.name ? E("cycleNamed", {
|
|
101
|
+
number: r.number,
|
|
102
|
+
name: r.name
|
|
103
|
+
}) : E("cycle", { number: r.number }),
|
|
104
|
+
icon: e
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
}
|
package/components/IssueCode.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { branchesQuery as n, pullRequestsQuery as r, repositoriesQuery as i } from "../api/queries.js";
|
|
3
|
+
import { branchName as a } from "../lib/branch.js";
|
|
4
|
+
import { externalUrl as o } from "../lib/externalUrl.js";
|
|
5
|
+
import { copyItem as s } from "../lib/menus.js";
|
|
6
|
+
import { useCan as c } from "../lib/roles.js";
|
|
7
|
+
import { BranchIcon as l, CloseIcon as u, CodeHostIcon as d, PullRequestIcon as f } from "./icons.js";
|
|
8
8
|
import { Card as p, CopyButton as m, IconButton as h, useOpenMenu as g } from "@parallelworks/ui";
|
|
9
9
|
import { useTranslations as _ } from "use-intl";
|
|
10
10
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
@@ -24,19 +24,19 @@ function D(e) {
|
|
|
24
24
|
return `${e.provider === "gitlab" ? "!" : "#"}${e.number}`;
|
|
25
25
|
}
|
|
26
26
|
function O({ workspace: O, identifier: k, title: A }) {
|
|
27
|
-
let j = _("code"), M = _("common"), { data: N } = C(
|
|
27
|
+
let j = _("code"), M = _("common"), { data: N } = C(r(O, k)), { data: P } = C(n(O, k)), F = g(), I = new Set(N.map((e) => `${e.repository} ${e.headRef}`)), L = P.filter((e) => !I.has(`${e.repository} ${e.name}`)), R = k.slice(0, k.lastIndexOf("-")), { data: z = [] } = x(i(O, R)), B = c(O, "edit_issues"), V = S(), H = b({
|
|
28
28
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/pull-requests/{pullRequestId}", { params: { path: {
|
|
29
29
|
workspace: O,
|
|
30
30
|
identifier: k,
|
|
31
31
|
pullRequestId: n
|
|
32
32
|
} } })),
|
|
33
33
|
onSettled: () => {
|
|
34
|
-
V.invalidateQueries({ queryKey:
|
|
34
|
+
V.invalidateQueries({ queryKey: r(O, k).queryKey }), V.invalidateQueries({ queryKey: n(O, k).queryKey });
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
if (N.length === 0 && L.length === 0) {
|
|
38
38
|
if (z.length === 0) return null;
|
|
39
|
-
let e =
|
|
39
|
+
let e = a(k, A);
|
|
40
40
|
return /* @__PURE__ */ y("section", {
|
|
41
41
|
className: "mt-6",
|
|
42
42
|
"aria-label": j("pullRequests"),
|
|
@@ -46,7 +46,7 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
46
46
|
}), /* @__PURE__ */ y("div", {
|
|
47
47
|
className: "mt-1 flex items-start gap-3 rounded-xl border border-dashed border-border px-3 py-2",
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */ v(
|
|
49
|
+
/* @__PURE__ */ v(l, { className: "mt-0.5 size-4 shrink-0 text-muted-foreground" }),
|
|
50
50
|
/* @__PURE__ */ y("div", {
|
|
51
51
|
className: "min-w-0 flex-1",
|
|
52
52
|
children: [/* @__PURE__ */ v("p", {
|
|
@@ -90,7 +90,7 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
90
90
|
render: /* @__PURE__ */ v("ul", {}),
|
|
91
91
|
className: "mt-1",
|
|
92
92
|
children: [N.map((e) => {
|
|
93
|
-
let t = E(e), n =
|
|
93
|
+
let t = E(e), n = o(e.url);
|
|
94
94
|
return /* @__PURE__ */ y("li", {
|
|
95
95
|
className: "group flex items-center hover:bg-muted",
|
|
96
96
|
children: [/* @__PURE__ */ y("a", {
|
|
@@ -99,8 +99,8 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
99
99
|
rel: "noopener noreferrer",
|
|
100
100
|
onContextMenu: (t) => F(t, [
|
|
101
101
|
U(n),
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
s(M("copyLink"), e.url),
|
|
103
|
+
s(j("copyBranch"), e.headRef),
|
|
104
104
|
...B ? [{
|
|
105
105
|
label: j("unlinkPullRequest"),
|
|
106
106
|
onClick: () => H.mutate(e.id)
|
|
@@ -108,8 +108,8 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
108
108
|
]),
|
|
109
109
|
className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */ v(
|
|
112
|
-
/* @__PURE__ */ v(
|
|
111
|
+
/* @__PURE__ */ v(f, { className: `size-4 ${w[t]}` }),
|
|
112
|
+
/* @__PURE__ */ v(d, {
|
|
113
113
|
provider: e.provider,
|
|
114
114
|
className: "size-3.5 text-muted-foreground"
|
|
115
115
|
}),
|
|
@@ -146,7 +146,7 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
146
146
|
})
|
|
147
147
|
]
|
|
148
148
|
}), B && /* @__PURE__ */ v(h, {
|
|
149
|
-
icon: /* @__PURE__ */ v(
|
|
149
|
+
icon: /* @__PURE__ */ v(u, {}),
|
|
150
150
|
label: j("unlinkPullRequest"),
|
|
151
151
|
variant: "ghost",
|
|
152
152
|
size: "sm",
|
|
@@ -156,15 +156,15 @@ function O({ workspace: O, identifier: k, title: A }) {
|
|
|
156
156
|
})]
|
|
157
157
|
}, `${e.repository}#${e.number}`);
|
|
158
158
|
}), L.map((e) => {
|
|
159
|
-
let t =
|
|
159
|
+
let t = o(e.url);
|
|
160
160
|
return /* @__PURE__ */ v("li", { children: /* @__PURE__ */ y("a", {
|
|
161
161
|
href: t,
|
|
162
162
|
target: "_blank",
|
|
163
163
|
rel: "noopener noreferrer",
|
|
164
|
-
onContextMenu: (n) => F(n, [U(t),
|
|
164
|
+
onContextMenu: (n) => F(n, [U(t), s(j("copyBranch"), e.name)]),
|
|
165
165
|
className: "flex items-center gap-3 px-3 py-2 text-sm hover:bg-muted",
|
|
166
166
|
children: [
|
|
167
|
-
/* @__PURE__ */ v(
|
|
167
|
+
/* @__PURE__ */ v(l, { className: "size-4 text-muted-foreground" }),
|
|
168
168
|
/* @__PURE__ */ v("span", {
|
|
169
169
|
className: "min-w-0 flex-1 truncate font-mono text-xs",
|
|
170
170
|
children: e.name
|
package/components/IssueEvent.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { usePeople as e } from "../lib/people.js";
|
|
2
|
+
import { useTime as t } from "../lib/time.js";
|
|
3
|
+
import { TimelineItem as n, activityIcon as r } from "./ActivityTimeline.js";
|
|
4
4
|
import { useMoney as i } from "./AgentWork.js";
|
|
5
|
-
import {
|
|
5
|
+
import { StatusIcon as a, usePriorityNames as o } from "./icons.js";
|
|
6
6
|
import { useFormatter as s, useTranslations as c } from "use-intl";
|
|
7
7
|
import { jsx as l } from "react/jsx-runtime";
|
|
8
8
|
// src/components/IssueEvent.tsx
|
|
@@ -13,18 +13,18 @@ function d(e) {
|
|
|
13
13
|
return e.type === "related" ? "related" : e.type === "blocks" ? e.outgoing ? "blocks" : "blockedBy" : e.outgoing ? "duplicates" : "duplicatedBy";
|
|
14
14
|
}
|
|
15
15
|
function f({ workspace: f, event: p }) {
|
|
16
|
-
let m = c("relations"), h = c("flow"), g = c("issue.events"), _ = s(), v = i(), y =
|
|
17
|
-
...
|
|
16
|
+
let m = c("relations"), h = c("flow"), g = c("issue.events"), _ = s(), v = i(), y = o(), b = t(), { nameOf: x, actorName: S } = e(f), C = p.data, w = () => x(String(C.kind), String(C.handle)), T = (e, t = {}) => g.rich(e, {
|
|
17
|
+
...t,
|
|
18
18
|
name: S(p.actor),
|
|
19
19
|
actor: (e) => /* @__PURE__ */ l("span", {
|
|
20
20
|
className: "font-medium text-foreground",
|
|
21
21
|
children: e
|
|
22
22
|
}),
|
|
23
23
|
icon: () => {
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */ l(
|
|
26
|
-
category:
|
|
27
|
-
step: Number(
|
|
24
|
+
let e = C.to;
|
|
25
|
+
return /* @__PURE__ */ l(a, {
|
|
26
|
+
category: e.category,
|
|
27
|
+
step: Number(e.step) || 0,
|
|
28
28
|
className: "inline align-[-2px]"
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -51,9 +51,9 @@ function f({ workspace: f, event: p }) {
|
|
|
51
51
|
allowed: i(r)
|
|
52
52
|
});
|
|
53
53
|
};
|
|
54
|
-
return /* @__PURE__ */ l(
|
|
54
|
+
return /* @__PURE__ */ l(n, {
|
|
55
55
|
workspace: f,
|
|
56
|
-
icon:
|
|
56
|
+
icon: r(p.type, p.data),
|
|
57
57
|
actor: p.actor,
|
|
58
58
|
at: p.createdAt,
|
|
59
59
|
children: (() => {
|