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