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