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