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