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