@parallelworks/tandem-web 0.194.1 → 0.194.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/api/queries.js +501 -504
- package/components/IssueBreakdown.js +128 -116
- package/lib/breakdownPicks.js +17 -0
- package/lib/panelRequest.js +13 -0
- package/package.json +1 -1
- package/pages/issues.js +334 -324
package/pages/issues.js
CHANGED
|
@@ -1,88 +1,89 @@
|
|
|
1
|
-
import { cyclesQuery as e, issueCountsQuery as t, issueOrders as n, issuePagesQuery as r, labelsQuery as i, meQuery as
|
|
2
|
-
import { DisplayMenu as
|
|
3
|
-
import { FavoriteStar as
|
|
4
|
-
import { IssueBoard as
|
|
5
|
-
import { BreakdownFilterBar as
|
|
6
|
-
import { useIssueFilters as
|
|
7
|
-
import { IssueGroupList as
|
|
8
|
-
import { IssueInsights as
|
|
9
|
-
import { IssueRow as
|
|
10
|
-
import { BoardIcon as
|
|
11
|
-
import { ErrorMessage as
|
|
12
|
-
import { ViewDialog as
|
|
13
|
-
import { useBoardMove as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
1
|
+
import { cyclesQuery as e, issueCountsQuery as t, issueOrders as n, issuePagesQuery as r, labelsQuery as i, meQuery as a, projectsQuery as o, statusesQuery as ee, teamsQuery as te, viewsQuery as s } from "../api/queries.js";
|
|
2
|
+
import { DisplayMenu as ne } from "../components/DisplayMenu.js";
|
|
3
|
+
import { FavoriteStar as re } from "../components/FavoriteStar.js";
|
|
4
|
+
import { IssueBoard as ie } from "../components/IssueBoard.js";
|
|
5
|
+
import { BreakdownFilterBar as ae, IssueBreakdown as oe, breakdownCount as se, formatBreakdown as ce, inBreakdown as le, parseBreakdown as ue } from "../components/IssueBreakdown.js";
|
|
6
|
+
import { useIssueFilters as de, withIssueFilters as fe } from "../components/IssueFilters.js";
|
|
7
|
+
import { IssueGroupList as pe } from "../components/IssueGroupList.js";
|
|
8
|
+
import { IssueInsights as me } from "../components/IssueInsights.js";
|
|
9
|
+
import { IssueRow as c } from "../components/IssueRow.js";
|
|
10
|
+
import { BoardIcon as he, ChartIcon as ge, CloseIcon as _e, ListViewIcon as ve, SidePanelIcon as ye, usePriorityNames as be } from "../components/icons.js";
|
|
11
|
+
import { ErrorMessage as xe } from "../components/status.js";
|
|
12
|
+
import { ViewDialog as Se } from "../components/ViewDialog.js";
|
|
13
|
+
import { useBoardMove as Ce } from "../lib/boardMove.js";
|
|
14
|
+
import { knownPicks as we } from "../lib/breakdownPicks.js";
|
|
15
|
+
import { customFieldsQuery as Te, fieldRef as Ee, fieldsForTeams as De, groupableKinds as Oe, sortableKinds as ke } from "../lib/customFields.js";
|
|
16
|
+
import { insightsKey as Ae, listTabs as je, panelKey as Me, shownFields as Ne, storeDisplay as Pe, storeShownFields as Fe, storedDisplay as Ie, withParam as l } from "../lib/issueDisplay.js";
|
|
17
|
+
import { groupIssues as Le, groupings as Re, isGrouping as ze, isOrder as Be, issueFilterOf as Ve, orders as He, sortIssues as Ue, views as We } from "../lib/issueList.js";
|
|
18
|
+
import { useIssueMenu as Ge } from "../lib/issueMenu.js";
|
|
19
|
+
import { issueTypesQuery as Ke } from "../lib/issueTypes.js";
|
|
20
|
+
import { useLive as qe } from "../lib/live.js";
|
|
21
|
+
import { useNewIssue as Je } from "../lib/newIssue.js";
|
|
22
|
+
import { pagedGroupings as Ye, usePagedGroups as Xe } from "../lib/pagedGroups.js";
|
|
23
|
+
import { usePageTitle as Ze } from "../lib/pageTitle.js";
|
|
24
|
+
import { usePaletteSelection as Qe } from "../lib/palette.js";
|
|
25
|
+
import { usePeople as $e } from "../lib/people.js";
|
|
26
|
+
import { projectRef as et } from "../lib/projects.js";
|
|
27
|
+
import { isViewAt as tt, viewRef as nt } from "../lib/refs.js";
|
|
28
|
+
import { useCan as rt } from "../lib/roles.js";
|
|
29
|
+
import { useNavigate as it } from "../lib/router.js";
|
|
30
|
+
import { useShortcuts as at } from "../lib/shortcuts.js";
|
|
31
|
+
import { issuesHref as ot } from "../lib/teamPaths.js";
|
|
31
32
|
import { filtersOf as st, sameFilters as ct, useSavedViews as lt, useViewMenu as ut, viewSearch as dt } from "../lib/views.js";
|
|
32
|
-
import { ActionMenu as ft, Button as
|
|
33
|
+
import { ActionMenu as ft, Button as u, ConfirmModal as pt, Field as mt, IconButton as ht, SearchInput as gt, Select as _t, Tabs as vt, useOpenMenu as yt } from "@parallelworks/ui";
|
|
33
34
|
import { useParams as bt, useSearch as xt } from "@tanstack/react-router";
|
|
34
|
-
import { memo as
|
|
35
|
+
import { memo as d, useCallback as St, useEffect as Ct, useMemo as f, useRef as p, useState as m, useSyncExternalStore as wt } from "react";
|
|
35
36
|
import { useTranslations as h } from "use-intl";
|
|
36
|
-
import { Fragment as
|
|
37
|
-
import { keepPreviousData as
|
|
38
|
-
import { ListFilterBar as
|
|
37
|
+
import { Fragment as Tt, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
38
|
+
import { keepPreviousData as Et, useInfiniteQuery as Dt, useQuery as v, useSuspenseQuery as Ot } from "@tanstack/react-query";
|
|
39
|
+
import { ListFilterBar as kt, ListFilterMenu as At, ListSkeleton as jt, MoreButton as Mt } from "@parallelworks/ui/list";
|
|
39
40
|
// src/pages/issues.tsx
|
|
40
|
-
var
|
|
41
|
+
var Nt = {
|
|
41
42
|
status: "status",
|
|
42
43
|
priority: "priority",
|
|
43
44
|
project: "project",
|
|
44
45
|
type: "type"
|
|
45
|
-
},
|
|
46
|
-
function
|
|
46
|
+
}, Pt = [];
|
|
47
|
+
function Ft({ team: e, ...t }) {
|
|
47
48
|
return t;
|
|
48
49
|
}
|
|
49
|
-
var
|
|
50
|
-
let t = globalThis.matchMedia?.(
|
|
50
|
+
var It = 3, Lt = "(max-width: 639px)", Rt = () => globalThis.matchMedia?.(Lt).matches ?? !1, zt = (e) => {
|
|
51
|
+
let t = globalThis.matchMedia?.(Lt);
|
|
51
52
|
return t?.addEventListener("change", e), () => t?.removeEventListener("change", e);
|
|
52
|
-
},
|
|
53
|
-
function
|
|
53
|
+
}, Bt = (e) => `saved:${nt(e)}`;
|
|
54
|
+
function Vt(e, t, n) {
|
|
54
55
|
let r = t && !e.some((e) => e.id === t.id) ? [...e, t] : e, i = r.slice(0, n);
|
|
55
56
|
return t && !i.some((e) => e.id === t.id) && (i = [...i.slice(0, n - 1), t]), {
|
|
56
57
|
shown: i,
|
|
57
58
|
more: r.filter((e) => !i.some((t) => t.id === e.id))
|
|
58
59
|
};
|
|
59
60
|
}
|
|
60
|
-
function
|
|
61
|
+
function Ht(e) {
|
|
61
62
|
let { assignee: t, creator: n, ...r } = e;
|
|
62
63
|
return n ? {
|
|
63
64
|
...r,
|
|
64
65
|
creator: n
|
|
65
66
|
} : r;
|
|
66
67
|
}
|
|
67
|
-
function
|
|
68
|
-
let
|
|
68
|
+
function Ut({ person: c } = {}) {
|
|
69
|
+
let d = h("issues"), Lt = h("planning"), Ut = h("common"), { workspace: y, key: b } = bt({ strict: !1 }), x = xt({ strict: !1 }), S = b ? {
|
|
69
70
|
...x,
|
|
70
71
|
team: b
|
|
71
|
-
} :
|
|
72
|
-
...
|
|
73
|
-
creator:
|
|
72
|
+
} : c ? x.creator ? {
|
|
73
|
+
...Ht(x),
|
|
74
|
+
creator: c
|
|
74
75
|
} : {
|
|
75
76
|
...x,
|
|
76
|
-
assignee:
|
|
77
|
-
} : x,
|
|
77
|
+
assignee: c
|
|
78
|
+
} : x, Kt = it(), qt = (e) => c ? ot(y, { ...Ht(e) }).replace(`/${y}/issues`, `/${y}/people/${encodeURIComponent(c)}`) : ot(y, { ...e }), C = (e, t) => {
|
|
78
79
|
let { team: n, ...r } = e;
|
|
79
|
-
return
|
|
80
|
+
return Kt(c ? {
|
|
80
81
|
to: "/$workspace/people/$username",
|
|
81
82
|
params: {
|
|
82
83
|
workspace: y,
|
|
83
|
-
username:
|
|
84
|
+
username: c
|
|
84
85
|
},
|
|
85
|
-
search:
|
|
86
|
+
search: Ht(r),
|
|
86
87
|
...t && { replace: t }
|
|
87
88
|
} : n ? {
|
|
88
89
|
to: "/$workspace/teams/$key/issues",
|
|
@@ -98,100 +99,100 @@ function Ht({ person: o } = {}) {
|
|
|
98
99
|
search: r,
|
|
99
100
|
...t && { replace: t }
|
|
100
101
|
});
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
let { data:
|
|
106
|
-
|
|
102
|
+
}, Jt = p((e) => C(e, !0));
|
|
103
|
+
Jt.current = (e) => C(e, !0);
|
|
104
|
+
let Yt = p((e) => C(l(S, "q", e), !0));
|
|
105
|
+
Yt.current = (e) => C(l(S, "q", e), !0);
|
|
106
|
+
let { data: Xt } = Ot(a), { data: w } = Ot(te(y)), Zt = Je(), T = S.view ?? "active", [Qt, $t] = m(S.q ?? ""), en = p(null);
|
|
107
|
+
Ct(() => {
|
|
107
108
|
let e = setTimeout(() => {
|
|
108
|
-
(S.q ?? "") !==
|
|
109
|
+
(S.q ?? "") !== Qt && Yt.current(Qt);
|
|
109
110
|
}, 250);
|
|
110
111
|
return () => clearTimeout(e);
|
|
111
|
-
}, [
|
|
112
|
-
let { data:
|
|
113
|
-
...
|
|
112
|
+
}, [Qt, S.q]);
|
|
113
|
+
let { data: tn } = v({
|
|
114
|
+
...ee(y, S.team ?? ""),
|
|
114
115
|
enabled: !!S.status && !!S.team
|
|
115
|
-
}),
|
|
116
|
-
|
|
116
|
+
}), nn = Ve(S, tn), rn = !S.status || !S.team || !!tn, an = be(), { nameOf: on, avatarOf: sn } = $e(y), E = S.saved ? {} : Ie(), { data: cn } = v(Te(y)), D = w.find((e) => e.key === S.team), O = f(() => De(cn, D ? [D.id] : w.map((e) => e.id)), [
|
|
117
|
+
cn,
|
|
117
118
|
D,
|
|
118
119
|
w
|
|
119
|
-
]), k = h("customFields"),
|
|
120
|
+
]), k = h("customFields"), ln = h("issueTypes"), { data: un } = v(Ke(y)), dn = f(() => (un ?? []).filter((e) => !e.archivedAt && (!D || e.teamIds.length === 0 || e.teamIds.includes(D.id))), [un, D]), A = Be(S.order, O) ? S.order : Be(E.order, O) ? E.order : "updated", j = ze(S.group, O) ? S.group : ze(E.group, O) ? E.group : "status", fn = O.find((e) => e.id === Ee(j)), [pn, mn] = m(() => Ne(y)), hn = f(() => O.filter((e) => pn.includes(e.id)), [O, pn]), M = S.layout === "board" || !S.layout && E.layout === "board", [N, gn] = m(() => {
|
|
120
121
|
try {
|
|
121
|
-
return localStorage.getItem(
|
|
122
|
+
return localStorage.getItem(Me) !== "hidden";
|
|
122
123
|
} catch {
|
|
123
124
|
return !0;
|
|
124
125
|
}
|
|
125
|
-
}),
|
|
126
|
+
}), _n = () => gn((e) => {
|
|
126
127
|
try {
|
|
127
|
-
localStorage.setItem(
|
|
128
|
+
localStorage.setItem(Me, e ? "hidden" : "shown");
|
|
128
129
|
} catch {}
|
|
129
130
|
return !e;
|
|
130
|
-
}), [
|
|
131
|
+
}), [vn, yn] = m(() => {
|
|
131
132
|
try {
|
|
132
|
-
return localStorage.getItem(
|
|
133
|
+
return localStorage.getItem(Ae) === "shown";
|
|
133
134
|
} catch {
|
|
134
135
|
return !1;
|
|
135
136
|
}
|
|
136
|
-
}),
|
|
137
|
+
}), bn = () => yn((e) => {
|
|
137
138
|
try {
|
|
138
|
-
localStorage.setItem(
|
|
139
|
+
localStorage.setItem(Ae, e ? "hidden" : "shown");
|
|
139
140
|
} catch {}
|
|
140
141
|
return !e;
|
|
141
|
-
}), [
|
|
142
|
-
...r(y,
|
|
143
|
-
placeholderData:
|
|
144
|
-
enabled:
|
|
145
|
-
}), { hasNextPage:
|
|
146
|
-
|
|
147
|
-
|
|
142
|
+
}), [xn, Sn] = m("assignees"), Cn = f(() => ue(S.breakdown), [S.breakdown]), wn = (e) => C(l(S, "breakdown", ce(e) ?? ""), !0), Tn = se(Cn) > 0, P = !M && !Tn && !S.status && Ye.includes(j) && n.includes(A) ? j : void 0, F = Dt({
|
|
143
|
+
...r(y, nn),
|
|
144
|
+
placeholderData: Et,
|
|
145
|
+
enabled: rn && (!P || N)
|
|
146
|
+
}), { hasNextPage: En, isFetchingNextPage: Dn, fetchNextPage: On } = F, kn = !P || N;
|
|
147
|
+
Ct(() => {
|
|
148
|
+
kn && En && !Dn && !F.error && On();
|
|
148
149
|
}, [
|
|
149
|
-
|
|
150
|
-
Tn,
|
|
150
|
+
kn,
|
|
151
151
|
En,
|
|
152
|
+
Dn,
|
|
152
153
|
F.error,
|
|
153
|
-
|
|
154
|
+
On
|
|
154
155
|
]);
|
|
155
156
|
let I = v({
|
|
156
157
|
...t(y, st(S), P ?? "status"),
|
|
157
|
-
placeholderData:
|
|
158
|
-
enabled:
|
|
159
|
-
}), L =
|
|
158
|
+
placeholderData: Et,
|
|
159
|
+
enabled: rn && !!P
|
|
160
|
+
}), L = Xe(y, nn, P ?? "status", A, I.data?.byKey, rn && !!P), R = P ? I.data : F.data, An = P ? I.error ?? L.error : F.error, jn = P ? I.isFetching : F.isFetching, z = P ? L.fetching : !!En, B = P ? L.complete : !En, Mn = f(() => F.data?.pages.flatMap((e) => e.issues) ?? [], [F.data]), V = f(() => P ? [...L.issues.values()].flat() : Mn, [
|
|
160
161
|
P,
|
|
161
162
|
L.issues,
|
|
162
163
|
Mn
|
|
163
164
|
]), { data: Nn } = v({
|
|
164
|
-
...
|
|
165
|
+
...o(y),
|
|
165
166
|
enabled: P === "project"
|
|
166
|
-
}), Pn =
|
|
167
|
-
status: (e) =>
|
|
168
|
-
priority: (e) =>
|
|
169
|
-
person:
|
|
170
|
-
avatar:
|
|
167
|
+
}), Pn = Tn ? V.filter((e) => le(e, Cn)) : V, Fn = f(() => Le(Ue(Pn, A, O), j, {
|
|
168
|
+
status: (e) => d(`groups.${e}`),
|
|
169
|
+
priority: (e) => an[e] ?? "",
|
|
170
|
+
person: on,
|
|
171
|
+
avatar: sn,
|
|
171
172
|
none: {
|
|
172
|
-
assignee:
|
|
173
|
-
project:
|
|
174
|
-
label:
|
|
175
|
-
all:
|
|
173
|
+
assignee: d("noAssignee"),
|
|
174
|
+
project: d("noProject"),
|
|
175
|
+
label: d("noLabel"),
|
|
176
|
+
all: d("all")
|
|
176
177
|
},
|
|
177
178
|
noField: (e) => k("noField", { name: e }),
|
|
178
179
|
yes: k("yes"),
|
|
179
|
-
noType:
|
|
180
|
-
}, M || !!P, O,
|
|
180
|
+
noType: ln("noType")
|
|
181
|
+
}, M || !!P, O, dn), [
|
|
181
182
|
P,
|
|
182
183
|
Pn,
|
|
183
184
|
A,
|
|
184
185
|
j,
|
|
185
|
-
|
|
186
|
+
d,
|
|
186
187
|
k,
|
|
187
|
-
|
|
188
|
-
rn,
|
|
188
|
+
ln,
|
|
189
189
|
an,
|
|
190
190
|
on,
|
|
191
|
+
sn,
|
|
191
192
|
M,
|
|
192
193
|
O,
|
|
193
|
-
|
|
194
|
-
]),
|
|
194
|
+
dn
|
|
195
|
+
]), H = f(() => {
|
|
195
196
|
if (!P) return Fn;
|
|
196
197
|
let e = I.data?.byKey, t = Fn;
|
|
197
198
|
if (P === "project") {
|
|
@@ -212,87 +213,87 @@ function Ht({ person: o } = {}) {
|
|
|
212
213
|
I.data,
|
|
213
214
|
Nn,
|
|
214
215
|
L.more
|
|
215
|
-
]),
|
|
216
|
+
]), U = f(() => H.flatMap((e) => e.issues), [H]), In = f(() => new Map(U.map((e, t) => [e.id, t])), [U]), Ln = !Tn && !S.status ? Nt[j] : void 0, { data: Rn } = v({
|
|
216
217
|
...t(y, st(S), Ln ?? "status"),
|
|
217
|
-
enabled:
|
|
218
|
-
}), zn = St((e) => P ? I.data?.byKey.get(e.key) ?? e.issues.length :
|
|
218
|
+
enabled: z && !!Ln
|
|
219
|
+
}), zn = St((e) => P ? I.data?.byKey.get(e.key) ?? e.issues.length : z && Rn?.byKey.get(e.key) || e.issues.length, [
|
|
219
220
|
P,
|
|
220
221
|
I.data,
|
|
221
|
-
|
|
222
|
+
z,
|
|
222
223
|
Rn
|
|
223
|
-
]), Bn = f(() => new Map(w.map((e) => [e.id, e])), [w]), [Vn, Hn] = m(0),
|
|
224
|
+
]), Bn = f(() => new Map(w.map((e) => [e.id, e])), [w]), [Vn, Hn] = m(0), W = U[Math.min(Vn, U.length - 1)], [G, K] = m(/* @__PURE__ */ new Set()), Un = p(null), Wn = Ge(y), Gn = Ce(y, w), { people: Kn } = qe(), qn = f(() => {
|
|
224
225
|
let e = /* @__PURE__ */ new Map();
|
|
225
226
|
for (let t of Kn) {
|
|
226
|
-
if (!t.identifier || t.username ===
|
|
227
|
+
if (!t.identifier || t.username === Xt?.user.username) continue;
|
|
227
228
|
let n = e.get(t.identifier) ?? /* @__PURE__ */ new Set();
|
|
228
229
|
n.add(t.username), e.set(t.identifier, n);
|
|
229
230
|
}
|
|
230
231
|
return new Map([...e].map(([e, t]) => [e, [...t]]));
|
|
231
|
-
}, [Kn,
|
|
232
|
-
|
|
233
|
-
let Xn = (e) =>
|
|
232
|
+
}, [Kn, Xt?.user.username]), Jn = yt(), Yn = f(() => U.filter((e) => G.has(e.id)), [U, G]);
|
|
233
|
+
Qe(Yn);
|
|
234
|
+
let Xn = (e) => K((t) => {
|
|
234
235
|
let n = new Set(t);
|
|
235
236
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
236
237
|
}), Zn = (e) => {
|
|
237
|
-
(Un.current === null ||
|
|
238
|
+
(Un.current === null || G.size === 0) && (Un.current = Math.max(Vn, 0));
|
|
238
239
|
let t = Un.current, [n, r] = t < e ? [t, e] : [e, t];
|
|
239
|
-
|
|
240
|
-
},
|
|
241
|
-
let n =
|
|
240
|
+
K(new Set(U.slice(n, r + 1).map((e) => e.id)));
|
|
241
|
+
}, Qn = (e, t) => {
|
|
242
|
+
let n = U[e];
|
|
242
243
|
if (n) {
|
|
243
244
|
if (t) return Zn(e);
|
|
244
245
|
Xn(n.id), Un.current = e;
|
|
245
246
|
}
|
|
246
|
-
},
|
|
247
|
-
(e.metaKey || e.ctrlKey || e.shiftKey) && (e.preventDefault(),
|
|
247
|
+
}, $n = (e, t) => {
|
|
248
|
+
(e.metaKey || e.ctrlKey || e.shiftKey) && (e.preventDefault(), Qn(t, e.shiftKey));
|
|
248
249
|
}, q = (e, t) => {
|
|
249
|
-
let n = Math.min(Math.max(Vn + e, 0),
|
|
250
|
+
let n = Math.min(Math.max(Vn + e, 0), U.length - 1);
|
|
250
251
|
t && Zn(n), Hn(n);
|
|
251
|
-
},
|
|
252
|
-
let n =
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
pick:
|
|
252
|
+
}, er = (e, t) => {
|
|
253
|
+
let n = G.has(t.id) ? U.filter((e) => G.has(e.id)) : [t];
|
|
254
|
+
G.has(t.id) || K(/* @__PURE__ */ new Set()), Jn(e, Wn(n));
|
|
255
|
+
}, tr = p({
|
|
256
|
+
pick: Qn,
|
|
256
257
|
select: Hn,
|
|
257
|
-
click:
|
|
258
|
-
menu:
|
|
258
|
+
click: $n,
|
|
259
|
+
menu: er
|
|
259
260
|
});
|
|
260
|
-
|
|
261
|
-
pick:
|
|
261
|
+
tr.current = {
|
|
262
|
+
pick: Qn,
|
|
262
263
|
select: Hn,
|
|
263
|
-
click:
|
|
264
|
-
menu:
|
|
264
|
+
click: $n,
|
|
265
|
+
menu: er
|
|
265
266
|
};
|
|
266
|
-
let [J,
|
|
267
|
-
|
|
268
|
-
J && (
|
|
267
|
+
let [J, nr] = m(!1);
|
|
268
|
+
Ct(() => {
|
|
269
|
+
J && (B || An) && (K(new Set(U.map((e) => e.id))), nr(!1));
|
|
269
270
|
}, [
|
|
270
271
|
J,
|
|
271
|
-
|
|
272
|
+
B,
|
|
272
273
|
An,
|
|
273
|
-
|
|
274
|
+
U
|
|
274
275
|
]);
|
|
275
|
-
let { data:
|
|
276
|
+
let { data: rr } = v({
|
|
276
277
|
...t(y, st(S), "status"),
|
|
277
278
|
enabled: J
|
|
278
|
-
}),
|
|
279
|
-
|
|
280
|
-
},
|
|
281
|
-
|
|
282
|
-
},
|
|
279
|
+
}), ir = () => {
|
|
280
|
+
K(new Set(U.map((e) => e.id))), P && L.loadAll(), nr(!B);
|
|
281
|
+
}, ar = () => {
|
|
282
|
+
K(/* @__PURE__ */ new Set()), nr(!1);
|
|
283
|
+
}, or = p(null), sr = (e) => {
|
|
283
284
|
if (J) return;
|
|
284
|
-
let t =
|
|
285
|
+
let t = G.size > 0 ? Yn : W ? [W] : [];
|
|
285
286
|
if (t.length === 0) return;
|
|
286
287
|
let n = Wn(t).find((t) => "shortcut" in t && t.shortcut === e);
|
|
287
288
|
return n && "label" in n && !n.disabled ? n : void 0;
|
|
288
289
|
}, Y = (e) => () => {
|
|
289
|
-
let t =
|
|
290
|
+
let t = sr(e), n = G.size > 0 && or.current || W && document.getElementById(`row-${W.id}`);
|
|
290
291
|
t && "items" in t && t.items && n && Jn(n, t.items);
|
|
291
|
-
}, [
|
|
292
|
-
let e =
|
|
293
|
-
e && "onClick" in e &&
|
|
292
|
+
}, [cr, lr] = m(null), ur = () => {
|
|
293
|
+
let e = sr("⌫");
|
|
294
|
+
e && "onClick" in e && lr(() => e.onClick);
|
|
294
295
|
};
|
|
295
|
-
|
|
296
|
+
at({
|
|
296
297
|
...!M && {
|
|
297
298
|
j: () => q(1, !1),
|
|
298
299
|
k: () => q(-1, !1),
|
|
@@ -300,78 +301,87 @@ function Ht({ person: o } = {}) {
|
|
|
300
301
|
K: () => q(-1, !0),
|
|
301
302
|
ArrowDown: (e) => q(1, e.shiftKey),
|
|
302
303
|
ArrowUp: (e) => q(-1, e.shiftKey),
|
|
303
|
-
x: () =>
|
|
304
|
-
X: () =>
|
|
305
|
-
"Mod+a":
|
|
306
|
-
"Shift+Mod+a":
|
|
304
|
+
x: () => W && Qn(U.indexOf(W), !1),
|
|
305
|
+
X: () => W && Qn(U.indexOf(W), !0),
|
|
306
|
+
"Mod+a": ir,
|
|
307
|
+
"Shift+Mod+a": ar,
|
|
307
308
|
s: Y("S"),
|
|
308
309
|
p: Y("P"),
|
|
309
310
|
a: Y("A"),
|
|
310
311
|
l: Y("L"),
|
|
311
312
|
m: Y("M"),
|
|
312
313
|
d: Y("D"),
|
|
313
|
-
Backspace:
|
|
314
|
-
Delete:
|
|
315
|
-
Enter: () =>
|
|
314
|
+
Backspace: ur,
|
|
315
|
+
Delete: ur,
|
|
316
|
+
Enter: () => W && Kt({
|
|
316
317
|
to: "/$workspace/issues/$identifier",
|
|
317
318
|
params: {
|
|
318
319
|
workspace: y,
|
|
319
|
-
identifier:
|
|
320
|
+
identifier: W.identifier
|
|
320
321
|
}
|
|
321
322
|
})
|
|
322
323
|
},
|
|
323
|
-
Escape:
|
|
324
|
-
"/": () =>
|
|
325
|
-
}),
|
|
324
|
+
Escape: ar,
|
|
325
|
+
"/": () => en.current?.focus()
|
|
326
|
+
}), Ct(() => {
|
|
326
327
|
let e = (e) => {
|
|
327
|
-
(e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "f" && (e.preventDefault(),
|
|
328
|
+
(e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === "f" && (e.preventDefault(), en.current?.focus(), en.current?.select());
|
|
328
329
|
};
|
|
329
330
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
330
331
|
}, []);
|
|
331
|
-
let
|
|
332
|
-
...
|
|
333
|
-
enabled: !!b && !
|
|
334
|
-
}),
|
|
332
|
+
let dr = p(null), X = w.find((e) => e.key === S.team), fr = de(y, S, (e) => C(fe(S, e), !0), !!b && !S.assignee && !S.creator && !S.saved && !S.scope), pr = ot(y, { ...l(S, "q", void 0) }), { views: mr, create: hr, update: gr } = lt(y), Z = mr.find((e) => tt(e, S.saved)), { data: _r = [] } = v({
|
|
333
|
+
...s(y, S.team ?? ""),
|
|
334
|
+
enabled: !!b && !c
|
|
335
|
+
}), vr = ut(y), { data: yr } = v(i(y)), { data: br } = v(o(y)), { data: xr } = v({
|
|
335
336
|
...e(y, X?.key ?? ""),
|
|
336
337
|
enabled: !!X
|
|
337
338
|
});
|
|
338
|
-
|
|
339
|
-
let e = /^[0-9a-f]{8}-[0-9a-f]{4}-/i, t = { ...S }, n =
|
|
339
|
+
Ct(() => {
|
|
340
|
+
let e = /^[0-9a-f]{8}-[0-9a-f]{4}-/i, t = { ...S }, n = yr?.find((e) => e.id === S.label);
|
|
340
341
|
S.label && e.test(S.label) && n && (t.label = n.name);
|
|
341
|
-
let r =
|
|
342
|
-
S.project && e.test(S.project) && r && (t.project =
|
|
343
|
-
let i =
|
|
344
|
-
i && (t.cycle = i.id), S.saved && e.test(S.saved) && Z && (t.saved =
|
|
342
|
+
let r = br?.find((e) => e.id === S.project);
|
|
343
|
+
S.project && e.test(S.project) && r && (t.project = et(r));
|
|
344
|
+
let i = xr?.find((e) => String(e.number) === S.cycle);
|
|
345
|
+
i && (t.cycle = i.id), S.saved && e.test(S.saved) && Z && (t.saved = nt(Z));
|
|
346
|
+
let a = ue(S.breakdown), o = we(a, {
|
|
347
|
+
...yr && { labels: new Set(yr.map((e) => e.id)) },
|
|
348
|
+
...br && { projects: new Set(br.map((e) => e.id)) }
|
|
349
|
+
});
|
|
350
|
+
if (o !== a) {
|
|
351
|
+
let e = ce(o);
|
|
352
|
+
e ? t.breakdown = e : delete t.breakdown;
|
|
353
|
+
}
|
|
354
|
+
JSON.stringify(t) !== JSON.stringify(S) && Jt.current(t);
|
|
345
355
|
}, [
|
|
346
356
|
S,
|
|
347
|
-
vr,
|
|
348
357
|
yr,
|
|
349
358
|
br,
|
|
359
|
+
xr,
|
|
350
360
|
Z
|
|
351
361
|
]);
|
|
352
|
-
let
|
|
362
|
+
let Sr = st({
|
|
353
363
|
...S,
|
|
354
364
|
...A !== "updated" && { order: A },
|
|
355
365
|
...j !== "status" && { group: j },
|
|
356
366
|
...M && { layout: "board" }
|
|
357
|
-
}),
|
|
367
|
+
}), Cr = Z && {
|
|
358
368
|
...S.team && { team: S.team },
|
|
359
369
|
...Z.filters
|
|
360
|
-
},
|
|
361
|
-
|
|
362
|
-
let
|
|
370
|
+
}, wr = Cr ? !ct(Cr, Sr) : Object.keys(Sr).length > 0, Tr = rt(y, "save_views"), [Er, Dr] = m(!1), Q = h("savedViews"), $ = Xt?.user.username, Or = !Z && !X && (!S.assigneeKind && S.assignee === $ && !S.creator || S.creator === $ && !S.assignee), kr = c ?? (Or ? $ : void 0), Ar = Z?.name ?? X?.name ?? (c && c !== $ ? d("personIssues", { name: on("user", c) }) : !S.assigneeKind && S.assignee === $ || S.creator === $ ? d("mine") : d("all")), jr = h("workspace");
|
|
371
|
+
Ze(...X && !Z ? [jr("issues"), X.name] : [Ar]);
|
|
372
|
+
let Mr = wt(zt, Rt), Nr = Vt(b && !c ? _r : [], Z, Mr ? +!!Z : It), Pr = wr && /* @__PURE__ */ _(Tt, { children: [Z?.canEdit && /* @__PURE__ */ g(u, {
|
|
363
373
|
type: "button",
|
|
364
374
|
size: "sm",
|
|
365
|
-
loading:
|
|
366
|
-
onClick: () =>
|
|
375
|
+
loading: gr.isPending,
|
|
376
|
+
onClick: () => gr.mutate({
|
|
367
377
|
id: Z.id,
|
|
368
|
-
filters: Z.filters.team ?
|
|
378
|
+
filters: Z.filters.team ? Sr : Ft(Sr)
|
|
369
379
|
}),
|
|
370
380
|
children: Q("update")
|
|
371
|
-
}), /* @__PURE__ */ g(
|
|
381
|
+
}), /* @__PURE__ */ g(u, {
|
|
372
382
|
type: "button",
|
|
373
383
|
size: "sm",
|
|
374
|
-
onClick: () =>
|
|
384
|
+
onClick: () => Dr(!0),
|
|
375
385
|
children: Q(Z ? "saveAsNew" : "save")
|
|
376
386
|
})] });
|
|
377
387
|
return /* @__PURE__ */ _("div", {
|
|
@@ -382,138 +392,138 @@ function Ht({ person: o } = {}) {
|
|
|
382
392
|
children: [
|
|
383
393
|
/* @__PURE__ */ g("h1", {
|
|
384
394
|
className: "text-sm font-semibold whitespace-nowrap",
|
|
385
|
-
children:
|
|
395
|
+
children: Ar
|
|
386
396
|
}),
|
|
387
|
-
/* @__PURE__ */ g(
|
|
397
|
+
/* @__PURE__ */ g(re, {
|
|
388
398
|
workspace: y,
|
|
389
399
|
kind: "view",
|
|
390
|
-
target:
|
|
391
|
-
label: T === "active" ?
|
|
392
|
-
title:
|
|
393
|
-
view:
|
|
400
|
+
target: pr,
|
|
401
|
+
label: T === "active" ? Ar : d("favoriteLabel", {
|
|
402
|
+
title: Ar,
|
|
403
|
+
view: d(`views.${T}`)
|
|
394
404
|
})
|
|
395
405
|
}),
|
|
396
|
-
|
|
406
|
+
kr && /* @__PURE__ */ g(vt, {
|
|
397
407
|
variant: "segmented",
|
|
398
408
|
size: "sm",
|
|
399
|
-
label:
|
|
409
|
+
label: d("mineScope"),
|
|
400
410
|
items: ["assigned", "created"].map((e) => ({
|
|
401
411
|
value: e,
|
|
402
|
-
label:
|
|
403
|
-
href:
|
|
412
|
+
label: d(`mineScopes.${e}`),
|
|
413
|
+
href: qt({
|
|
404
414
|
...S.view && { view: S.view },
|
|
405
|
-
...e === "assigned" ? { assignee:
|
|
415
|
+
...e === "assigned" ? { assignee: kr } : { creator: kr }
|
|
406
416
|
})
|
|
407
417
|
})),
|
|
408
418
|
value: S.creator ? "created" : "assigned"
|
|
409
419
|
}),
|
|
410
|
-
Z && /* @__PURE__ */ g(
|
|
420
|
+
Z && /* @__PURE__ */ g(Mt, {
|
|
411
421
|
visible: !0,
|
|
412
|
-
items: () =>
|
|
413
|
-
label:
|
|
422
|
+
items: () => vr.menu(Z),
|
|
423
|
+
label: Ut("moreActionsFor", { name: Z.name })
|
|
414
424
|
}),
|
|
415
425
|
/* @__PURE__ */ g(vt, {
|
|
416
426
|
variant: "segmented",
|
|
417
427
|
size: "sm",
|
|
418
|
-
label:
|
|
419
|
-
items: [...Object.keys(
|
|
428
|
+
label: d("view"),
|
|
429
|
+
items: [...Object.keys(We).map((e) => ({
|
|
420
430
|
value: e,
|
|
421
|
-
label:
|
|
422
|
-
href:
|
|
431
|
+
label: d(`views.${e}`),
|
|
432
|
+
href: qt(Z ? {
|
|
423
433
|
...S.team && { team: S.team },
|
|
424
434
|
...e !== "active" && { view: e }
|
|
425
|
-
} :
|
|
426
|
-
})), ...
|
|
427
|
-
value:
|
|
435
|
+
} : l(S, "view", e === "active" ? void 0 : e))
|
|
436
|
+
})), ...Nr.shown.map((e) => ({
|
|
437
|
+
value: Bt(e),
|
|
428
438
|
label: e.name,
|
|
429
|
-
href:
|
|
439
|
+
href: ot(y, {
|
|
430
440
|
...dt(e),
|
|
431
441
|
team: e.filters.team ?? S.team
|
|
432
442
|
})
|
|
433
443
|
}))],
|
|
434
|
-
value: Z ?
|
|
444
|
+
value: Z ? Bt(Z) : T,
|
|
435
445
|
className: "max-w-full flex-wrap",
|
|
436
|
-
end:
|
|
446
|
+
end: Nr.more.length > 0 && /* @__PURE__ */ g(ft, {
|
|
437
447
|
label: Q("title"),
|
|
438
|
-
items:
|
|
448
|
+
items: Nr.more.map((e) => ({
|
|
439
449
|
label: e.name,
|
|
440
|
-
href:
|
|
450
|
+
href: ot(y, {
|
|
441
451
|
...dt(e),
|
|
442
452
|
team: e.filters.team ?? S.team
|
|
443
453
|
})
|
|
444
454
|
})),
|
|
445
|
-
trigger: /* @__PURE__ */ g(
|
|
455
|
+
trigger: /* @__PURE__ */ g(u, {
|
|
446
456
|
size: "sm",
|
|
447
457
|
variant: "ghost",
|
|
448
|
-
children: Q("more", { count:
|
|
458
|
+
children: Q("more", { count: Nr.more.length })
|
|
449
459
|
})
|
|
450
460
|
})
|
|
451
461
|
}),
|
|
452
462
|
/* @__PURE__ */ _("div", {
|
|
453
463
|
className: "flex w-full min-w-0 flex-wrap items-center gap-2 md:ml-auto md:w-auto md:flex-nowrap",
|
|
454
464
|
children: [
|
|
455
|
-
|
|
465
|
+
fr.count === 0 && Pr,
|
|
456
466
|
/* @__PURE__ */ g(gt, {
|
|
457
|
-
ref:
|
|
458
|
-
value:
|
|
459
|
-
onValueChange:
|
|
460
|
-
onKeyDown: (e) => e.key === "Escape" && !
|
|
461
|
-
placeholder:
|
|
462
|
-
label:
|
|
467
|
+
ref: en,
|
|
468
|
+
value: Qt,
|
|
469
|
+
onValueChange: $t,
|
|
470
|
+
onKeyDown: (e) => e.key === "Escape" && !Qt && e.currentTarget.blur(),
|
|
471
|
+
placeholder: d("search"),
|
|
472
|
+
label: d("search"),
|
|
463
473
|
"aria-keyshortcuts": "/ Meta+F Control+F",
|
|
464
474
|
size: "sm",
|
|
465
475
|
className: "min-w-0 flex-1 max-md:order-first max-md:basis-full md:w-56 md:flex-initial"
|
|
466
476
|
}),
|
|
467
|
-
/* @__PURE__ */ g(
|
|
468
|
-
/* @__PURE__ */ _(
|
|
477
|
+
/* @__PURE__ */ g(At, { filters: fr }),
|
|
478
|
+
/* @__PURE__ */ _(ne, {
|
|
469
479
|
layouts: [{
|
|
470
480
|
value: "list",
|
|
471
|
-
label:
|
|
472
|
-
icon: /* @__PURE__ */ g(
|
|
481
|
+
label: d("layouts.list"),
|
|
482
|
+
icon: /* @__PURE__ */ g(ve, {})
|
|
473
483
|
}, {
|
|
474
484
|
value: "board",
|
|
475
|
-
label:
|
|
476
|
-
icon: /* @__PURE__ */ g(
|
|
485
|
+
label: d("layouts.board"),
|
|
486
|
+
icon: /* @__PURE__ */ g(he, {})
|
|
477
487
|
}],
|
|
478
488
|
layout: M ? "board" : "list",
|
|
479
489
|
onLayoutChange: (e) => {
|
|
480
|
-
|
|
490
|
+
Pe({ layout: e }), C(l(S, "layout", e === "board" ? "board" : void 0));
|
|
481
491
|
},
|
|
482
492
|
changed: A !== "updated" || j !== "status" || M,
|
|
483
493
|
children: [
|
|
484
494
|
/* @__PURE__ */ g(mt, {
|
|
485
|
-
label:
|
|
495
|
+
label: d("orderBy"),
|
|
486
496
|
children: /* @__PURE__ */ g(_t, {
|
|
487
497
|
value: A,
|
|
488
|
-
items: [...
|
|
498
|
+
items: [...He.map((e) => ({
|
|
489
499
|
value: e,
|
|
490
|
-
label:
|
|
491
|
-
})), ...O.filter((e) =>
|
|
500
|
+
label: d(`order.${e}`)
|
|
501
|
+
})), ...O.filter((e) => ke.includes(e.kind)).map((e) => ({
|
|
492
502
|
value: `field:${e.id}`,
|
|
493
503
|
label: e.name
|
|
494
504
|
}))],
|
|
495
505
|
onValueChange: (e) => {
|
|
496
|
-
|
|
506
|
+
Pe({ order: e }), C(l(S, "order", e === "updated" ? void 0 : e));
|
|
497
507
|
},
|
|
498
|
-
"aria-label":
|
|
508
|
+
"aria-label": d("orderBy"),
|
|
499
509
|
size: "sm"
|
|
500
510
|
})
|
|
501
511
|
}),
|
|
502
512
|
/* @__PURE__ */ g(mt, {
|
|
503
|
-
label:
|
|
513
|
+
label: d("groupBy"),
|
|
504
514
|
children: /* @__PURE__ */ g(_t, {
|
|
505
515
|
value: j,
|
|
506
|
-
items: [...
|
|
516
|
+
items: [...Re.map((e) => ({
|
|
507
517
|
value: e,
|
|
508
|
-
label:
|
|
509
|
-
})), ...O.filter((e) =>
|
|
518
|
+
label: d(`grouping.${e}`)
|
|
519
|
+
})), ...O.filter((e) => Oe.includes(e.kind)).map((e) => ({
|
|
510
520
|
value: `field:${e.id}`,
|
|
511
521
|
label: e.name
|
|
512
522
|
}))],
|
|
513
523
|
onValueChange: (e) => {
|
|
514
|
-
|
|
524
|
+
Pe({ group: e }), C(l(S, "group", e === "status" ? void 0 : e));
|
|
515
525
|
},
|
|
516
|
-
"aria-label":
|
|
526
|
+
"aria-label": d("groupBy"),
|
|
517
527
|
size: "sm"
|
|
518
528
|
})
|
|
519
529
|
}),
|
|
@@ -521,13 +531,13 @@ function Ht({ person: o } = {}) {
|
|
|
521
531
|
label: k("onRows"),
|
|
522
532
|
children: /* @__PURE__ */ g(_t, {
|
|
523
533
|
multiple: !0,
|
|
524
|
-
value:
|
|
534
|
+
value: pn.filter((e) => O.some((t) => t.id === e)),
|
|
525
535
|
items: O.map((e) => ({
|
|
526
536
|
value: e.id,
|
|
527
537
|
label: e.name
|
|
528
538
|
})),
|
|
529
539
|
onValueChange: (e) => {
|
|
530
|
-
|
|
540
|
+
Fe(y, e), mn(e);
|
|
531
541
|
},
|
|
532
542
|
placeholder: k("noneOnRows"),
|
|
533
543
|
"aria-label": k("onRows"),
|
|
@@ -539,191 +549,191 @@ function Ht({ person: o } = {}) {
|
|
|
539
549
|
/* @__PURE__ */ g(ht, {
|
|
540
550
|
variant: "secondary",
|
|
541
551
|
size: "sm",
|
|
542
|
-
icon: /* @__PURE__ */ g(
|
|
543
|
-
label:
|
|
552
|
+
icon: /* @__PURE__ */ g(ye, { className: "size-3.5" }),
|
|
553
|
+
label: d(N ? "hidePanel" : "showPanel"),
|
|
544
554
|
"aria-pressed": N,
|
|
545
|
-
onClick:
|
|
555
|
+
onClick: _n,
|
|
546
556
|
className: "max-xl:hidden"
|
|
547
557
|
}),
|
|
548
558
|
/* @__PURE__ */ g(ht, {
|
|
549
559
|
variant: "secondary",
|
|
550
560
|
size: "sm",
|
|
551
|
-
icon: /* @__PURE__ */ g(
|
|
552
|
-
label:
|
|
553
|
-
"aria-pressed":
|
|
554
|
-
onClick:
|
|
561
|
+
icon: /* @__PURE__ */ g(ge, { className: "size-3.5" }),
|
|
562
|
+
label: d(vn ? "hideInsights" : "showInsights"),
|
|
563
|
+
"aria-pressed": vn,
|
|
564
|
+
onClick: bn
|
|
555
565
|
})
|
|
556
566
|
]
|
|
557
567
|
})
|
|
558
568
|
]
|
|
559
569
|
}),
|
|
560
|
-
/* @__PURE__ */ g(
|
|
561
|
-
filters:
|
|
562
|
-
trailing:
|
|
570
|
+
/* @__PURE__ */ g(kt, {
|
|
571
|
+
filters: fr,
|
|
572
|
+
trailing: Pr,
|
|
563
573
|
className: "shrink-0 border-b border-border px-4 py-2 md:px-5"
|
|
564
574
|
}),
|
|
565
|
-
|
|
575
|
+
vn && /* @__PURE__ */ g(me, {
|
|
566
576
|
workspace: y,
|
|
567
577
|
issues: Pn
|
|
568
578
|
}),
|
|
569
|
-
|
|
579
|
+
Er && /* @__PURE__ */ g(Se, {
|
|
570
580
|
title: Q("saveTitle"),
|
|
571
581
|
submitLabel: Q("save"),
|
|
572
|
-
share: { allowed:
|
|
573
|
-
onClose: () =>
|
|
582
|
+
share: { allowed: Tr },
|
|
583
|
+
onClose: () => Dr(!1),
|
|
574
584
|
onSubmit: async ({ name: e, shared: t }) => {
|
|
575
|
-
let n = await
|
|
585
|
+
let n = await hr.mutateAsync({
|
|
576
586
|
name: e,
|
|
577
587
|
shared: t,
|
|
578
|
-
filters:
|
|
588
|
+
filters: Sr
|
|
579
589
|
});
|
|
580
590
|
C(dt(n), !0);
|
|
581
591
|
}
|
|
582
592
|
}),
|
|
583
593
|
/* @__PURE__ */ g(pt, {
|
|
584
|
-
open: !!
|
|
585
|
-
onClose: () =>
|
|
594
|
+
open: !!cr,
|
|
595
|
+
onClose: () => lr(null),
|
|
586
596
|
onConfirm: () => {
|
|
587
|
-
|
|
597
|
+
cr?.(), lr(null), ar();
|
|
588
598
|
},
|
|
589
|
-
title:
|
|
590
|
-
description:
|
|
591
|
-
confirmLabel:
|
|
599
|
+
title: d("archiveTitle", { count: G.size || 1 }),
|
|
600
|
+
description: d("archiveDescription"),
|
|
601
|
+
confirmLabel: d("archiveConfirm"),
|
|
592
602
|
destructive: !0
|
|
593
603
|
}),
|
|
594
604
|
/* @__PURE__ */ _("div", {
|
|
595
605
|
className: "relative flex min-h-0 flex-1",
|
|
596
606
|
children: [
|
|
597
|
-
|
|
598
|
-
ref:
|
|
607
|
+
G.size > 0 && /* @__PURE__ */ _("div", {
|
|
608
|
+
ref: or,
|
|
599
609
|
role: "toolbar",
|
|
600
|
-
"aria-label":
|
|
610
|
+
"aria-label": d("selected", { count: G.size }),
|
|
601
611
|
className: "absolute bottom-4 left-1/2 z-10 flex max-w-[calc(100%-2rem)] -translate-x-1/2 items-center gap-1 rounded-xl border border-border bg-popover py-1 pr-1 pl-3 text-sm shadow-md",
|
|
602
612
|
children: [
|
|
603
613
|
/* @__PURE__ */ g("span", {
|
|
604
614
|
className: "whitespace-nowrap tabular-nums",
|
|
605
|
-
children: J ?
|
|
615
|
+
children: J ? rr ? d("selectingAll", { count: rr.total }) : d("selectingAllUncounted") : d("selected", { count: G.size })
|
|
606
616
|
}),
|
|
607
|
-
!J && (
|
|
617
|
+
!J && (G.size < U.length || !B) && /* @__PURE__ */ g(u, {
|
|
608
618
|
size: "sm",
|
|
609
619
|
variant: "ghost",
|
|
610
620
|
className: "shrink-0",
|
|
611
|
-
onClick:
|
|
612
|
-
children:
|
|
621
|
+
onClick: ir,
|
|
622
|
+
children: B ? d("selectAll", { count: U.length }) : d("selectAllMatching")
|
|
613
623
|
}),
|
|
614
624
|
/* @__PURE__ */ g(ft, {
|
|
615
|
-
label:
|
|
625
|
+
label: d("actions"),
|
|
616
626
|
items: Wn(Yn),
|
|
617
627
|
side: "top",
|
|
618
|
-
trigger: /* @__PURE__ */ g(
|
|
628
|
+
trigger: /* @__PURE__ */ g(u, {
|
|
619
629
|
size: "sm",
|
|
620
630
|
variant: "outline",
|
|
621
631
|
className: "shrink-0",
|
|
622
|
-
children:
|
|
632
|
+
children: d("actions")
|
|
623
633
|
})
|
|
624
634
|
}),
|
|
625
635
|
/* @__PURE__ */ g(ht, {
|
|
626
636
|
size: "sm",
|
|
627
637
|
variant: "ghost",
|
|
628
|
-
icon: /* @__PURE__ */ g(
|
|
629
|
-
label:
|
|
630
|
-
onClick:
|
|
638
|
+
icon: /* @__PURE__ */ g(_e, {}),
|
|
639
|
+
label: d("clear"),
|
|
640
|
+
onClick: ar
|
|
631
641
|
})
|
|
632
642
|
]
|
|
633
643
|
}),
|
|
634
644
|
/* @__PURE__ */ _("div", {
|
|
635
|
-
ref:
|
|
636
|
-
className: `min-h-0 min-w-0 flex-1 ${M ? "overflow-hidden" : "overflow-y-auto"} ${
|
|
645
|
+
ref: dr,
|
|
646
|
+
className: `min-h-0 min-w-0 flex-1 ${M ? "overflow-hidden" : "overflow-y-auto"} ${G.size > 0 ? "pb-16" : ""} transition-opacity ${jn && !R ? "opacity-50" : ""}`,
|
|
637
647
|
children: [
|
|
638
|
-
/* @__PURE__ */ g(
|
|
648
|
+
/* @__PURE__ */ g(ae, {
|
|
639
649
|
workspace: y,
|
|
640
650
|
issues: Mn,
|
|
641
|
-
tabs:
|
|
642
|
-
focus:
|
|
643
|
-
onFocus:
|
|
651
|
+
tabs: je,
|
|
652
|
+
focus: Cn,
|
|
653
|
+
onFocus: wn,
|
|
644
654
|
className: "border-b border-border px-5 py-1.5"
|
|
645
655
|
}),
|
|
646
|
-
M &&
|
|
656
|
+
M && R && /* @__PURE__ */ g(ie, {
|
|
647
657
|
workspace: y,
|
|
648
|
-
columns: j === "status" &&
|
|
649
|
-
onMove: j === "none" ? void 0 : (e, t, n) => Gn(e, j, t, n,
|
|
650
|
-
onContextMenu:
|
|
658
|
+
columns: j === "status" && We[T].categories.length > 0 ? H.filter((e) => e.issues.length > 0 || e.key === "completed" || We[T].categories.includes(e.key)) : H,
|
|
659
|
+
onMove: j === "none" ? void 0 : (e, t, n) => Gn(e, j, t, n, H.find((e) => e.key === n)?.issues[0], fn),
|
|
660
|
+
onContextMenu: er
|
|
651
661
|
}),
|
|
652
|
-
!M && /* @__PURE__ */ g(
|
|
653
|
-
groups:
|
|
662
|
+
!M && /* @__PURE__ */ g(pe, {
|
|
663
|
+
groups: H,
|
|
654
664
|
count: zn,
|
|
655
|
-
scrollRef:
|
|
656
|
-
keepInView:
|
|
665
|
+
scrollRef: dr,
|
|
666
|
+
keepInView: W?.id,
|
|
657
667
|
onMore: L.loadMore,
|
|
658
|
-
moreLabel:
|
|
659
|
-
renderRow: (e, t) => /* @__PURE__ */ g(
|
|
668
|
+
moreLabel: Ut("loading"),
|
|
669
|
+
renderRow: (e, t) => /* @__PURE__ */ g(Wt, {
|
|
660
670
|
issue: e,
|
|
661
671
|
index: In.get(e.id) ?? -1,
|
|
662
672
|
place: t,
|
|
663
673
|
team: Bn.get(e.teamId),
|
|
664
674
|
workspace: y,
|
|
665
|
-
selected: e.id ===
|
|
666
|
-
picked:
|
|
667
|
-
viewers: qn.get(e.identifier) ??
|
|
668
|
-
fields:
|
|
669
|
-
actions:
|
|
675
|
+
selected: e.id === W?.id,
|
|
676
|
+
picked: G.has(e.id),
|
|
677
|
+
viewers: qn.get(e.identifier) ?? Pt,
|
|
678
|
+
fields: hn,
|
|
679
|
+
actions: tr
|
|
670
680
|
}, e.id)
|
|
671
681
|
}),
|
|
672
|
-
|
|
682
|
+
R && z && /* @__PURE__ */ g("p", {
|
|
673
683
|
className: "flex h-10 items-center gap-2 px-5 text-xs text-muted-foreground",
|
|
674
684
|
role: "status",
|
|
675
|
-
children: Rn ?
|
|
676
|
-
loaded:
|
|
685
|
+
children: Rn ? d("loadingCount", {
|
|
686
|
+
loaded: V.length,
|
|
677
687
|
total: Rn.total
|
|
678
|
-
}) :
|
|
688
|
+
}) : d("loadingMore", { loaded: V.length })
|
|
679
689
|
}),
|
|
680
|
-
!
|
|
681
|
-
|
|
690
|
+
!R && (An ? /* @__PURE__ */ g(xe, { error: An }) : /* @__PURE__ */ g(jt, { rows: 8 })),
|
|
691
|
+
R && !z && V.length === 0 && /* @__PURE__ */ g(Gt, {
|
|
682
692
|
workspace: y,
|
|
683
|
-
filtered: !!S.q || T !== "active" ||
|
|
684
|
-
onCreate: () =>
|
|
693
|
+
filtered: !!S.q || T !== "active" || fr.count > +!!b,
|
|
694
|
+
onCreate: () => Zt(S.team ? { team: S.team } : void 0)
|
|
685
695
|
})
|
|
686
696
|
]
|
|
687
697
|
}),
|
|
688
698
|
N && F.data && /* @__PURE__ */ g("aside", {
|
|
689
|
-
"aria-label":
|
|
699
|
+
"aria-label": Lt("issueBreakdown.label"),
|
|
690
700
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-4 xl:block",
|
|
691
|
-
children: /* @__PURE__ */ g(
|
|
701
|
+
children: /* @__PURE__ */ g(oe, {
|
|
692
702
|
workspace: y,
|
|
693
703
|
issues: Mn,
|
|
694
|
-
tabs:
|
|
695
|
-
tab:
|
|
696
|
-
onTabChange:
|
|
697
|
-
focus:
|
|
698
|
-
onFocus:
|
|
704
|
+
tabs: je,
|
|
705
|
+
tab: xn,
|
|
706
|
+
onTabChange: Sn,
|
|
707
|
+
focus: Cn,
|
|
708
|
+
onFocus: wn
|
|
699
709
|
})
|
|
700
710
|
})
|
|
701
711
|
]
|
|
702
712
|
}),
|
|
703
|
-
|
|
713
|
+
vr.dialogs
|
|
704
714
|
]
|
|
705
715
|
});
|
|
706
716
|
}
|
|
707
|
-
var
|
|
708
|
-
return /* @__PURE__ */ g(
|
|
717
|
+
var Wt = d(function({ issue: e, index: t, place: n, team: r, workspace: i, selected: a, picked: o, viewers: ee, fields: te, actions: s }) {
|
|
718
|
+
return /* @__PURE__ */ g(c, {
|
|
709
719
|
ref: n.ref,
|
|
710
720
|
style: n.style,
|
|
711
721
|
index: n.index,
|
|
712
722
|
issue: e,
|
|
713
723
|
team: r,
|
|
714
724
|
workspace: i,
|
|
715
|
-
selected:
|
|
716
|
-
picked:
|
|
717
|
-
viewers:
|
|
718
|
-
fields:
|
|
719
|
-
onPick: (e) =>
|
|
720
|
-
onHover: () =>
|
|
721
|
-
onClick: (e) =>
|
|
722
|
-
onContextMenu: (t) =>
|
|
725
|
+
selected: a,
|
|
726
|
+
picked: o,
|
|
727
|
+
viewers: ee,
|
|
728
|
+
fields: te,
|
|
729
|
+
onPick: (e) => s.current.pick(t, e),
|
|
730
|
+
onHover: () => s.current.select(t),
|
|
731
|
+
onClick: (e) => s.current.click(e, t),
|
|
732
|
+
onContextMenu: (t) => s.current.menu(t, e)
|
|
723
733
|
});
|
|
724
734
|
});
|
|
725
|
-
function
|
|
726
|
-
let r = h("issues.empty"), { data: i = [] } = v(
|
|
735
|
+
function Gt({ workspace: e, filtered: t, onCreate: n }) {
|
|
736
|
+
let r = h("issues.empty"), { data: i = [] } = v(te(e)), a = rt(e, "manage_teams");
|
|
727
737
|
return i.some((e) => !e.archivedAt) ? /* @__PURE__ */ _("div", {
|
|
728
738
|
className: "mx-auto max-w-sm px-4 py-24 text-center",
|
|
729
739
|
children: [
|
|
@@ -735,7 +745,7 @@ function Wt({ workspace: e, filtered: t, onCreate: n }) {
|
|
|
735
745
|
className: "mt-1 text-sm text-muted-foreground",
|
|
736
746
|
children: r(t ? "tryAnother" : "pressC")
|
|
737
747
|
}),
|
|
738
|
-
!t && /* @__PURE__ */ g(
|
|
748
|
+
!t && /* @__PURE__ */ g(u, {
|
|
739
749
|
type: "button",
|
|
740
750
|
variant: "primary",
|
|
741
751
|
onClick: n,
|
|
@@ -752,9 +762,9 @@ function Wt({ workspace: e, filtered: t, onCreate: n }) {
|
|
|
752
762
|
}),
|
|
753
763
|
/* @__PURE__ */ g("p", {
|
|
754
764
|
className: "mt-1 text-sm text-muted-foreground",
|
|
755
|
-
children: r(
|
|
765
|
+
children: r(a ? "noTeamsDescription" : "noTeamsAskAdmin")
|
|
756
766
|
}),
|
|
757
|
-
|
|
767
|
+
a && /* @__PURE__ */ g(u, {
|
|
758
768
|
type: "button",
|
|
759
769
|
variant: "primary",
|
|
760
770
|
onClick: n,
|
|
@@ -764,4 +774,4 @@ function Wt({ workspace: e, filtered: t, onCreate: n }) {
|
|
|
764
774
|
]
|
|
765
775
|
});
|
|
766
776
|
}
|
|
767
|
-
export {
|
|
777
|
+
export { Ut as IssueList };
|