@parallelworks/tandem-web 0.160.1 → 0.161.1
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 +4 -0
- package/_virtual/_virtual_i18n/es/common.js +4 -0
- package/_virtual/_virtual_i18n/ja/common.js +4 -0
- package/_virtual/_virtual_i18n/ko/common.js +4 -0
- package/_virtual/_virtual_i18n/zh/common.js +4 -0
- package/api/mutations.js +16 -9
- package/api/queries.js +194 -140
- package/components/CommandPalette.js +5 -2
- package/components/CustomerRequests.js +81 -85
- package/components/DocLinkPicker.js +4 -1
- package/components/FavoritesNav.js +4 -1
- package/components/IssueFilters.js +90 -87
- package/components/IssueGroupList.js +72 -0
- package/components/IssueInsights.js +4 -1
- package/components/IssueRelations.js +8 -2
- package/components/IssueRow.js +73 -66
- package/components/IssueSection.js +30 -20
- package/components/NewIssueDialog.js +181 -175
- package/components/NewProjectDialog.js +64 -64
- package/components/Reports.js +4 -1
- package/components/TeamWorkflow.js +4 -1
- package/components/icons.js +61 -33
- package/lib/boardMove.js +13 -3
- package/lib/groupList.js +14 -0
- package/lib/issueMenu.js +8 -2
- package/lib/issuePicker.js +4 -1
- package/package.json +2 -1
- package/pages/issues.js +393 -340
- package/pages/triage.js +4 -1
- package/routes/_workspace/docs/_doc2.js +8 -2
- package/routes/_workspace/issues/_identifier2.js +8 -2
- package/routes/_workspace/issues/index.js +1 -1
- package/routes/_workspace/notifications2.js +4 -1
- package/routes/_workspace/teams/_key/settings2.js +180 -164
- package/routes/_workspace2.js +3 -3
- package/routes/_workspace3.js +11 -10
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { customersQuery as e, cyclesQuery as t, labelsQuery as n,
|
|
2
|
-
import { CalendarIcon as
|
|
3
|
-
import { usePeople as
|
|
4
|
-
import { ProjectStatusIcon as
|
|
5
|
-
import { projectRef as
|
|
6
|
-
import { customFieldsQuery as
|
|
1
|
+
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, myTeamsQuery as r, projectsQuery as i, statusesQuery as ee, teamsQuery as te } from "../api/queries.js";
|
|
2
|
+
import { CalendarIcon as a, CycleIcon as ne, FolderIcon as o, PriorityIcon as s, ProjectIcon as c, StatusIcon as l, TagIcon as u, UserIcon as d, UsersIcon as f, usePriorityNames as p } from "./icons.js";
|
|
3
|
+
import { usePeople as m } from "../lib/people.js";
|
|
4
|
+
import { ProjectStatusIcon as h } from "./Planning.js";
|
|
5
|
+
import { projectRef as g } from "../lib/projects.js";
|
|
6
|
+
import { customFieldsQuery as re, fieldsFor as ie, filterableKinds as _, formatFieldFilters as v, parseFieldFilters as y } from "../lib/customFields.js";
|
|
7
7
|
import { issueTypesQuery as b } from "../lib/issueTypes.js";
|
|
8
8
|
import { TypeIcon as x } from "./IssueTypes.js";
|
|
9
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 ae } from "react";
|
|
12
|
+
import { useTranslations as w } from "use-intl";
|
|
13
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
14
|
+
import { useQuery as E } from "@tanstack/react-query";
|
|
15
|
+
import { useListFilters as D } from "@parallelworks/ui/list";
|
|
16
16
|
// src/components/IssueFilters.tsx
|
|
17
|
-
var
|
|
17
|
+
var O = (e) => `field:${e}`, k = [
|
|
18
18
|
"team",
|
|
19
19
|
"assignee",
|
|
20
20
|
"assigneeKind",
|
|
@@ -28,8 +28,8 @@ var k = (e) => `field:${e}`, A = [
|
|
|
28
28
|
"type",
|
|
29
29
|
"fields",
|
|
30
30
|
"overdue"
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], A = (e) => `agent:${e}`;
|
|
32
|
+
function oe(e) {
|
|
33
33
|
let t = [], n = (e, n) => {
|
|
34
34
|
n && t.push({
|
|
35
35
|
field: e,
|
|
@@ -37,7 +37,7 @@ function M(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" ? A(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({
|
|
@@ -56,13 +56,13 @@ function M(e) {
|
|
|
56
56
|
let i = /* @__PURE__ */ new Map();
|
|
57
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: O(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 se(e) {
|
|
66
66
|
let t = {}, n = [];
|
|
67
67
|
for (let r of e) {
|
|
68
68
|
let e = r.values[0];
|
|
@@ -94,36 +94,36 @@ function ie(e) {
|
|
|
94
94
|
}
|
|
95
95
|
return n.length > 0 && (t.fields = v(n)), t;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function j(e, t) {
|
|
98
98
|
let n = { ...e };
|
|
99
|
-
for (let e of
|
|
99
|
+
for (let e of k) delete n[e];
|
|
100
100
|
return {
|
|
101
101
|
...n,
|
|
102
102
|
...t
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
let
|
|
105
|
+
function M(v, k, j, M = !1) {
|
|
106
|
+
let N = w("issueFilters"), P = w("planning"), { data: F = [] } = E(te(v)), { data: I = [] } = E(r(v)), L = I.some((e) => e.key === k.team) ? I : [...I, ...F.filter((e) => e.key === k.team)], { data: R = [] } = E(n(v)), { data: z = [] } = E(i(v)), { data: B = [] } = E(e(v)), V = L.find((e) => e.key === k.team), { data: H = [] } = E({
|
|
107
107
|
...t(v, V?.key ?? ""),
|
|
108
108
|
enabled: !!V?.cyclesEnabled
|
|
109
|
-
}), { data: U = [] } =
|
|
110
|
-
...
|
|
109
|
+
}), { data: U = [] } = E({
|
|
110
|
+
...ee(v, V?.key ?? ""),
|
|
111
111
|
enabled: !!V
|
|
112
|
-
}), W =
|
|
112
|
+
}), W = p(), { members: G, agents: K, person: q, agentName: J } = m(v), { data: Y } = E(re(v)), { data: X } = E(b(v)), Z = w("issueTypes"), Q = w("customFields"), ce = ae(() => {
|
|
113
113
|
let e = {
|
|
114
114
|
multiple: !1,
|
|
115
115
|
operators: ["is"]
|
|
116
|
-
}, t = (e) => e.name ?
|
|
116
|
+
}, t = (e) => e.name ? P("cycleNamed", {
|
|
117
117
|
number: e.number,
|
|
118
118
|
name: e.name
|
|
119
|
-
}) :
|
|
119
|
+
}) : P("cycle", { number: e.number }), n = [
|
|
120
120
|
{
|
|
121
121
|
key: "team",
|
|
122
|
-
label:
|
|
123
|
-
icon: /* @__PURE__ */
|
|
122
|
+
label: N("team"),
|
|
123
|
+
icon: /* @__PURE__ */ T(o, {}),
|
|
124
124
|
kind: "enum",
|
|
125
125
|
...e,
|
|
126
|
-
required:
|
|
126
|
+
required: M,
|
|
127
127
|
options: L.filter((e) => !e.archivedAt).map((e) => ({
|
|
128
128
|
value: e.key,
|
|
129
129
|
label: e.name,
|
|
@@ -132,25 +132,25 @@ function P(v, A, N, P = !1) {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
key: "assignee",
|
|
135
|
-
label:
|
|
136
|
-
icon: /* @__PURE__ */
|
|
135
|
+
label: N("assignee"),
|
|
136
|
+
icon: /* @__PURE__ */ T(d, {}),
|
|
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
|
-
group:
|
|
143
|
-
icon: /* @__PURE__ */
|
|
142
|
+
group: N("people"),
|
|
143
|
+
icon: /* @__PURE__ */ T(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: A(e.slug),
|
|
151
151
|
label: e.name,
|
|
152
|
-
group:
|
|
153
|
-
icon: /* @__PURE__ */
|
|
152
|
+
group: N("agents"),
|
|
153
|
+
icon: /* @__PURE__ */ T(C, {
|
|
154
154
|
name: e.name,
|
|
155
155
|
kind: "agent",
|
|
156
156
|
size: "xs",
|
|
@@ -161,14 +161,14 @@ function P(v, A, N, P = !1) {
|
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
key: "creator",
|
|
164
|
-
label:
|
|
165
|
-
icon: /* @__PURE__ */
|
|
164
|
+
label: N("creator"),
|
|
165
|
+
icon: /* @__PURE__ */ T(d, {}),
|
|
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__ */ T(C, {
|
|
172
172
|
name: e.user.name,
|
|
173
173
|
src: e.user.avatarUrl,
|
|
174
174
|
size: "xs",
|
|
@@ -179,8 +179,8 @@ function P(v, A, N, P = !1) {
|
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
key: "priority",
|
|
182
|
-
label:
|
|
183
|
-
icon: /* @__PURE__ */
|
|
182
|
+
label: N("priority"),
|
|
183
|
+
icon: /* @__PURE__ */ T(s, { priority: 2 }),
|
|
184
184
|
kind: "enum",
|
|
185
185
|
operators: ["is"],
|
|
186
186
|
options: [
|
|
@@ -192,83 +192,86 @@ function P(v, A, N, P = !1) {
|
|
|
192
192
|
].map((e) => ({
|
|
193
193
|
value: String(e),
|
|
194
194
|
label: W[e] ?? "",
|
|
195
|
-
icon: /* @__PURE__ */
|
|
195
|
+
icon: /* @__PURE__ */ T(s, { priority: e })
|
|
196
196
|
}))
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
key: "label",
|
|
200
|
-
label:
|
|
201
|
-
icon: /* @__PURE__ */
|
|
200
|
+
label: N("label"),
|
|
201
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
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__ */ T("span", {
|
|
208
208
|
className: "size-2 rounded-full",
|
|
209
209
|
style: { background: e.color }
|
|
210
210
|
})
|
|
211
211
|
})),
|
|
212
|
-
valueLabel: () =>
|
|
212
|
+
valueLabel: () => N("deletedLabel")
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
key: "project",
|
|
216
|
-
label:
|
|
217
|
-
icon: /* @__PURE__ */
|
|
216
|
+
label: N("project"),
|
|
217
|
+
icon: /* @__PURE__ */ T(c, {}),
|
|
218
218
|
kind: "enum",
|
|
219
219
|
...e,
|
|
220
220
|
options: z.map((e) => ({
|
|
221
|
-
value:
|
|
221
|
+
value: g(e),
|
|
222
222
|
label: e.name,
|
|
223
|
-
icon: /* @__PURE__ */
|
|
223
|
+
icon: /* @__PURE__ */ T(h, { status: e.status })
|
|
224
224
|
}))
|
|
225
225
|
}
|
|
226
226
|
];
|
|
227
|
-
(B.length > 0 ||
|
|
227
|
+
(B.length > 0 || k.customer) && n.push({
|
|
228
228
|
key: "customer",
|
|
229
|
-
label:
|
|
230
|
-
icon: /* @__PURE__ */
|
|
229
|
+
label: N("customer"),
|
|
230
|
+
icon: /* @__PURE__ */ T(f, {}),
|
|
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 || k.status) && n.splice(3, 0, {
|
|
238
238
|
key: "status",
|
|
239
|
-
label:
|
|
240
|
-
icon: /* @__PURE__ */
|
|
239
|
+
label: N("status"),
|
|
240
|
+
icon: /* @__PURE__ */ T(l, { category: "started" }),
|
|
241
241
|
kind: "enum",
|
|
242
242
|
operators: ["is"],
|
|
243
243
|
options: U.map((e) => ({
|
|
244
244
|
value: S(e),
|
|
245
245
|
label: e.name,
|
|
246
|
-
icon: /* @__PURE__ */
|
|
246
|
+
icon: /* @__PURE__ */ T(l, {
|
|
247
|
+
category: e.category,
|
|
248
|
+
step: e.step
|
|
249
|
+
})
|
|
247
250
|
}))
|
|
248
|
-
}), (V?.cyclesEnabled ||
|
|
251
|
+
}), (V?.cyclesEnabled || k.cycle) && n.push({
|
|
249
252
|
key: "cycle",
|
|
250
|
-
label:
|
|
251
|
-
icon: /* @__PURE__ */
|
|
253
|
+
label: N("cycle"),
|
|
254
|
+
icon: /* @__PURE__ */ T(ne, {}),
|
|
252
255
|
kind: "enum",
|
|
253
256
|
...e,
|
|
254
257
|
options: H.map((e) => ({
|
|
255
258
|
value: String(e.number),
|
|
256
259
|
label: t(e),
|
|
257
|
-
description:
|
|
260
|
+
description: P(`states.${e.state}`)
|
|
258
261
|
}))
|
|
259
262
|
});
|
|
260
263
|
let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
|
|
261
|
-
(r.length > 0 ||
|
|
264
|
+
(r.length > 0 || k.type) && n.push({
|
|
262
265
|
key: "type",
|
|
263
266
|
label: Z("type"),
|
|
264
|
-
icon: /* @__PURE__ */
|
|
267
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
265
268
|
kind: "enum",
|
|
266
269
|
multiple: !0,
|
|
267
270
|
operators: ["is"],
|
|
268
271
|
options: [...r.map((e) => ({
|
|
269
272
|
value: e.id,
|
|
270
273
|
label: e.name,
|
|
271
|
-
icon: /* @__PURE__ */
|
|
274
|
+
icon: /* @__PURE__ */ T(x, {
|
|
272
275
|
type: e,
|
|
273
276
|
className: "size-3.5"
|
|
274
277
|
})
|
|
@@ -277,23 +280,23 @@ function P(v, A, N, P = !1) {
|
|
|
277
280
|
label: Z("noType")
|
|
278
281
|
}]
|
|
279
282
|
});
|
|
280
|
-
let i = new Set(y(
|
|
281
|
-
for (let e of (Y ?? []).filter((e) => e.target === "issue" &&
|
|
283
|
+
let i = new Set(y(k.fields).map((e) => e.field));
|
|
284
|
+
for (let e of (Y ?? []).filter((e) => e.target === "issue" && _.includes(e.kind) && (ie([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
|
|
282
285
|
let t = {
|
|
283
286
|
value: "none",
|
|
284
287
|
label: Q("noValue")
|
|
285
288
|
};
|
|
286
289
|
n.push({
|
|
287
|
-
key:
|
|
290
|
+
key: O(e.id),
|
|
288
291
|
label: e.name,
|
|
289
|
-
icon: /* @__PURE__ */
|
|
292
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
290
293
|
kind: "enum",
|
|
291
294
|
multiple: !0,
|
|
292
295
|
operators: ["is"],
|
|
293
296
|
options: e.kind === "person" ? [...G.map((e) => ({
|
|
294
297
|
value: e.user.username,
|
|
295
298
|
label: e.user.name,
|
|
296
|
-
icon: /* @__PURE__ */
|
|
299
|
+
icon: /* @__PURE__ */ T(C, {
|
|
297
300
|
name: e.user.name,
|
|
298
301
|
src: e.user.avatarUrl,
|
|
299
302
|
size: "xs",
|
|
@@ -305,7 +308,7 @@ function P(v, A, N, P = !1) {
|
|
|
305
308
|
}, t] : [...e.options.map((e) => ({
|
|
306
309
|
value: e.id ?? "",
|
|
307
310
|
label: e.name,
|
|
308
|
-
...e.color && { icon: /* @__PURE__ */
|
|
311
|
+
...e.color && { icon: /* @__PURE__ */ T("span", {
|
|
309
312
|
className: "size-2 rounded-full",
|
|
310
313
|
style: { background: e.color }
|
|
311
314
|
}) }
|
|
@@ -314,47 +317,47 @@ function P(v, A, N, P = !1) {
|
|
|
314
317
|
}
|
|
315
318
|
return n.push({
|
|
316
319
|
key: "overdue",
|
|
317
|
-
label:
|
|
318
|
-
icon: /* @__PURE__ */
|
|
320
|
+
label: N("overdue"),
|
|
321
|
+
icon: /* @__PURE__ */ T(a, {}),
|
|
319
322
|
kind: "boolean"
|
|
320
323
|
}), n;
|
|
321
324
|
}, [
|
|
322
325
|
X,
|
|
323
326
|
Z,
|
|
324
|
-
|
|
327
|
+
k.type,
|
|
325
328
|
Y,
|
|
326
329
|
Q,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
+
k.fields,
|
|
331
|
+
N,
|
|
332
|
+
P,
|
|
330
333
|
L,
|
|
331
334
|
G,
|
|
332
335
|
K,
|
|
333
336
|
R,
|
|
334
337
|
z,
|
|
335
338
|
B,
|
|
336
|
-
|
|
339
|
+
k.customer,
|
|
337
340
|
H,
|
|
338
341
|
U,
|
|
339
342
|
W,
|
|
340
343
|
V,
|
|
341
|
-
|
|
342
|
-
|
|
344
|
+
k.cycle,
|
|
345
|
+
k.status,
|
|
343
346
|
q,
|
|
344
347
|
J,
|
|
345
|
-
|
|
346
|
-
]), $ =
|
|
348
|
+
M
|
|
349
|
+
]), $ = oe(k), le = {
|
|
347
350
|
value: $.length > 0 ? $ : null,
|
|
348
351
|
onChange: (e) => {
|
|
349
|
-
let t =
|
|
350
|
-
t.team !==
|
|
352
|
+
let t = se(e);
|
|
353
|
+
t.team !== k.team && delete t.status, j(t);
|
|
351
354
|
}
|
|
352
355
|
};
|
|
353
|
-
return
|
|
356
|
+
return D({
|
|
354
357
|
storageKey: `issues:${v}`,
|
|
355
|
-
fields:
|
|
356
|
-
store:
|
|
358
|
+
fields: ce,
|
|
359
|
+
store: le,
|
|
357
360
|
remember: !1
|
|
358
361
|
});
|
|
359
362
|
}
|
|
360
|
-
export {
|
|
363
|
+
export { M as useIssueFilters, j as withIssueFilters };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { groupItems as e, headingOf as t } from "../lib/groupList.js";
|
|
2
|
+
import { IssueGroupHeader as n } from "./IssueSection.js";
|
|
3
|
+
import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
|
|
4
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
5
|
+
import { defaultRangeExtractor as l, useVirtualizer as u } from "@tanstack/react-virtual";
|
|
6
|
+
// src/components/IssueGroupList.tsx
|
|
7
|
+
var d = 41, f = 33;
|
|
8
|
+
function p({ groups: p, count: m, scrollRef: h, keepInView: g, renderRow: _ }) {
|
|
9
|
+
let [v, y] = s(() => /* @__PURE__ */ new Set()), b = a(() => e(p, v), [p, v]), x = a(() => b.flatMap((e, t) => e.kind === "group" ? [t] : []), [b]), S = a(() => new Map(b.flatMap((e, t) => e.kind === "row" ? [[e.issue.id, t]] : [])), [b]), C = o(null), w = o(0), T = r((e) => (w.current = t(x, e.startIndex), [.../* @__PURE__ */ new Set([w.current, ...l(e)])].sort((e, t) => e - t)), [x]), E = u({
|
|
10
|
+
count: b.length,
|
|
11
|
+
getScrollElement: () => h.current,
|
|
12
|
+
estimateSize: (e) => b[e]?.kind === "group" ? f : d,
|
|
13
|
+
getItemKey: (e) => {
|
|
14
|
+
let t = b[e];
|
|
15
|
+
return t?.kind === "group" ? `group:${t.group.key}` : t?.issue.id ?? e;
|
|
16
|
+
},
|
|
17
|
+
overscan: 12,
|
|
18
|
+
rangeExtractor: T,
|
|
19
|
+
scrollMargin: C.current?.offsetTop ?? 0
|
|
20
|
+
});
|
|
21
|
+
i(() => {
|
|
22
|
+
let e = g === void 0 ? void 0 : S.get(g);
|
|
23
|
+
e !== void 0 && E.scrollToIndex(e, { align: "auto" });
|
|
24
|
+
}, [
|
|
25
|
+
g,
|
|
26
|
+
S,
|
|
27
|
+
E
|
|
28
|
+
]);
|
|
29
|
+
let D = (e) => y((t) => {
|
|
30
|
+
let n = new Set(t);
|
|
31
|
+
return n.delete(e) || n.add(e), n;
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ c("ul", {
|
|
34
|
+
ref: C,
|
|
35
|
+
className: "relative w-full",
|
|
36
|
+
style: { height: E.getTotalSize() },
|
|
37
|
+
children: E.getVirtualItems().map((e) => {
|
|
38
|
+
let t = b[e.index];
|
|
39
|
+
if (!t) return null;
|
|
40
|
+
let r = {
|
|
41
|
+
position: "absolute",
|
|
42
|
+
top: 0,
|
|
43
|
+
left: 0,
|
|
44
|
+
width: "100%",
|
|
45
|
+
transform: `translateY(${e.start - E.options.scrollMargin}px)`
|
|
46
|
+
};
|
|
47
|
+
if (t.kind === "row") return _(t.issue, {
|
|
48
|
+
ref: E.measureElement,
|
|
49
|
+
style: r,
|
|
50
|
+
index: e.index
|
|
51
|
+
});
|
|
52
|
+
let i = e.index === w.current;
|
|
53
|
+
return /* @__PURE__ */ c("li", {
|
|
54
|
+
ref: E.measureElement,
|
|
55
|
+
"data-index": e.index,
|
|
56
|
+
style: i ? {
|
|
57
|
+
position: "sticky",
|
|
58
|
+
top: 0
|
|
59
|
+
} : r,
|
|
60
|
+
className: "z-10 border-b border-border bg-background/95 text-xs font-medium backdrop-blur",
|
|
61
|
+
children: /* @__PURE__ */ c("h2", { children: /* @__PURE__ */ c(n, {
|
|
62
|
+
label: t.group.label,
|
|
63
|
+
icon: t.group.icon,
|
|
64
|
+
count: m(t.group),
|
|
65
|
+
open: !v.has(t.group.key),
|
|
66
|
+
onToggle: () => D(t.group.key)
|
|
67
|
+
}) })
|
|
68
|
+
}, e.key);
|
|
69
|
+
})
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
export { p as IssueGroupList };
|
|
@@ -78,7 +78,10 @@ function E({ workspace: h, issues: y }) {
|
|
|
78
78
|
};
|
|
79
79
|
o.issues.push(a), n.set(e, o);
|
|
80
80
|
};
|
|
81
|
-
for (let n of y) if (j === "status") r(n.status.category, w(n.status.category), m.indexOf(n.status.category), /* @__PURE__ */ u(t, {
|
|
81
|
+
for (let n of y) if (j === "status") r(n.status.category, w(n.status.category), m.indexOf(n.status.category), /* @__PURE__ */ u(t, {
|
|
82
|
+
category: n.status.category,
|
|
83
|
+
step: n.status.step
|
|
84
|
+
}), n);
|
|
82
85
|
else if (j === "priority") r(String(n.priority), D[n.priority] ?? "", n.priority === 0 ? 5 : n.priority, /* @__PURE__ */ u(e, { priority: n.priority }), n);
|
|
83
86
|
else if (j === "label") {
|
|
84
87
|
n.labels.length === 0 && r("", b("none"), Infinity, null, n);
|
|
@@ -51,7 +51,10 @@ 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__ */ _(o, {
|
|
54
|
+
/* @__PURE__ */ _(o, {
|
|
55
|
+
category: t.status.category,
|
|
56
|
+
step: t.status.step
|
|
57
|
+
}),
|
|
55
58
|
/* @__PURE__ */ _("span", {
|
|
56
59
|
className: "shrink-0 text-muted-foreground",
|
|
57
60
|
children: t.identifier
|
|
@@ -255,7 +258,10 @@ function O({ workspace: n, issue: i, row: a }) {
|
|
|
255
258
|
type: "button",
|
|
256
259
|
className: a,
|
|
257
260
|
children: C ? /* @__PURE__ */ v(g, { children: [
|
|
258
|
-
/* @__PURE__ */ _(o, {
|
|
261
|
+
/* @__PURE__ */ _(o, {
|
|
262
|
+
category: C.status.category,
|
|
263
|
+
step: C.status.step
|
|
264
|
+
}),
|
|
259
265
|
/* @__PURE__ */ _("span", {
|
|
260
266
|
className: "shrink-0 text-muted-foreground",
|
|
261
267
|
children: C.identifier
|