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