@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
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { cyclesQuery as e, issuesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as a, viewsQuery as o } from "../api/queries.js";
|
|
2
|
+
import { basePath as s } from "../lib/base.js";
|
|
3
|
+
import { useBoardMove as c } from "../lib/boardMove.js";
|
|
4
|
+
import { groupIssues as l, issueFilterOf as u, issueSearch as d, sortIssues as f } from "../lib/issueList.js";
|
|
5
|
+
import { useIssueMenu as p } from "../lib/issueMenu.js";
|
|
5
6
|
import { useNewIssue as m } from "../lib/newIssue.js";
|
|
6
|
-
import { usePeople as
|
|
7
|
-
import { useIssueMenu as h } from "../lib/issueMenu.js";
|
|
7
|
+
import { usePeople as h } from "../lib/people.js";
|
|
8
8
|
import { projectRef as g } from "../lib/projects.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
9
|
+
import { isViewAt as _, statusRef as v } from "../lib/refs.js";
|
|
10
|
+
import { Link as y } from "../lib/router.js";
|
|
11
|
+
import { issuesHref as b } from "../lib/teamPaths.js";
|
|
12
|
+
import { viewSearch as x } from "../lib/views.js";
|
|
13
|
+
import { IssueBoard as ee } from "./IssueBoard.js";
|
|
14
|
+
import { useIssueFilters as S, withIssueFilters as C } from "./IssueFilters.js";
|
|
15
|
+
import { IssueRow as w } from "./IssueRow.js";
|
|
16
|
+
import { AddIcon as T, BoardIcon as E, EditIcon as D, ListViewIcon as O, usePriorityNames as k } from "./icons.js";
|
|
17
17
|
import { Button as A, IconButton as j, SegmentedControl as M, Select as N, buttonClasses as P, useOpenMenu as F } from "@parallelworks/ui";
|
|
18
18
|
import { useParams as I } from "@tanstack/react-router";
|
|
19
19
|
import { useMemo as L, useState as R } from "react";
|
|
@@ -23,7 +23,7 @@ import { keepPreviousData as H, useQuery as U } from "@tanstack/react-query";
|
|
|
23
23
|
import { ListFilterBar as W, ListFilterMenu as G } from "@parallelworks/ui/list";
|
|
24
24
|
import { Node as K, NodeViewWrapper as q, ReactNodeViewRenderer as J, mergeAttributes as Y } from "@tiptap/react";
|
|
25
25
|
// src/components/IssueListBlock.tsx
|
|
26
|
-
var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /* @__PURE__ */ new Map(), $ = (e) =>
|
|
26
|
+
var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /* @__PURE__ */ new Map(), $ = (e) => d(Object.fromEntries(new URLSearchParams(e))), te = (e) => new URLSearchParams(Object.entries(e).filter((e) => !!e[1])).toString(), ne = () => window.location.pathname.slice(s.length).split("/").filter(Boolean)[0] ?? "", re = K.create({
|
|
27
27
|
name: "issueList",
|
|
28
28
|
group: "block",
|
|
29
29
|
atom: !0,
|
|
@@ -61,14 +61,14 @@ var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /*
|
|
|
61
61
|
title: n?.[1] ?? ""
|
|
62
62
|
});
|
|
63
63
|
},
|
|
64
|
-
renderMarkdown: (
|
|
65
|
-
let
|
|
66
|
-
if (!
|
|
67
|
-
let
|
|
64
|
+
renderMarkdown: (e) => {
|
|
65
|
+
let t = e.attrs?.search ?? "", n = e.attrs?.title || "Issues";
|
|
66
|
+
if (!t) return ":::issues\n:::";
|
|
67
|
+
let r = `${window.location.origin}${s}${b(ne(), $(t))}`, i = (Q.get(t) ?? []).map((e) => `- ${e.identifier} ${e.title} (${e.status.name})`);
|
|
68
68
|
return [
|
|
69
69
|
":::issues",
|
|
70
|
-
`[${
|
|
71
|
-
...
|
|
70
|
+
`[${n}](${r})`,
|
|
71
|
+
...i,
|
|
72
72
|
":::"
|
|
73
73
|
].join("\n");
|
|
74
74
|
}
|
|
@@ -98,8 +98,8 @@ function ie({ node: e, updateAttributes: t, editor: n }) {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
101
|
-
let i = z("issueListBlock"), a = z("issues"), { data:
|
|
102
|
-
let { saved: t, ...n } =
|
|
101
|
+
let i = z("issueListBlock"), a = z("issues"), { data: s = [] } = U(o(e)), [c, l] = R(() => $(t)), u = s.find((e) => _(e, c.saved)), d = S(e, c, (e) => {
|
|
102
|
+
let { saved: t, ...n } = C(c, e);
|
|
103
103
|
l(n);
|
|
104
104
|
});
|
|
105
105
|
return /* @__PURE__ */ V("div", {
|
|
@@ -110,26 +110,26 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
110
110
|
className: "flex flex-wrap items-center gap-2",
|
|
111
111
|
children: [
|
|
112
112
|
/* @__PURE__ */ B(N, {
|
|
113
|
-
value:
|
|
113
|
+
value: u ? c.saved ?? "" : "",
|
|
114
114
|
items: [{
|
|
115
115
|
value: "",
|
|
116
116
|
label: i("noView")
|
|
117
|
-
}, ...
|
|
118
|
-
value:
|
|
117
|
+
}, ...s.map((e) => ({
|
|
118
|
+
value: x(e).saved,
|
|
119
119
|
label: e.name
|
|
120
120
|
}))],
|
|
121
121
|
onValueChange: (e) => {
|
|
122
|
-
let t =
|
|
123
|
-
l(t ? $(new URLSearchParams(
|
|
122
|
+
let t = s.find((t) => x(t).saved === e);
|
|
123
|
+
l(t ? $(new URLSearchParams(x(t)).toString()) : {});
|
|
124
124
|
},
|
|
125
125
|
"aria-label": i("savedView"),
|
|
126
126
|
width: "content"
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */ B(G, { filters:
|
|
128
|
+
/* @__PURE__ */ B(G, { filters: d }),
|
|
129
129
|
/* @__PURE__ */ B(M, {
|
|
130
130
|
label: i("statuses"),
|
|
131
131
|
size: "sm",
|
|
132
|
-
value:
|
|
132
|
+
value: c.view ?? "active",
|
|
133
133
|
onValueChange: (e) => l(({ saved: t, ...n }) => ({
|
|
134
134
|
...n,
|
|
135
135
|
view: e
|
|
@@ -147,7 +147,7 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
147
147
|
/* @__PURE__ */ B(M, {
|
|
148
148
|
label: i("layout"),
|
|
149
149
|
size: "sm",
|
|
150
|
-
value:
|
|
150
|
+
value: c.layout ?? "list",
|
|
151
151
|
onValueChange: (e) => l(({ layout: t, ...n }) => e === "board" ? {
|
|
152
152
|
...n,
|
|
153
153
|
layout: e
|
|
@@ -155,16 +155,16 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
155
155
|
options: [{
|
|
156
156
|
value: "list",
|
|
157
157
|
label: a("layouts.list"),
|
|
158
|
-
icon: /* @__PURE__ */ B(
|
|
158
|
+
icon: /* @__PURE__ */ B(O, {})
|
|
159
159
|
}, {
|
|
160
160
|
value: "board",
|
|
161
161
|
label: a("layouts.board"),
|
|
162
|
-
icon: /* @__PURE__ */ B(
|
|
162
|
+
icon: /* @__PURE__ */ B(E, {})
|
|
163
163
|
}]
|
|
164
164
|
})
|
|
165
165
|
]
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */ B(W, { filters:
|
|
167
|
+
/* @__PURE__ */ B(W, { filters: d }),
|
|
168
168
|
/* @__PURE__ */ V("div", {
|
|
169
169
|
className: "flex justify-end gap-2",
|
|
170
170
|
children: [r && /* @__PURE__ */ B(A, {
|
|
@@ -176,34 +176,34 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
176
176
|
variant: "primary",
|
|
177
177
|
onClick: () => n(te({
|
|
178
178
|
view: "active",
|
|
179
|
-
...
|
|
180
|
-
}),
|
|
179
|
+
...c
|
|
180
|
+
}), u?.name ?? ""),
|
|
181
181
|
children: i("save")
|
|
182
182
|
})]
|
|
183
183
|
})
|
|
184
184
|
]
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
function oe({ workspace: e, query: n, title:
|
|
188
|
-
let
|
|
189
|
-
...
|
|
190
|
-
enabled: !!
|
|
191
|
-
}), { data: v, isPending:
|
|
192
|
-
...
|
|
187
|
+
function oe({ workspace: e, query: n, title: r, onEdit: o }) {
|
|
188
|
+
let s = z("issueListBlock"), d = z("issues"), m = L(() => $(n), [n]), { data: g = [] } = U(a(e)), { data: _ } = U({
|
|
189
|
+
...i(e, m.team ?? ""),
|
|
190
|
+
enabled: !!m.team
|
|
191
|
+
}), { data: v, isPending: x } = U({
|
|
192
|
+
...t(e, u(m, _)),
|
|
193
193
|
placeholderData: H,
|
|
194
|
-
enabled: !
|
|
195
|
-
}), S = L(() =>
|
|
194
|
+
enabled: !m.status || !m.team || !!_
|
|
195
|
+
}), S = L(() => f(v?.issues ?? [], m.order ?? "updated"), [v, m.order]);
|
|
196
196
|
Q.set(n, S);
|
|
197
|
-
let
|
|
198
|
-
status: (e) =>
|
|
197
|
+
let C = p(e), E = F(), O = c(e, g), A = k(), { nameOf: M, avatarOf: N } = h(e), I = se(e, m, _), R = m.layout === "board", W = b(e, m), G = R ? l(S, "status", {
|
|
198
|
+
status: (e) => d(`groups.${e}`),
|
|
199
199
|
priority: (e) => A[e] ?? "",
|
|
200
200
|
person: M,
|
|
201
201
|
avatar: N,
|
|
202
202
|
none: {
|
|
203
|
-
assignee:
|
|
204
|
-
project:
|
|
205
|
-
label:
|
|
206
|
-
all:
|
|
203
|
+
assignee: d("noAssignee"),
|
|
204
|
+
project: d("noProject"),
|
|
205
|
+
label: d("noLabel"),
|
|
206
|
+
all: d("all")
|
|
207
207
|
}
|
|
208
208
|
}, !0) : [];
|
|
209
209
|
return /* @__PURE__ */ V("div", {
|
|
@@ -213,84 +213,84 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
|
|
|
213
213
|
children: [
|
|
214
214
|
/* @__PURE__ */ B("span", {
|
|
215
215
|
className: "min-w-0 truncate text-xs font-medium",
|
|
216
|
-
children:
|
|
216
|
+
children: r || s("title")
|
|
217
217
|
}),
|
|
218
218
|
/* @__PURE__ */ B("span", {
|
|
219
219
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
220
220
|
children: v ? S.length : ""
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ B("span", { className: "flex-1" }),
|
|
223
|
-
/* @__PURE__ */ B(
|
|
223
|
+
/* @__PURE__ */ B(y, {
|
|
224
224
|
to: W,
|
|
225
225
|
className: P({
|
|
226
226
|
variant: "ghost",
|
|
227
227
|
size: "xs"
|
|
228
228
|
}),
|
|
229
|
-
children:
|
|
229
|
+
children: s("openList")
|
|
230
230
|
}),
|
|
231
231
|
/* @__PURE__ */ B(j, {
|
|
232
232
|
variant: "ghost",
|
|
233
233
|
size: "xs",
|
|
234
|
-
icon: /* @__PURE__ */ B(
|
|
235
|
-
label:
|
|
234
|
+
icon: /* @__PURE__ */ B(T, {}),
|
|
235
|
+
label: s("newIssue"),
|
|
236
236
|
onClick: I
|
|
237
237
|
}),
|
|
238
|
-
|
|
238
|
+
o && /* @__PURE__ */ B(j, {
|
|
239
239
|
variant: "ghost",
|
|
240
240
|
size: "xs",
|
|
241
|
-
icon: /* @__PURE__ */ B(
|
|
242
|
-
label:
|
|
243
|
-
onClick:
|
|
241
|
+
icon: /* @__PURE__ */ B(D, {}),
|
|
242
|
+
label: s("edit"),
|
|
243
|
+
onClick: o
|
|
244
244
|
})
|
|
245
245
|
]
|
|
246
|
-
}),
|
|
246
|
+
}), x ? /* @__PURE__ */ B("p", {
|
|
247
247
|
className: "px-3 py-2 text-xs text-muted-foreground",
|
|
248
|
-
children:
|
|
248
|
+
children: s("loading")
|
|
249
249
|
}) : S.length === 0 ? /* @__PURE__ */ B("p", {
|
|
250
250
|
className: "px-3 py-2 text-xs text-muted-foreground",
|
|
251
|
-
children:
|
|
251
|
+
children: s("none")
|
|
252
252
|
}) : R ? /* @__PURE__ */ B("div", {
|
|
253
253
|
className: "max-h-[28rem] overflow-hidden",
|
|
254
|
-
children: /* @__PURE__ */ B(
|
|
254
|
+
children: /* @__PURE__ */ B(ee, {
|
|
255
255
|
workspace: e,
|
|
256
256
|
columns: G,
|
|
257
257
|
onMove: (e, t, n) => O(e, "status", t, n),
|
|
258
|
-
onContextMenu: (e, t) =>
|
|
258
|
+
onContextMenu: (e, t) => E(e, C([t]))
|
|
259
259
|
})
|
|
260
|
-
}) : /* @__PURE__ */ V("ul", { children: [S.slice(0, Z).map((t) => /* @__PURE__ */ B(
|
|
260
|
+
}) : /* @__PURE__ */ V("ul", { children: [S.slice(0, Z).map((t) => /* @__PURE__ */ B(w, {
|
|
261
261
|
issue: t,
|
|
262
|
-
team:
|
|
262
|
+
team: g.find((e) => e.id === t.teamId),
|
|
263
263
|
workspace: e,
|
|
264
|
-
onContextMenu: (e) =>
|
|
264
|
+
onContextMenu: (e) => E(e, C([t]))
|
|
265
265
|
}, t.id)), S.length > Z && /* @__PURE__ */ B("li", {
|
|
266
266
|
className: "px-3 py-2 text-xs",
|
|
267
|
-
children: /* @__PURE__ */ B(
|
|
267
|
+
children: /* @__PURE__ */ B(y, {
|
|
268
268
|
to: W,
|
|
269
269
|
className: "text-primary hover:underline",
|
|
270
|
-
children:
|
|
270
|
+
children: s("more", { count: S.length - Z })
|
|
271
271
|
})
|
|
272
272
|
})] })]
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
function se(
|
|
276
|
-
let o = m(), { data: s = [] } = U(
|
|
277
|
-
...
|
|
278
|
-
enabled: !!
|
|
275
|
+
function se(t, i, a) {
|
|
276
|
+
let o = m(), { data: s = [] } = U(n(t)), { data: c = [] } = U({
|
|
277
|
+
...r(t),
|
|
278
|
+
enabled: !!i.project
|
|
279
279
|
}), { data: l = [] } = U({
|
|
280
|
-
...
|
|
281
|
-
enabled: !!
|
|
280
|
+
...e(t, i.team ?? ""),
|
|
281
|
+
enabled: !!i.team && !!i.cycle
|
|
282
282
|
});
|
|
283
283
|
return () => {
|
|
284
|
-
let e = (e) => e?.split(",")[0],
|
|
284
|
+
let e = (e) => e?.split(",")[0], t = a?.find((t) => v(t) === e(i.status)), n = s.find((e) => e.name.toLowerCase() === i.label?.toLowerCase()), r = c.find((e) => g(e) === i.project), u = l.find((e) => String(e.number) === i.cycle || e.id === i.cycle), d = e(i.priority);
|
|
285
285
|
o({
|
|
286
|
-
...
|
|
286
|
+
...i.team && { team: i.team },
|
|
287
287
|
fields: {
|
|
288
|
-
...
|
|
289
|
-
...
|
|
288
|
+
...i.assignee && { assignees: [`${i.assigneeKind === "agent" ? "agent" : "user"}:${i.assignee}`] },
|
|
289
|
+
...n && { labelIds: [n.id] },
|
|
290
290
|
...d && { priority: Number(d) },
|
|
291
|
-
...
|
|
291
|
+
...t && { statusId: t.id },
|
|
292
292
|
...u && { cycleId: u.id },
|
|
293
|
-
...
|
|
293
|
+
...r && { projectId: r.id }
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { relatedIssuesQuery as n } from "../api/queries.js";
|
|
3
|
+
import { useIssuePicker as r } from "../lib/issuePicker.js";
|
|
4
|
+
import { Link as i } from "../lib/router.js";
|
|
5
|
+
import { AddIcon as a, CloseIcon as o, StatusIcon as s } from "./icons.js";
|
|
6
6
|
import { Button as c, Card as l, Combobox as u, ErrorText as d } from "@parallelworks/ui";
|
|
7
7
|
import { useRef as f, useState as p } from "react";
|
|
8
8
|
import { useErrorMessage as m } from "@parallelworks/problem/react";
|
|
@@ -43,7 +43,7 @@ var w = {
|
|
|
43
43
|
}
|
|
44
44
|
}, T = "kind:";
|
|
45
45
|
function E({ workspace: e, issue: t }) {
|
|
46
|
-
return /* @__PURE__ */ v(
|
|
46
|
+
return /* @__PURE__ */ v(i, {
|
|
47
47
|
to: "/$workspace/issues/$identifier",
|
|
48
48
|
params: {
|
|
49
49
|
workspace: e,
|
|
@@ -51,7 +51,7 @@ function E({ workspace: e, issue: t }) {
|
|
|
51
51
|
},
|
|
52
52
|
className: "flex min-w-0 flex-1 items-center gap-2 hover:underline",
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ _(
|
|
54
|
+
/* @__PURE__ */ _(s, {
|
|
55
55
|
category: t.status.category,
|
|
56
56
|
step: t.status.step
|
|
57
57
|
}),
|
|
@@ -66,20 +66,20 @@ function E({ workspace: e, issue: t }) {
|
|
|
66
66
|
]
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function D({ workspace:
|
|
70
|
-
let g = h("relations"), { data: D } = b(
|
|
69
|
+
function D({ workspace: i, issue: s }) {
|
|
70
|
+
let g = h("relations"), { data: D } = b(n(i, s.identifier)), O = x(), k = m(), [A, j] = p(null), [M, N] = p(""), [P, F] = p(!1), [I, L] = p(null), R = f(!1), z = () => O.invalidateQueries({ queryKey: [
|
|
71
71
|
"workspace",
|
|
72
|
-
|
|
72
|
+
i,
|
|
73
73
|
"issues"
|
|
74
|
-
] }), B = (e) => j(k(e)), V =
|
|
74
|
+
] }), B = (e) => j(k(e)), V = s.identifier.split("-")[0] ?? "", H = y({
|
|
75
75
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issues", {
|
|
76
76
|
params: { path: {
|
|
77
|
-
workspace:
|
|
77
|
+
workspace: i,
|
|
78
78
|
key: V
|
|
79
79
|
} },
|
|
80
80
|
body: {
|
|
81
81
|
title: M,
|
|
82
|
-
parent:
|
|
82
|
+
parent: s.identifier
|
|
83
83
|
}
|
|
84
84
|
})),
|
|
85
85
|
onMutate: () => j(null),
|
|
@@ -87,11 +87,11 @@ function D({ workspace: n, issue: o }) {
|
|
|
87
87
|
onSettled: z,
|
|
88
88
|
onError: B
|
|
89
89
|
}), U = y({
|
|
90
|
-
mutationFn: async ({ other:
|
|
91
|
-
let { type: a, inward:
|
|
90
|
+
mutationFn: async ({ other: n, kind: r }) => {
|
|
91
|
+
let { type: a, inward: o } = w[r], [c, l] = o ? [n, s.identifier] : [s.identifier, n];
|
|
92
92
|
return t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/relations", {
|
|
93
93
|
params: { path: {
|
|
94
|
-
workspace:
|
|
94
|
+
workspace: i,
|
|
95
95
|
identifier: c
|
|
96
96
|
} },
|
|
97
97
|
body: {
|
|
@@ -104,15 +104,15 @@ function D({ workspace: n, issue: o }) {
|
|
|
104
104
|
onSettled: z,
|
|
105
105
|
onError: B
|
|
106
106
|
}), W = y({
|
|
107
|
-
mutationFn: async (
|
|
108
|
-
workspace:
|
|
109
|
-
identifier:
|
|
110
|
-
relationId:
|
|
107
|
+
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/relations/{relationId}", { params: { path: {
|
|
108
|
+
workspace: i,
|
|
109
|
+
identifier: s.identifier,
|
|
110
|
+
relationId: n
|
|
111
111
|
} } })),
|
|
112
112
|
onMutate: () => j(null),
|
|
113
113
|
onSettled: z,
|
|
114
114
|
onError: B
|
|
115
|
-
}), G = D?.children ?? [], K = D?.relations ?? [], q =
|
|
115
|
+
}), G = D?.children ?? [], K = D?.relations ?? [], q = r(i, (e) => e.identifier !== s.identifier), J = G.filter((e) => e.status.category === "completed" || e.status.category === "canceled").length;
|
|
116
116
|
return /* @__PURE__ */ v("section", {
|
|
117
117
|
className: "mt-6 space-y-4",
|
|
118
118
|
"aria-label": g("label"),
|
|
@@ -138,7 +138,7 @@ function D({ workspace: n, issue: o }) {
|
|
|
138
138
|
children: G.map((e) => /* @__PURE__ */ _("li", {
|
|
139
139
|
className: "flex items-center gap-2 px-3 py-1.5 text-sm",
|
|
140
140
|
children: /* @__PURE__ */ _(E, {
|
|
141
|
-
workspace:
|
|
141
|
+
workspace: i,
|
|
142
142
|
issue: e
|
|
143
143
|
})
|
|
144
144
|
}, e.id))
|
|
@@ -148,7 +148,7 @@ function D({ workspace: n, issue: o }) {
|
|
|
148
148
|
onSubmit: (e) => {
|
|
149
149
|
e.preventDefault(), M.trim() && H.mutate();
|
|
150
150
|
},
|
|
151
|
-
children: [/* @__PURE__ */ _(
|
|
151
|
+
children: [/* @__PURE__ */ _(a, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ _("input", {
|
|
152
152
|
value: M,
|
|
153
153
|
onChange: (e) => N(e.target.value),
|
|
154
154
|
placeholder: g("addSubIssue"),
|
|
@@ -178,7 +178,7 @@ function D({ workspace: n, issue: o }) {
|
|
|
178
178
|
children: g(`kinds.${e}`)
|
|
179
179
|
}),
|
|
180
180
|
/* @__PURE__ */ _(E, {
|
|
181
|
-
workspace:
|
|
181
|
+
workspace: i,
|
|
182
182
|
issue: t.issue
|
|
183
183
|
}),
|
|
184
184
|
/* @__PURE__ */ _("button", {
|
|
@@ -186,7 +186,7 @@ function D({ workspace: n, issue: o }) {
|
|
|
186
186
|
onClick: () => W.mutate(t.id),
|
|
187
187
|
"aria-label": g("remove", { identifier: t.issue.identifier }),
|
|
188
188
|
className: "rounded p-0.5 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
189
|
-
children: /* @__PURE__ */ _(
|
|
189
|
+
children: /* @__PURE__ */ _(o, { className: "size-3.5" })
|
|
190
190
|
})
|
|
191
191
|
]
|
|
192
192
|
}, t.id)))
|
|
@@ -214,7 +214,7 @@ function D({ workspace: n, issue: o }) {
|
|
|
214
214
|
trigger: /* @__PURE__ */ _(c, {
|
|
215
215
|
size: "sm",
|
|
216
216
|
variant: "outline",
|
|
217
|
-
icon: /* @__PURE__ */ _(
|
|
217
|
+
icon: /* @__PURE__ */ _(a, { className: "size-3.5" }),
|
|
218
218
|
children: g("addRelation")
|
|
219
219
|
})
|
|
220
220
|
})
|
|
@@ -227,18 +227,18 @@ function D({ workspace: n, issue: o }) {
|
|
|
227
227
|
]
|
|
228
228
|
});
|
|
229
229
|
}
|
|
230
|
-
function O({ workspace:
|
|
231
|
-
let c = h("relations"), { data: l } = b(
|
|
232
|
-
mutationFn: async (
|
|
230
|
+
function O({ workspace: i, issue: a, row: o }) {
|
|
231
|
+
let c = h("relations"), { data: l } = b(n(i, a.identifier)), d = x(), f = (l?.children ?? []).map((e) => e.identifier), { items: p, ...m } = r(i, (e) => e.identifier !== a.identifier && !f.includes(e.identifier)), S = y({
|
|
232
|
+
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/issues/{identifier}/parent", {
|
|
233
233
|
params: { path: {
|
|
234
|
-
workspace:
|
|
235
|
-
identifier:
|
|
234
|
+
workspace: i,
|
|
235
|
+
identifier: a.identifier
|
|
236
236
|
} },
|
|
237
|
-
body: { parent:
|
|
237
|
+
body: { parent: n }
|
|
238
238
|
})),
|
|
239
239
|
onSettled: () => d.invalidateQueries({ queryKey: [
|
|
240
240
|
"workspace",
|
|
241
|
-
|
|
241
|
+
i,
|
|
242
242
|
"issues"
|
|
243
243
|
] })
|
|
244
244
|
}), C = l?.parent;
|
|
@@ -256,9 +256,9 @@ function O({ workspace: n, issue: i, row: a }) {
|
|
|
256
256
|
placeholder: c("findIssue"),
|
|
257
257
|
trigger: /* @__PURE__ */ _("button", {
|
|
258
258
|
type: "button",
|
|
259
|
-
className:
|
|
259
|
+
className: o,
|
|
260
260
|
children: C ? /* @__PURE__ */ v(g, { children: [
|
|
261
|
-
/* @__PURE__ */ _(
|
|
261
|
+
/* @__PURE__ */ _(s, {
|
|
262
262
|
category: C.status.category,
|
|
263
263
|
step: C.status.step
|
|
264
264
|
}),
|
package/components/IssueRow.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { usePeople as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TypeIcon as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { actorAvatar as e } from "../lib/avatar.js";
|
|
2
|
+
import { hasValue as t } from "../lib/customFields.js";
|
|
3
|
+
import { usePeople as n } from "../lib/people.js";
|
|
4
|
+
import { Link as r } from "../lib/router.js";
|
|
5
|
+
import { useTime as i } from "../lib/time.js";
|
|
6
|
+
import { useFieldText as a } from "./CustomFields.js";
|
|
7
|
+
import { TypeIcon as o } from "./IssueTypes.js";
|
|
8
|
+
import { PriorityIcon as s, ProjectIcon as c, StatusIcon as l, UsersIcon as u } from "./icons.js";
|
|
9
|
+
import { PersonHoverCard as d } from "./PersonHoverCard.js";
|
|
10
|
+
import { DueDate as f, SlaBadge as p, estimateShort as m } from "./Planning.js";
|
|
11
11
|
import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
|
|
12
12
|
import { memo as b } from "react";
|
|
13
13
|
import { useFormatter as x, useTranslations as S } from "use-intl";
|
|
14
14
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
15
|
// src/components/IssueRow.tsx
|
|
16
16
|
var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [], ref: F, style: I, index: L }) {
|
|
17
|
-
let R = S("issues"), z = x(), B =
|
|
17
|
+
let R = S("issues"), z = x(), B = i(), V = y(b.updatedAt, "compact"), { person: H, nameOf: U, avatarOf: W } = n(E), G = a(E);
|
|
18
18
|
return /* @__PURE__ */ w("li", {
|
|
19
19
|
ref: F,
|
|
20
20
|
style: I,
|
|
@@ -41,7 +41,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
41
41
|
})
|
|
42
42
|
})
|
|
43
43
|
}),
|
|
44
|
-
/* @__PURE__ */ w(
|
|
44
|
+
/* @__PURE__ */ w(r, {
|
|
45
45
|
to: "/$workspace/issues/$identifier",
|
|
46
46
|
params: {
|
|
47
47
|
workspace: E,
|
|
@@ -51,19 +51,19 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
51
51
|
onContextMenu: N,
|
|
52
52
|
className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ C(
|
|
54
|
+
/* @__PURE__ */ C(s, { priority: b.priority }),
|
|
55
55
|
/* @__PURE__ */ w("span", {
|
|
56
|
-
className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${b.type ? "w-
|
|
56
|
+
className: `flex shrink-0 items-center gap-1 text-xs whitespace-nowrap text-muted-foreground ${b.type ? "min-w-28" : "min-w-24"}`,
|
|
57
57
|
children: [b.type && /* @__PURE__ */ C(v, {
|
|
58
58
|
content: b.type.name,
|
|
59
59
|
describesAnchor: !0,
|
|
60
|
-
children: /* @__PURE__ */ C(
|
|
60
|
+
children: /* @__PURE__ */ C(o, {
|
|
61
61
|
type: b.type,
|
|
62
62
|
className: "size-3.5"
|
|
63
63
|
})
|
|
64
64
|
}), b.identifier]
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */ C(
|
|
66
|
+
/* @__PURE__ */ C(l, {
|
|
67
67
|
category: b.status.category,
|
|
68
68
|
step: b.status.step
|
|
69
69
|
}),
|
|
@@ -75,21 +75,21 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
75
75
|
content: R("requestCount", { count: b.requests }),
|
|
76
76
|
children: /* @__PURE__ */ w("span", {
|
|
77
77
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
|
|
78
|
-
children: [/* @__PURE__ */ C(
|
|
78
|
+
children: [/* @__PURE__ */ C(u, { className: "size-3" }), b.requests]
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
81
|
b.project && /* @__PURE__ */ w("span", {
|
|
82
82
|
className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
|
|
83
|
-
children: [/* @__PURE__ */ C(
|
|
83
|
+
children: [/* @__PURE__ */ C(c, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
|
|
84
84
|
className: "truncate",
|
|
85
85
|
children: b.project.name
|
|
86
86
|
})]
|
|
87
87
|
}),
|
|
88
|
-
b.dueDate && /* @__PURE__ */ C(
|
|
88
|
+
b.dueDate && /* @__PURE__ */ C(f, {
|
|
89
89
|
date: b.dueDate,
|
|
90
90
|
closed: b.status.category === "completed" || b.status.category === "canceled"
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */ C(
|
|
92
|
+
/* @__PURE__ */ C(p, {
|
|
93
93
|
issue: b,
|
|
94
94
|
team: T
|
|
95
95
|
}),
|
|
@@ -98,12 +98,12 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
98
98
|
describesAnchor: !0,
|
|
99
99
|
children: /* @__PURE__ */ C("span", {
|
|
100
100
|
className: "hidden h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border px-1 text-[11px] text-muted-foreground tabular-nums sm:inline-flex",
|
|
101
|
-
children:
|
|
101
|
+
children: m(b.estimate, T?.estimateScale)
|
|
102
102
|
})
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ w("span", {
|
|
105
105
|
className: "hidden shrink-0 gap-1 md:flex",
|
|
106
|
-
children: [P.filter((e) =>
|
|
106
|
+
children: [P.filter((e) => t(b.fields[e.id])).map((e) => /* @__PURE__ */ C(v, {
|
|
107
107
|
content: e.name,
|
|
108
108
|
describesAnchor: !0,
|
|
109
109
|
children: /* @__PURE__ */ C("span", {
|
|
@@ -124,7 +124,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
124
124
|
size: "xs",
|
|
125
125
|
ringColor: "var(--avatar-person-text)",
|
|
126
126
|
className: "shrink-0",
|
|
127
|
-
children: k.map((e) => /* @__PURE__ */ C(
|
|
127
|
+
children: k.map((e) => /* @__PURE__ */ C(d, {
|
|
128
128
|
workspace: E,
|
|
129
129
|
handle: e,
|
|
130
130
|
children: /* @__PURE__ */ C(h, {
|
|
@@ -136,17 +136,17 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
136
136
|
}),
|
|
137
137
|
/* @__PURE__ */ C(g, {
|
|
138
138
|
size: "sm",
|
|
139
|
-
children: b.assignees.map((
|
|
139
|
+
children: b.assignees.map((t) => /* @__PURE__ */ C(d, {
|
|
140
140
|
workspace: E,
|
|
141
|
-
kind:
|
|
142
|
-
handle:
|
|
141
|
+
kind: t.kind,
|
|
142
|
+
handle: t.handle,
|
|
143
143
|
children: /* @__PURE__ */ C(h, {
|
|
144
|
-
...
|
|
145
|
-
name: U(
|
|
146
|
-
src: W(
|
|
147
|
-
tooltip:
|
|
144
|
+
...e(t.kind),
|
|
145
|
+
name: U(t.kind, t.handle),
|
|
146
|
+
src: W(t.kind, t.handle),
|
|
147
|
+
tooltip: t.kind !== "user"
|
|
148
148
|
})
|
|
149
|
-
}, `${
|
|
149
|
+
}, `${t.kind}:${t.handle}`))
|
|
150
150
|
}),
|
|
151
151
|
/* @__PURE__ */ C(v, {
|
|
152
152
|
content: R("updated", { time: B.full(b.updatedAt) }),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { issueSentryQuery as e } from "../api/queries.js";
|
|
2
2
|
import { externalUrl as t } from "../lib/externalUrl.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useTime as n } from "../lib/time.js";
|
|
4
|
+
import { AlertIcon as r } from "./icons.js";
|
|
5
5
|
import { Card as i, TagList as a } from "@parallelworks/ui";
|
|
6
6
|
import { useTranslations as o } from "use-intl";
|
|
7
7
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -13,7 +13,7 @@ var u = {
|
|
|
13
13
|
warning: "text-warning"
|
|
14
14
|
};
|
|
15
15
|
function d({ workspace: d, identifier: f }) {
|
|
16
|
-
let p = o("sentry"), m =
|
|
16
|
+
let p = o("sentry"), m = n(), { data: h } = l(e(d, f));
|
|
17
17
|
return !h?.enabled || h.links.length === 0 ? null : /* @__PURE__ */ c("section", {
|
|
18
18
|
className: "mt-6",
|
|
19
19
|
"aria-label": p("issueSection"),
|
|
@@ -35,7 +35,7 @@ function d({ workspace: d, identifier: f }) {
|
|
|
35
35
|
rel: "noopener noreferrer",
|
|
36
36
|
className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ s(
|
|
38
|
+
/* @__PURE__ */ s(r, { className: `size-4 shrink-0 ${u[e.level] ?? "text-muted-foreground"}` }),
|
|
39
39
|
/* @__PURE__ */ s("span", {
|
|
40
40
|
className: "shrink-0 text-muted-foreground",
|
|
41
41
|
children: e.shortId || e.project
|