@parallelworks/tandem-web 0.150.2 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +2 -2
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as ee } from "../api/queries.js";
|
|
2
|
+
import { CalendarIcon as te, CycleIcon as a, FolderIcon as ne, PriorityIcon as o, ProjectIcon as s, StatusIcon as c, TagIcon as l, UserIcon as u, UsersIcon as d, usePriorityNames as f } from "./icons.js";
|
|
3
|
+
import { usePeople as p } from "../lib/people.js";
|
|
4
|
+
import { ProjectStatusIcon as m } from "./Planning.js";
|
|
5
|
+
import { projectRef as h } from "../lib/projects.js";
|
|
6
|
+
import { customFieldsQuery as g, fieldsFor as _, filterableKinds as re, formatFieldFilters as v, parseFieldFilters as y } from "../lib/customFields.js";
|
|
7
|
+
import { issueTypesQuery as b } from "../lib/issueTypes.js";
|
|
8
|
+
import { TypeIcon as x } from "./IssueTypes.js";
|
|
9
|
+
import { statusRef as S } from "../lib/refs.js";
|
|
10
10
|
import { Avatar as C } from "@parallelworks/ui";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useQuery as
|
|
15
|
-
import { useListFilters as
|
|
11
|
+
import { useMemo as w } from "react";
|
|
12
|
+
import { useTranslations as T } from "use-intl";
|
|
13
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
14
|
+
import { useQuery as D } from "@tanstack/react-query";
|
|
15
|
+
import { useListFilters as O } from "@parallelworks/ui/list";
|
|
16
16
|
// src/components/IssueFilters.tsx
|
|
17
|
-
var
|
|
17
|
+
var k = (e) => `field:${e}`, A = [
|
|
18
18
|
"team",
|
|
19
19
|
"assignee",
|
|
20
20
|
"assigneeKind",
|
|
@@ -28,8 +28,8 @@ var O = (e) => `field:${e}`, k = [
|
|
|
28
28
|
"type",
|
|
29
29
|
"fields",
|
|
30
30
|
"overdue"
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], j = (e) => `agent:${e}`;
|
|
32
|
+
function M(e) {
|
|
33
33
|
let t = [], n = (e, n) => {
|
|
34
34
|
n && t.push({
|
|
35
35
|
field: e,
|
|
@@ -37,7 +37,7 @@ function j(e) {
|
|
|
37
37
|
values: [n]
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ?
|
|
40
|
+
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? j(e.assignee) : e.assignee)), n("creator", e.creator);
|
|
41
41
|
for (let n of ["status", "priority"]) {
|
|
42
42
|
let r = e[n]?.split(",").filter(Boolean) ?? [];
|
|
43
43
|
r.length > 0 && t.push({
|
|
@@ -54,15 +54,15 @@ function j(e) {
|
|
|
54
54
|
values: r
|
|
55
55
|
});
|
|
56
56
|
let i = /* @__PURE__ */ new Map();
|
|
57
|
-
for (let t of
|
|
57
|
+
for (let t of y(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
|
|
58
58
|
for (let [e, n] of i) t.push({
|
|
59
|
-
field:
|
|
59
|
+
field: k(e),
|
|
60
60
|
op: "is",
|
|
61
61
|
values: n
|
|
62
62
|
});
|
|
63
63
|
return n("overdue", e.overdue), t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function ie(e) {
|
|
66
66
|
let t = {}, n = [];
|
|
67
67
|
for (let r of e) {
|
|
68
68
|
let e = r.values[0];
|
|
@@ -92,24 +92,24 @@ function M(e) {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
return n.length > 0 && (t.fields =
|
|
95
|
+
return n.length > 0 && (t.fields = v(n)), t;
|
|
96
96
|
}
|
|
97
97
|
function N(e, t) {
|
|
98
98
|
let n = { ...e };
|
|
99
|
-
for (let e of
|
|
99
|
+
for (let e of A) delete n[e];
|
|
100
100
|
return {
|
|
101
101
|
...n,
|
|
102
102
|
...t
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function P(
|
|
106
|
-
let F =
|
|
107
|
-
...t(
|
|
105
|
+
function P(v, A, N, P = !1) {
|
|
106
|
+
let F = T("issueFilters"), I = T("planning"), { data: L = [] } = D(ee(v)), { data: R = [] } = D(n(v)), { data: z = [] } = D(r(v)), { data: B = [] } = D(e(v)), V = L.find((e) => e.key === A.team), { data: H = [] } = D({
|
|
107
|
+
...t(v, V?.key ?? ""),
|
|
108
108
|
enabled: !!V?.cyclesEnabled
|
|
109
|
-
}), { data: U = [] } =
|
|
110
|
-
...i(
|
|
109
|
+
}), { data: U = [] } = D({
|
|
110
|
+
...i(v, V?.key ?? ""),
|
|
111
111
|
enabled: !!V
|
|
112
|
-
}), W =
|
|
112
|
+
}), W = f(), { members: G, agents: K, person: q, agentName: J } = p(v), { data: Y } = D(g(v)), { data: X } = D(b(v)), Z = T("issueTypes"), Q = T("customFields"), ae = w(() => {
|
|
113
113
|
let e = {
|
|
114
114
|
multiple: !1,
|
|
115
115
|
operators: ["is"]
|
|
@@ -120,7 +120,7 @@ function P(l, k, N, P = !1) {
|
|
|
120
120
|
{
|
|
121
121
|
key: "team",
|
|
122
122
|
label: F("team"),
|
|
123
|
-
icon: /* @__PURE__ */
|
|
123
|
+
icon: /* @__PURE__ */ E(ne, {}),
|
|
124
124
|
kind: "enum",
|
|
125
125
|
...e,
|
|
126
126
|
required: P,
|
|
@@ -133,24 +133,24 @@ function P(l, k, N, P = !1) {
|
|
|
133
133
|
{
|
|
134
134
|
key: "assignee",
|
|
135
135
|
label: F("assignee"),
|
|
136
|
-
icon: /* @__PURE__ */
|
|
136
|
+
icon: /* @__PURE__ */ E(u, {}),
|
|
137
137
|
kind: "people",
|
|
138
138
|
...e,
|
|
139
139
|
options: [...G.map((e) => ({
|
|
140
140
|
value: e.user.username,
|
|
141
141
|
label: e.user.name,
|
|
142
142
|
group: F("people"),
|
|
143
|
-
icon: /* @__PURE__ */
|
|
143
|
+
icon: /* @__PURE__ */ E(C, {
|
|
144
144
|
name: e.user.name,
|
|
145
145
|
src: e.user.avatarUrl,
|
|
146
146
|
size: "xs",
|
|
147
147
|
decorative: !0
|
|
148
148
|
})
|
|
149
149
|
})), ...K.map((e) => ({
|
|
150
|
-
value:
|
|
150
|
+
value: j(e.slug),
|
|
151
151
|
label: e.name,
|
|
152
152
|
group: F("agents"),
|
|
153
|
-
icon: /* @__PURE__ */
|
|
153
|
+
icon: /* @__PURE__ */ E(C, {
|
|
154
154
|
name: e.name,
|
|
155
155
|
kind: "agent",
|
|
156
156
|
size: "xs",
|
|
@@ -162,13 +162,13 @@ function P(l, k, N, P = !1) {
|
|
|
162
162
|
{
|
|
163
163
|
key: "creator",
|
|
164
164
|
label: F("creator"),
|
|
165
|
-
icon: /* @__PURE__ */
|
|
165
|
+
icon: /* @__PURE__ */ E(u, {}),
|
|
166
166
|
kind: "people",
|
|
167
167
|
...e,
|
|
168
168
|
options: G.map((e) => ({
|
|
169
169
|
value: e.user.username,
|
|
170
170
|
label: e.user.name,
|
|
171
|
-
icon: /* @__PURE__ */
|
|
171
|
+
icon: /* @__PURE__ */ E(C, {
|
|
172
172
|
name: e.user.name,
|
|
173
173
|
src: e.user.avatarUrl,
|
|
174
174
|
size: "xs",
|
|
@@ -180,7 +180,7 @@ function P(l, k, N, P = !1) {
|
|
|
180
180
|
{
|
|
181
181
|
key: "priority",
|
|
182
182
|
label: F("priority"),
|
|
183
|
-
icon: /* @__PURE__ */
|
|
183
|
+
icon: /* @__PURE__ */ E(o, { priority: 2 }),
|
|
184
184
|
kind: "enum",
|
|
185
185
|
operators: ["is"],
|
|
186
186
|
options: [
|
|
@@ -192,19 +192,19 @@ function P(l, k, N, P = !1) {
|
|
|
192
192
|
].map((e) => ({
|
|
193
193
|
value: String(e),
|
|
194
194
|
label: W[e] ?? "",
|
|
195
|
-
icon: /* @__PURE__ */
|
|
195
|
+
icon: /* @__PURE__ */ E(o, { priority: e })
|
|
196
196
|
}))
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
key: "label",
|
|
200
200
|
label: F("label"),
|
|
201
|
-
icon: /* @__PURE__ */
|
|
201
|
+
icon: /* @__PURE__ */ E(l, {}),
|
|
202
202
|
kind: "enum",
|
|
203
203
|
...e,
|
|
204
204
|
options: R.map((e) => ({
|
|
205
205
|
value: e.name,
|
|
206
206
|
label: e.name,
|
|
207
|
-
icon: /* @__PURE__ */
|
|
207
|
+
icon: /* @__PURE__ */ E("span", {
|
|
208
208
|
className: "size-2 rounded-full",
|
|
209
209
|
style: { background: e.color }
|
|
210
210
|
})
|
|
@@ -214,41 +214,41 @@ function P(l, k, N, P = !1) {
|
|
|
214
214
|
{
|
|
215
215
|
key: "project",
|
|
216
216
|
label: F("project"),
|
|
217
|
-
icon: /* @__PURE__ */
|
|
217
|
+
icon: /* @__PURE__ */ E(s, {}),
|
|
218
218
|
kind: "enum",
|
|
219
219
|
...e,
|
|
220
220
|
options: z.map((e) => ({
|
|
221
|
-
value:
|
|
221
|
+
value: h(e),
|
|
222
222
|
label: e.name,
|
|
223
|
-
icon: /* @__PURE__ */
|
|
223
|
+
icon: /* @__PURE__ */ E(m, { status: e.status })
|
|
224
224
|
}))
|
|
225
225
|
}
|
|
226
226
|
];
|
|
227
|
-
(B.length > 0 ||
|
|
227
|
+
(B.length > 0 || A.customer) && n.push({
|
|
228
228
|
key: "customer",
|
|
229
229
|
label: F("customer"),
|
|
230
|
-
icon: /* @__PURE__ */
|
|
230
|
+
icon: /* @__PURE__ */ E(d, {}),
|
|
231
231
|
kind: "enum",
|
|
232
232
|
...e,
|
|
233
233
|
options: B.map((e) => ({
|
|
234
234
|
value: e.id,
|
|
235
235
|
label: e.name
|
|
236
236
|
}))
|
|
237
|
-
}), (V ||
|
|
237
|
+
}), (V || A.status) && n.splice(3, 0, {
|
|
238
238
|
key: "status",
|
|
239
239
|
label: F("status"),
|
|
240
|
-
icon: /* @__PURE__ */
|
|
240
|
+
icon: /* @__PURE__ */ E(c, { category: "started" }),
|
|
241
241
|
kind: "enum",
|
|
242
242
|
operators: ["is"],
|
|
243
243
|
options: U.map((e) => ({
|
|
244
|
-
value:
|
|
244
|
+
value: S(e),
|
|
245
245
|
label: e.name,
|
|
246
|
-
icon: /* @__PURE__ */
|
|
246
|
+
icon: /* @__PURE__ */ E(c, { category: e.category })
|
|
247
247
|
}))
|
|
248
|
-
}), (V?.cyclesEnabled ||
|
|
248
|
+
}), (V?.cyclesEnabled || A.cycle) && n.push({
|
|
249
249
|
key: "cycle",
|
|
250
250
|
label: F("cycle"),
|
|
251
|
-
icon: /* @__PURE__ */
|
|
251
|
+
icon: /* @__PURE__ */ E(a, {}),
|
|
252
252
|
kind: "enum",
|
|
253
253
|
...e,
|
|
254
254
|
options: H.map((e) => ({
|
|
@@ -258,17 +258,17 @@ function P(l, k, N, P = !1) {
|
|
|
258
258
|
}))
|
|
259
259
|
});
|
|
260
260
|
let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
|
|
261
|
-
(r.length > 0 ||
|
|
261
|
+
(r.length > 0 || A.type) && n.push({
|
|
262
262
|
key: "type",
|
|
263
263
|
label: Z("type"),
|
|
264
|
-
icon: /* @__PURE__ */
|
|
264
|
+
icon: /* @__PURE__ */ E(l, {}),
|
|
265
265
|
kind: "enum",
|
|
266
266
|
multiple: !0,
|
|
267
267
|
operators: ["is"],
|
|
268
268
|
options: [...r.map((e) => ({
|
|
269
269
|
value: e.id,
|
|
270
270
|
label: e.name,
|
|
271
|
-
icon: /* @__PURE__ */
|
|
271
|
+
icon: /* @__PURE__ */ E(x, {
|
|
272
272
|
type: e,
|
|
273
273
|
className: "size-3.5"
|
|
274
274
|
})
|
|
@@ -277,23 +277,23 @@ function P(l, k, N, P = !1) {
|
|
|
277
277
|
label: Z("noType")
|
|
278
278
|
}]
|
|
279
279
|
});
|
|
280
|
-
let i = new Set(
|
|
281
|
-
for (let e of (Y ?? []).filter((e) => e.target === "issue" &&
|
|
280
|
+
let i = new Set(y(A.fields).map((e) => e.field));
|
|
281
|
+
for (let e of (Y ?? []).filter((e) => e.target === "issue" && re.includes(e.kind) && (_([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
|
|
282
282
|
let t = {
|
|
283
283
|
value: "none",
|
|
284
284
|
label: Q("noValue")
|
|
285
285
|
};
|
|
286
286
|
n.push({
|
|
287
|
-
key:
|
|
287
|
+
key: k(e.id),
|
|
288
288
|
label: e.name,
|
|
289
|
-
icon: /* @__PURE__ */
|
|
289
|
+
icon: /* @__PURE__ */ E(l, {}),
|
|
290
290
|
kind: "enum",
|
|
291
291
|
multiple: !0,
|
|
292
292
|
operators: ["is"],
|
|
293
293
|
options: e.kind === "person" ? [...G.map((e) => ({
|
|
294
294
|
value: e.user.username,
|
|
295
295
|
label: e.user.name,
|
|
296
|
-
icon: /* @__PURE__ */
|
|
296
|
+
icon: /* @__PURE__ */ E(C, {
|
|
297
297
|
name: e.user.name,
|
|
298
298
|
src: e.user.avatarUrl,
|
|
299
299
|
size: "xs",
|
|
@@ -305,7 +305,7 @@ function P(l, k, N, P = !1) {
|
|
|
305
305
|
}, t] : [...e.options.map((e) => ({
|
|
306
306
|
value: e.id ?? "",
|
|
307
307
|
label: e.name,
|
|
308
|
-
...e.color && { icon: /* @__PURE__ */
|
|
308
|
+
...e.color && { icon: /* @__PURE__ */ E("span", {
|
|
309
309
|
className: "size-2 rounded-full",
|
|
310
310
|
style: { background: e.color }
|
|
311
311
|
}) }
|
|
@@ -315,16 +315,16 @@ function P(l, k, N, P = !1) {
|
|
|
315
315
|
return n.push({
|
|
316
316
|
key: "overdue",
|
|
317
317
|
label: F("overdue"),
|
|
318
|
-
icon: /* @__PURE__ */
|
|
318
|
+
icon: /* @__PURE__ */ E(te, {}),
|
|
319
319
|
kind: "boolean"
|
|
320
320
|
}), n;
|
|
321
321
|
}, [
|
|
322
322
|
X,
|
|
323
323
|
Z,
|
|
324
|
-
|
|
324
|
+
A.type,
|
|
325
325
|
Y,
|
|
326
326
|
Q,
|
|
327
|
-
|
|
327
|
+
A.fields,
|
|
328
328
|
F,
|
|
329
329
|
I,
|
|
330
330
|
L,
|
|
@@ -333,25 +333,25 @@ function P(l, k, N, P = !1) {
|
|
|
333
333
|
R,
|
|
334
334
|
z,
|
|
335
335
|
B,
|
|
336
|
-
|
|
336
|
+
A.customer,
|
|
337
337
|
H,
|
|
338
338
|
U,
|
|
339
339
|
W,
|
|
340
340
|
V,
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
A.cycle,
|
|
342
|
+
A.status,
|
|
343
343
|
q,
|
|
344
344
|
J,
|
|
345
345
|
P
|
|
346
|
-
]), $ =
|
|
346
|
+
]), $ = M(A), oe = {
|
|
347
347
|
value: $.length > 0 ? $ : null,
|
|
348
348
|
onChange: (e) => {
|
|
349
|
-
let t =
|
|
350
|
-
t.team !==
|
|
349
|
+
let t = ie(e);
|
|
350
|
+
t.team !== A.team && delete t.status, N(t);
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
return
|
|
354
|
-
storageKey: `issues:${
|
|
353
|
+
return O({
|
|
354
|
+
storageKey: `issues:${v}`,
|
|
355
355
|
fields: ae,
|
|
356
356
|
store: oe,
|
|
357
357
|
remember: !1
|
|
@@ -2,15 +2,15 @@ import { basePath as e } from "../lib/base.js";
|
|
|
2
2
|
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { cyclesQuery as n, issuesQuery as r, labelsQuery as i, projectsQuery as a, statusesQuery as o, teamsQuery as s, viewsQuery as c } from "../api/queries.js";
|
|
4
4
|
import { AddIcon as l, BoardIcon as u, EditIcon as d, ListViewIcon as f, usePriorityNames as p } from "./icons.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
5
|
+
import { useNewIssue as m } from "../lib/newIssue.js";
|
|
6
|
+
import { usePeople as ee } from "../lib/people.js";
|
|
7
|
+
import { useIssueMenu as h } from "../lib/issueMenu.js";
|
|
8
|
+
import { projectRef as g } from "../lib/projects.js";
|
|
9
|
+
import { useBoardMove as _ } from "../lib/boardMove.js";
|
|
10
|
+
import { isViewAt as v, statusRef as y } from "../lib/refs.js";
|
|
11
|
+
import { groupIssues as b, issueFilterOf as x, issueSearch as S, sortIssues as C } from "../lib/issueList.js";
|
|
12
|
+
import { issuesHref as w } from "../lib/teamPaths.js";
|
|
13
|
+
import { viewSearch as T } from "../lib/views.js";
|
|
14
14
|
import { IssueBoard as E } from "./IssueBoard.js";
|
|
15
15
|
import { useIssueFilters as D, withIssueFilters as O } from "./IssueFilters.js";
|
|
16
16
|
import { IssueRow as k } from "./IssueRow.js";
|
|
@@ -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) => S(Object.fromEntries(new URLSearchParams(e))), te = (e) => new URLSearchParams(Object.entries(e).filter((e) => !!e[1])).toString(), ne = () => window.location.pathname.slice(e.length).split("/").filter(Boolean)[0] ?? "", re = K.create({
|
|
27
27
|
name: "issueList",
|
|
28
28
|
group: "block",
|
|
29
29
|
atom: !0,
|
|
@@ -64,7 +64,7 @@ var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /*
|
|
|
64
64
|
renderMarkdown: (t) => {
|
|
65
65
|
let n = t.attrs?.search ?? "", r = t.attrs?.title || "Issues";
|
|
66
66
|
if (!n) return ":::issues\n:::";
|
|
67
|
-
let i = `${window.location.origin}${e}${
|
|
67
|
+
let i = `${window.location.origin}${e}${w(ne(), $(n))}`, a = (Q.get(n) ?? []).map((e) => `- ${e.identifier} ${e.title} (${e.status.name})`);
|
|
68
68
|
return [
|
|
69
69
|
":::issues",
|
|
70
70
|
`[${r}](${i})`,
|
|
@@ -98,7 +98,7 @@ 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: o = [] } = U(c(e)), [s, l] = R(() => $(t)), d = o.find((e) =>
|
|
101
|
+
let i = z("issueListBlock"), a = z("issues"), { data: o = [] } = U(c(e)), [s, l] = R(() => $(t)), d = o.find((e) => v(e, s.saved)), p = D(e, s, (e) => {
|
|
102
102
|
let { saved: t, ...n } = O(s, e);
|
|
103
103
|
l(n);
|
|
104
104
|
});
|
|
@@ -115,12 +115,12 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
115
115
|
value: "",
|
|
116
116
|
label: i("noView")
|
|
117
117
|
}, ...o.map((e) => ({
|
|
118
|
-
value:
|
|
118
|
+
value: T(e).saved,
|
|
119
119
|
label: e.name
|
|
120
120
|
}))],
|
|
121
121
|
onValueChange: (e) => {
|
|
122
|
-
let t = o.find((t) =>
|
|
123
|
-
l(t ? $(new URLSearchParams(
|
|
122
|
+
let t = o.find((t) => T(t).saved === e);
|
|
123
|
+
l(t ? $(new URLSearchParams(T(t)).toString()) : {});
|
|
124
124
|
},
|
|
125
125
|
"aria-label": i("savedView"),
|
|
126
126
|
width: "content"
|
|
@@ -185,16 +185,16 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
|
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
function oe({ workspace: e, query: n, title: i, onEdit: a }) {
|
|
188
|
-
let c = z("issueListBlock"), u = z("issues"), f = L(() => $(n), [n]), { data: m = [] } = U(s(e)), { data:
|
|
188
|
+
let c = z("issueListBlock"), u = z("issues"), f = L(() => $(n), [n]), { data: m = [] } = U(s(e)), { data: g } = U({
|
|
189
189
|
...o(e, f.team ?? ""),
|
|
190
190
|
enabled: !!f.team
|
|
191
|
-
}), { data: v, isPending:
|
|
192
|
-
...r(e,
|
|
191
|
+
}), { data: v, isPending: y } = U({
|
|
192
|
+
...r(e, x(f, g)),
|
|
193
193
|
placeholderData: H,
|
|
194
|
-
enabled: !f.status || !f.team || !!
|
|
195
|
-
}),
|
|
196
|
-
Q.set(n,
|
|
197
|
-
let
|
|
194
|
+
enabled: !f.status || !f.team || !!g
|
|
195
|
+
}), S = L(() => C(v?.issues ?? [], f.order ?? "updated"), [v, f.order]);
|
|
196
|
+
Q.set(n, S);
|
|
197
|
+
let T = h(e), D = F(), O = _(e, m), A = p(), { nameOf: M, avatarOf: N } = ee(e), I = se(e, f, g), R = f.layout === "board", W = w(e, f), G = R ? b(S, "status", {
|
|
198
198
|
status: (e) => u(`groups.${e}`),
|
|
199
199
|
priority: (e) => A[e] ?? "",
|
|
200
200
|
person: M,
|
|
@@ -217,7 +217,7 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
|
|
|
217
217
|
}),
|
|
218
218
|
/* @__PURE__ */ B("span", {
|
|
219
219
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
220
|
-
children: v ?
|
|
220
|
+
children: v ? S.length : ""
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ B("span", { className: "flex-1" }),
|
|
223
223
|
/* @__PURE__ */ B(t, {
|
|
@@ -243,10 +243,10 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
|
|
|
243
243
|
onClick: a
|
|
244
244
|
})
|
|
245
245
|
]
|
|
246
|
-
}),
|
|
246
|
+
}), y ? /* @__PURE__ */ B("p", {
|
|
247
247
|
className: "px-3 py-2 text-xs text-muted-foreground",
|
|
248
248
|
children: c("loading")
|
|
249
|
-
}) :
|
|
249
|
+
}) : S.length === 0 ? /* @__PURE__ */ B("p", {
|
|
250
250
|
className: "px-3 py-2 text-xs text-muted-foreground",
|
|
251
251
|
children: c("none")
|
|
252
252
|
}) : R ? /* @__PURE__ */ B("div", {
|
|
@@ -255,25 +255,25 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
|
|
|
255
255
|
workspace: e,
|
|
256
256
|
columns: G,
|
|
257
257
|
onMove: (e, t, n) => O(e, "status", t, n),
|
|
258
|
-
onContextMenu: (e, t) => D(e,
|
|
258
|
+
onContextMenu: (e, t) => D(e, T([t]))
|
|
259
259
|
})
|
|
260
|
-
}) : /* @__PURE__ */ V("ul", { children: [
|
|
260
|
+
}) : /* @__PURE__ */ V("ul", { children: [S.slice(0, Z).map((t) => /* @__PURE__ */ B(k, {
|
|
261
261
|
issue: t,
|
|
262
262
|
team: m.find((e) => e.id === t.teamId),
|
|
263
263
|
workspace: e,
|
|
264
|
-
onContextMenu: (e) => D(e,
|
|
265
|
-
}, t.id)),
|
|
264
|
+
onContextMenu: (e) => D(e, T([t]))
|
|
265
|
+
}, t.id)), S.length > Z && /* @__PURE__ */ B("li", {
|
|
266
266
|
className: "px-3 py-2 text-xs",
|
|
267
267
|
children: /* @__PURE__ */ B(t, {
|
|
268
268
|
to: W,
|
|
269
269
|
className: "text-primary hover:underline",
|
|
270
|
-
children: c("more", { count:
|
|
270
|
+
children: c("more", { count: S.length - Z })
|
|
271
271
|
})
|
|
272
272
|
})] })]
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function se(e, t, r) {
|
|
276
|
-
let o =
|
|
276
|
+
let o = m(), { data: s = [] } = U(i(e)), { data: c = [] } = U({
|
|
277
277
|
...a(e),
|
|
278
278
|
enabled: !!t.project
|
|
279
279
|
}), { data: l = [] } = U({
|
|
@@ -281,7 +281,7 @@ function se(e, t, r) {
|
|
|
281
281
|
enabled: !!t.team && !!t.cycle
|
|
282
282
|
});
|
|
283
283
|
return () => {
|
|
284
|
-
let e = (e) => e?.split(",")[0], n = r?.find((n) =>
|
|
284
|
+
let e = (e) => e?.split(",")[0], n = r?.find((n) => y(n) === e(t.status)), i = s.find((e) => e.name.toLowerCase() === t.label?.toLowerCase()), a = c.find((e) => g(e) === t.project), u = l.find((e) => String(e.number) === t.cycle || e.id === t.cycle), d = e(t.priority);
|
|
285
285
|
o({
|
|
286
286
|
...t.team && { team: t.team },
|
|
287
287
|
fields: {
|
package/components/IssueRow.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Link as e } from "../lib/router.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { PriorityIcon as t, ProjectIcon as n, StatusIcon as r, UsersIcon as i } from "./icons.js";
|
|
3
|
+
import { usePeople as a } from "../lib/people.js";
|
|
4
|
+
import { useTime as o } from "../lib/time.js";
|
|
5
|
+
import { DueDate as s, SlaBadge as c, estimateShort as l } from "./Planning.js";
|
|
6
|
+
import { hasValue as u } from "../lib/customFields.js";
|
|
7
|
+
import { TypeIcon as d } from "./IssueTypes.js";
|
|
8
|
+
import { actorAvatar as f } from "../lib/avatar.js";
|
|
9
9
|
import { useFieldText as p } from "./CustomFields.js";
|
|
10
|
-
import {
|
|
10
|
+
import { PersonHoverCard as m } from "./PersonHoverCard.js";
|
|
11
11
|
import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
|
|
12
12
|
import { useFormatter as b, useTranslations as x } from "use-intl";
|
|
13
13
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
14
14
|
// src/components/IssueRow.tsx
|
|
15
15
|
function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [] }) {
|
|
16
|
-
let F = x("issues"), I = b(), L =
|
|
16
|
+
let F = x("issues"), I = b(), L = o(), R = y(w.updatedAt, "compact"), { person: z, nameOf: B, avatarOf: V } = a(E), H = p(E);
|
|
17
17
|
return /* @__PURE__ */ C("li", {
|
|
18
18
|
id: `row-${w.id}`,
|
|
19
19
|
onMouseEnter: j,
|
|
@@ -47,19 +47,19 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
|
|
|
47
47
|
onContextMenu: N,
|
|
48
48
|
className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */ S(
|
|
50
|
+
/* @__PURE__ */ S(t, { priority: w.priority }),
|
|
51
51
|
/* @__PURE__ */ C("span", {
|
|
52
52
|
className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${w.type ? "w-20" : "w-16"}`,
|
|
53
53
|
children: [w.type && /* @__PURE__ */ S(v, {
|
|
54
54
|
content: w.type.name,
|
|
55
55
|
describesAnchor: !0,
|
|
56
|
-
children: /* @__PURE__ */ S(
|
|
56
|
+
children: /* @__PURE__ */ S(d, {
|
|
57
57
|
type: w.type,
|
|
58
58
|
className: "size-3.5"
|
|
59
59
|
})
|
|
60
60
|
}), w.identifier]
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */ S(
|
|
62
|
+
/* @__PURE__ */ S(r, { category: w.status.category }),
|
|
63
63
|
/* @__PURE__ */ S("span", {
|
|
64
64
|
className: "min-w-0 flex-1 truncate",
|
|
65
65
|
children: w.title
|
|
@@ -68,21 +68,21 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
|
|
|
68
68
|
content: F("requestCount", { count: w.requests }),
|
|
69
69
|
children: /* @__PURE__ */ C("span", {
|
|
70
70
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
|
|
71
|
-
children: [/* @__PURE__ */ S(
|
|
71
|
+
children: [/* @__PURE__ */ S(i, { className: "size-3" }), w.requests]
|
|
72
72
|
})
|
|
73
73
|
}),
|
|
74
74
|
w.project && /* @__PURE__ */ C("span", {
|
|
75
75
|
className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
|
|
76
|
-
children: [/* @__PURE__ */ S(
|
|
76
|
+
children: [/* @__PURE__ */ S(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ S("span", {
|
|
77
77
|
className: "truncate",
|
|
78
78
|
children: w.project.name
|
|
79
79
|
})]
|
|
80
80
|
}),
|
|
81
|
-
w.dueDate && /* @__PURE__ */ S(
|
|
81
|
+
w.dueDate && /* @__PURE__ */ S(s, {
|
|
82
82
|
date: w.dueDate,
|
|
83
83
|
closed: w.status.category === "completed" || w.status.category === "canceled"
|
|
84
84
|
}),
|
|
85
|
-
/* @__PURE__ */ S(
|
|
85
|
+
/* @__PURE__ */ S(c, {
|
|
86
86
|
issue: w,
|
|
87
87
|
team: T
|
|
88
88
|
}),
|
|
@@ -91,12 +91,12 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
|
|
|
91
91
|
describesAnchor: !0,
|
|
92
92
|
children: /* @__PURE__ */ S("span", {
|
|
93
93
|
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",
|
|
94
|
-
children:
|
|
94
|
+
children: l(w.estimate, T?.estimateScale)
|
|
95
95
|
})
|
|
96
96
|
}),
|
|
97
97
|
/* @__PURE__ */ C("span", {
|
|
98
98
|
className: "hidden shrink-0 gap-1 md:flex",
|
|
99
|
-
children: [P.filter((e) =>
|
|
99
|
+
children: [P.filter((e) => u(w.fields[e.id])).map((e) => /* @__PURE__ */ S(v, {
|
|
100
100
|
content: e.name,
|
|
101
101
|
describesAnchor: !0,
|
|
102
102
|
children: /* @__PURE__ */ S("span", {
|
|
@@ -117,7 +117,7 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
|
|
|
117
117
|
size: "xs",
|
|
118
118
|
ringColor: "var(--avatar-person-text)",
|
|
119
119
|
className: "shrink-0",
|
|
120
|
-
children: k.map((e) => /* @__PURE__ */ S(
|
|
120
|
+
children: k.map((e) => /* @__PURE__ */ S(m, {
|
|
121
121
|
workspace: E,
|
|
122
122
|
handle: e,
|
|
123
123
|
children: /* @__PURE__ */ S(h, {
|
|
@@ -129,12 +129,12 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
|
|
|
129
129
|
}),
|
|
130
130
|
/* @__PURE__ */ S(g, {
|
|
131
131
|
size: "sm",
|
|
132
|
-
children: w.assignees.map((e) => /* @__PURE__ */ S(
|
|
132
|
+
children: w.assignees.map((e) => /* @__PURE__ */ S(m, {
|
|
133
133
|
workspace: E,
|
|
134
134
|
kind: e.kind,
|
|
135
135
|
handle: e.handle,
|
|
136
136
|
children: /* @__PURE__ */ S(h, {
|
|
137
|
-
...
|
|
137
|
+
...f(e.kind),
|
|
138
138
|
name: B(e.kind, e.handle),
|
|
139
139
|
src: V(e.kind, e.handle),
|
|
140
140
|
tooltip: e.kind !== "user"
|