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