@parallelworks/tandem-web 0.171.1 → 0.171.2
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/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +23 -23
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +12 -12
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +4 -4
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +4 -4
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +109 -109
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
package/lib/issueList.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { TypeIcon as e } from "../components/IssueTypes.js";
|
|
2
|
+
import { PriorityIcon as t, StatusIcon as n } from "../components/icons.js";
|
|
3
|
+
import { fieldRef as r, groupableKinds as i, parseFieldFilters as a, sortableKinds as o } from "./customFields.js";
|
|
4
4
|
import { statusRef as s } from "./refs.js";
|
|
5
5
|
import { Avatar as c } from "@parallelworks/ui";
|
|
6
6
|
import { jsx as l } from "react/jsx-runtime";
|
|
@@ -24,10 +24,10 @@ var u = {
|
|
|
24
24
|
"label",
|
|
25
25
|
"type",
|
|
26
26
|
"none"
|
|
27
|
-
], p = (e, t) => d.includes(e) || t.some((t) =>
|
|
27
|
+
], p = (e, t) => d.includes(e) || t.some((t) => r(e) === t.id && o.includes(t.kind)), m = (e, t) => f.includes(e) || t.some((t) => r(e) === t.id && i.includes(t.kind)), h = (e) => typeof e == "number" ? String(e) : typeof e == "string" && e !== "" ? e : void 0;
|
|
28
28
|
function g(e) {
|
|
29
|
-
let t = {},
|
|
30
|
-
|
|
29
|
+
let t = {}, n = h(e.view);
|
|
30
|
+
n && n in u && (t.view = n);
|
|
31
31
|
for (let n of [
|
|
32
32
|
"team",
|
|
33
33
|
"assignee",
|
|
@@ -48,9 +48,9 @@ function g(e) {
|
|
|
48
48
|
}
|
|
49
49
|
t.assignee && e.assigneeKind === "agent" && (t.assigneeKind = "agent"), t.assignee || e.unassigned !== "true" && e.unassigned !== !0 || (t.unassigned = "true"), (e.overdue === "true" || e.overdue === !0) && (t.overdue = "true");
|
|
50
50
|
let i = h(e.order);
|
|
51
|
-
i && i !== "updated" && (d.includes(i) ||
|
|
51
|
+
i && i !== "updated" && (d.includes(i) || r(i)) && (t.order = i), e.layout === "board" && (t.layout = "board"), e.scope === "workspace" && (t.scope = "workspace");
|
|
52
52
|
let a = h(e.group);
|
|
53
|
-
return a && a !== "status" && (f.includes(a) ||
|
|
53
|
+
return a && a !== "status" && (f.includes(a) || r(a)) && (t.group = a), t;
|
|
54
54
|
}
|
|
55
55
|
var _ = [
|
|
56
56
|
"started",
|
|
@@ -60,8 +60,8 @@ var _ = [
|
|
|
60
60
|
"completed",
|
|
61
61
|
"canceled"
|
|
62
62
|
], v = (e) => e === 0 ? 5 : e;
|
|
63
|
-
function y(e, t,
|
|
64
|
-
let i =
|
|
63
|
+
function y(e, t, n = []) {
|
|
64
|
+
let i = n.find((e) => e.id === r(t));
|
|
65
65
|
if (i) return [...e].sort(b(i));
|
|
66
66
|
let a = {
|
|
67
67
|
updated: () => 0,
|
|
@@ -82,63 +82,63 @@ function b(e) {
|
|
|
82
82
|
return r === void 0 || i === void 0 ? Number(r === void 0) - Number(i === void 0) : typeof r == "number" && typeof i == "number" ? r - i : String(r).localeCompare(String(i));
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
|
-
function x(
|
|
86
|
-
let f = u.find((e) => e.id ===
|
|
87
|
-
if (f) return S(
|
|
88
|
-
if (
|
|
89
|
-
let
|
|
85
|
+
function x(i, a, o, s = !1, u = [], d = []) {
|
|
86
|
+
let f = u.find((e) => e.id === r(a));
|
|
87
|
+
if (f) return S(i, f, o, s);
|
|
88
|
+
if (a === "type") {
|
|
89
|
+
let t = {
|
|
90
90
|
key: "none",
|
|
91
|
-
label:
|
|
91
|
+
label: o.noType ?? o.none.all,
|
|
92
92
|
issues: []
|
|
93
|
-
},
|
|
94
|
-
key:
|
|
95
|
-
label:
|
|
96
|
-
icon: /* @__PURE__ */ l(
|
|
97
|
-
type:
|
|
93
|
+
}, n = d.map((t) => ({
|
|
94
|
+
key: t.id,
|
|
95
|
+
label: t.name,
|
|
96
|
+
icon: /* @__PURE__ */ l(e, {
|
|
97
|
+
type: t,
|
|
98
98
|
className: "size-3.5"
|
|
99
99
|
}),
|
|
100
100
|
issues: []
|
|
101
101
|
}));
|
|
102
|
-
for (let
|
|
103
|
-
if (!
|
|
104
|
-
|
|
102
|
+
for (let r of i) {
|
|
103
|
+
if (!r.type) {
|
|
104
|
+
t.issues.push(r);
|
|
105
105
|
continue;
|
|
106
106
|
}
|
|
107
|
-
let
|
|
108
|
-
|
|
109
|
-
key:
|
|
110
|
-
label:
|
|
111
|
-
icon: /* @__PURE__ */ l(
|
|
112
|
-
type:
|
|
107
|
+
let i = n.find((e) => e.key === r.type?.id);
|
|
108
|
+
i || (i = {
|
|
109
|
+
key: r.type.id,
|
|
110
|
+
label: r.type.name,
|
|
111
|
+
icon: /* @__PURE__ */ l(e, {
|
|
112
|
+
type: r.type,
|
|
113
113
|
className: "size-3.5"
|
|
114
114
|
}),
|
|
115
115
|
issues: []
|
|
116
|
-
},
|
|
116
|
+
}, n.push(i)), i.issues.push(r);
|
|
117
117
|
}
|
|
118
|
-
return
|
|
118
|
+
return n.push(t), n.filter((e) => s || e.issues.length > 0);
|
|
119
119
|
}
|
|
120
|
-
if (
|
|
120
|
+
if (a === "none") return i.length > 0 ? [{
|
|
121
121
|
key: "all",
|
|
122
|
-
label:
|
|
123
|
-
issues:
|
|
122
|
+
label: o.none.all,
|
|
123
|
+
issues: i
|
|
124
124
|
}] : [];
|
|
125
|
-
if (
|
|
125
|
+
if (a === "status") return _.map((e) => ({
|
|
126
126
|
key: e,
|
|
127
|
-
label:
|
|
128
|
-
icon: /* @__PURE__ */ l(
|
|
129
|
-
issues:
|
|
127
|
+
label: o.status(e),
|
|
128
|
+
icon: /* @__PURE__ */ l(n, { category: e }),
|
|
129
|
+
issues: i.filter((t) => t.status.category === e)
|
|
130
130
|
})).filter((e) => s || e.issues.length > 0);
|
|
131
|
-
if (
|
|
131
|
+
if (a === "priority") return [
|
|
132
132
|
1,
|
|
133
133
|
2,
|
|
134
134
|
3,
|
|
135
135
|
4,
|
|
136
136
|
0
|
|
137
|
-
].map((
|
|
138
|
-
key: String(
|
|
139
|
-
label:
|
|
140
|
-
icon: /* @__PURE__ */ l(
|
|
141
|
-
issues:
|
|
137
|
+
].map((e) => ({
|
|
138
|
+
key: String(e),
|
|
139
|
+
label: o.priority(e),
|
|
140
|
+
icon: /* @__PURE__ */ l(t, { priority: e }),
|
|
141
|
+
issues: i.filter((t) => t.priority === e)
|
|
142
142
|
})).filter((e) => s || e.issues.length > 0);
|
|
143
143
|
let p = /* @__PURE__ */ new Map(), m = {
|
|
144
144
|
key: "",
|
|
@@ -153,18 +153,18 @@ function x(r, i, a, s = !1, u = [], d = []) {
|
|
|
153
153
|
};
|
|
154
154
|
i.issues.push(e), p.set(t, i);
|
|
155
155
|
};
|
|
156
|
-
for (let e of
|
|
156
|
+
for (let e of i) if (a === "assignee") {
|
|
157
157
|
for (let t of s ? e.assignees : e.assignees.slice(0, 1)) {
|
|
158
|
-
let n =
|
|
158
|
+
let n = o.person(t.kind, t.handle);
|
|
159
159
|
h(e, `${t.kind}:${t.handle}`, n, /* @__PURE__ */ l(c, {
|
|
160
160
|
name: n,
|
|
161
|
-
src:
|
|
161
|
+
src: o.avatar(t.kind, t.handle),
|
|
162
162
|
size: "xs",
|
|
163
163
|
decorative: !0
|
|
164
164
|
}));
|
|
165
165
|
}
|
|
166
166
|
e.assignees.length === 0 && m.issues.push(e);
|
|
167
|
-
} else if (
|
|
167
|
+
} else if (a === "project") e.project ? h(e, e.project.id, e.project.name) : m.issues.push(e);
|
|
168
168
|
else {
|
|
169
169
|
for (let t of s ? e.labels : e.labels.slice(0, 1)) h(e, t.id, t.name, /* @__PURE__ */ l("span", {
|
|
170
170
|
className: "size-2 rounded-full",
|
|
@@ -176,7 +176,7 @@ function x(r, i, a, s = !1, u = [], d = []) {
|
|
|
176
176
|
return (s || m.issues.length > 0) && g.push({
|
|
177
177
|
...m,
|
|
178
178
|
key: "none",
|
|
179
|
-
label:
|
|
179
|
+
label: o.none[a]
|
|
180
180
|
}), g;
|
|
181
181
|
}
|
|
182
182
|
function S(e, t, n, r) {
|
|
@@ -248,7 +248,7 @@ function C(e, t) {
|
|
|
248
248
|
...e.customer && { customer: e.customer },
|
|
249
249
|
...e.cycle && { cycle: e.cycle },
|
|
250
250
|
...e.type && { type: e.type.split(",") },
|
|
251
|
-
...e.fields && { field:
|
|
251
|
+
...e.fields && { field: a(e.fields).map((e) => `${e.field}:${e.value}`) },
|
|
252
252
|
...e.overdue && { overdue: !0 },
|
|
253
253
|
...e.q && { q: e.q },
|
|
254
254
|
...u[n].categories.length > 0 && { category: u[n].categories },
|
package/lib/issueMenu.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
1
|
+
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
+
import { invalidateIssueViews as n } from "../api/mutations.js";
|
|
3
|
+
import { cyclesQuery as r, issueQuery as i, labelsQuery as a, projectsQuery as o, statusesQuery as s, teamsQuery as c } from "../api/queries.js";
|
|
4
|
+
import { CalendarIcon as ee, CycleIcon as l, EstimateIcon as u, FolderIcon as te, PriorityIcon as d, ProjectIcon as f, StatusIcon as p, TagIcon as m, UserIcon as h, usePriorityNames as g } from "../components/icons.js";
|
|
5
|
+
import { ProjectStatusIcon as _, scalePoints as v, useEstimateLabel as y } from "../components/Planning.js";
|
|
6
|
+
import { assigneeKey as ne, parseAssigneeKey as re, useAssigneeOptions as b } from "./assignees.js";
|
|
7
|
+
import { appURL as x } from "./base.js";
|
|
8
|
+
import { branchName as ie, issuePath as S } from "./branch.js";
|
|
9
|
+
import { eachLimited as C } from "./eachLimited.js";
|
|
10
|
+
import { useFavorites as w } from "./favorites.js";
|
|
11
|
+
import { copyItem as T } from "./menus.js";
|
|
12
|
+
import { useNavigate as E } from "./router.js";
|
|
13
|
+
import { addDays as D, today as O } from "./time.js";
|
|
14
14
|
import { menuDivider as k, toast as ae } from "@parallelworks/ui";
|
|
15
15
|
import { useCallback as A } from "react";
|
|
16
16
|
import { useErrorMessage as j } from "@parallelworks/problem/react";
|
|
@@ -18,171 +18,171 @@ import { useTranslations as M } from "use-intl";
|
|
|
18
18
|
import { jsx as N } from "react/jsx-runtime";
|
|
19
19
|
import { useQueries as P, useQuery as F, useQueryClient as I } from "@tanstack/react-query";
|
|
20
20
|
// src/lib/issueMenu.tsx
|
|
21
|
-
function L(
|
|
22
|
-
return
|
|
21
|
+
function L(e, t) {
|
|
22
|
+
return x(S(e, t));
|
|
23
23
|
}
|
|
24
|
-
function R(
|
|
25
|
-
let
|
|
26
|
-
...
|
|
27
|
-
enabled:
|
|
24
|
+
function R(x) {
|
|
25
|
+
let S = I(), R = E(), { data: z = [] } = F(c(x)), { data: B = [] } = F(a(x)), V = b(x), H = w(x), U = g(), W = M("issueMenu"), G = j(), K = M("common"), q = M("favorites"), J = P({ queries: z.map((e) => s(x, e.key)) }), Y = M("planning"), X = y(), { data: Z = [] } = F(o(x)), Q = P({ queries: z.map((e) => ({
|
|
26
|
+
...r(x, e.key),
|
|
27
|
+
enabled: e.cyclesEnabled
|
|
28
28
|
})) });
|
|
29
|
-
return A((
|
|
30
|
-
let
|
|
31
|
-
if (!
|
|
32
|
-
let
|
|
29
|
+
return A((r) => {
|
|
30
|
+
let a = r[0];
|
|
31
|
+
if (!a) return [];
|
|
32
|
+
let o = (e) => {
|
|
33
33
|
let t = z.findIndex((t) => t.id === e);
|
|
34
34
|
return J[t]?.data ?? [];
|
|
35
|
-
},
|
|
35
|
+
}, s = (e) => r.every(e), c = (e) => {
|
|
36
36
|
e.length > 0 && ae.error(W("bulkFailed", {
|
|
37
37
|
count: e.length,
|
|
38
38
|
reason: G(e[0])
|
|
39
39
|
}));
|
|
40
|
-
},
|
|
40
|
+
}, g = async (a) => {
|
|
41
41
|
let o = [];
|
|
42
42
|
try {
|
|
43
|
-
|
|
44
|
-
let
|
|
45
|
-
if (!
|
|
46
|
-
let
|
|
43
|
+
c(await C(r, async (n) => {
|
|
44
|
+
let r = a(n);
|
|
45
|
+
if (!r) return;
|
|
46
|
+
let s = t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
47
47
|
params: { path: {
|
|
48
|
-
workspace:
|
|
49
|
-
identifier:
|
|
48
|
+
workspace: x,
|
|
49
|
+
identifier: n.identifier
|
|
50
50
|
} },
|
|
51
|
-
body:
|
|
51
|
+
body: r
|
|
52
52
|
}));
|
|
53
|
-
|
|
53
|
+
S.setQueryData(i(x, n.identifier).queryKey, s), o.push(n.identifier);
|
|
54
54
|
}));
|
|
55
55
|
} finally {
|
|
56
|
-
|
|
56
|
+
n(S, x, o);
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, y = async (a) => {
|
|
59
59
|
let o = [];
|
|
60
60
|
try {
|
|
61
|
-
|
|
62
|
-
let
|
|
61
|
+
c(await C(r.filter((e) => e.identifier.split("-")[0] !== a), async (n) => {
|
|
62
|
+
let r = t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/move", {
|
|
63
63
|
params: { path: {
|
|
64
|
-
workspace:
|
|
65
|
-
identifier:
|
|
64
|
+
workspace: x,
|
|
65
|
+
identifier: n.identifier
|
|
66
66
|
} },
|
|
67
|
-
body: { team:
|
|
67
|
+
body: { team: a }
|
|
68
68
|
}));
|
|
69
|
-
|
|
69
|
+
S.setQueryData(i(x, r.identifier).queryKey, r), o.push(n.identifier), window.location.pathname.toLowerCase().includes(n.identifier.toLowerCase()) && R({
|
|
70
70
|
to: "/$workspace/issues/$identifier",
|
|
71
71
|
params: {
|
|
72
|
-
workspace:
|
|
73
|
-
identifier:
|
|
72
|
+
workspace: x,
|
|
73
|
+
identifier: r.identifier
|
|
74
74
|
},
|
|
75
75
|
replace: !0
|
|
76
76
|
});
|
|
77
77
|
}));
|
|
78
78
|
} finally {
|
|
79
|
-
|
|
79
|
+
n(S, x, o);
|
|
80
80
|
}
|
|
81
|
-
}, b = async (
|
|
81
|
+
}, b = async (a) => {
|
|
82
82
|
let o = [];
|
|
83
83
|
try {
|
|
84
|
-
|
|
85
|
-
let
|
|
86
|
-
workspace:
|
|
87
|
-
identifier:
|
|
88
|
-
} } },
|
|
89
|
-
|
|
84
|
+
c(await C(r.filter((e) => !!e.archivedAt !== a), async (n) => {
|
|
85
|
+
let r = { params: { path: {
|
|
86
|
+
workspace: x,
|
|
87
|
+
identifier: n.identifier
|
|
88
|
+
} } }, s = t(a ? await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/archive", r) : await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", r));
|
|
89
|
+
S.setQueryData(i(x, n.identifier).queryKey, s), o.push(n.identifier);
|
|
90
90
|
}));
|
|
91
91
|
} finally {
|
|
92
|
-
|
|
92
|
+
n(S, x, o);
|
|
93
93
|
}
|
|
94
|
-
},
|
|
95
|
-
let n =
|
|
94
|
+
}, w = (e, t) => {
|
|
95
|
+
let n = o(t.teamId);
|
|
96
96
|
return (n.find((t) => t.name === e.name) ?? n.find((t) => t.category === e.category))?.id;
|
|
97
|
-
},
|
|
97
|
+
}, E = r.length === 1, A = s((e) => e.teamId === a.teamId) ? z.findIndex((e) => e.id === a.teamId) : -1, j = z[A], M = (j?.cyclesEnabled ? Q[A]?.data ?? [] : []).filter((e) => e.state !== "past"), P = j?.estimateScale ?? "none", F = s((e) => e.project?.id === a.project?.id) ? a.project?.id : void 0, I = Z.find((e) => e.id === F)?.milestones ?? [], oe = (e) => e.name ? Y("cycleNamed", {
|
|
98
98
|
number: e.number,
|
|
99
99
|
name: e.name
|
|
100
|
-
}) : Y("cycle", { number: e.number }), $ =
|
|
100
|
+
}) : Y("cycle", { number: e.number }), $ = O(), se = [
|
|
101
101
|
{
|
|
102
102
|
label: Y("dueToday"),
|
|
103
103
|
date: $
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
label: Y("dueTomorrow"),
|
|
107
|
-
date:
|
|
107
|
+
date: D($, 1)
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
label: Y("dueInAWeek"),
|
|
111
|
-
date:
|
|
111
|
+
date: D($, 7)
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
label: Y("dueInTwoWeeks"),
|
|
115
|
-
date:
|
|
115
|
+
date: D($, 14)
|
|
116
116
|
}
|
|
117
117
|
], ce = [
|
|
118
118
|
{
|
|
119
119
|
label: Y("project"),
|
|
120
|
-
icon: /* @__PURE__ */ N(
|
|
120
|
+
icon: /* @__PURE__ */ N(f, { className: "size-4" }),
|
|
121
121
|
shortcut: "M",
|
|
122
122
|
disabled: Z.length === 0,
|
|
123
123
|
items: [{
|
|
124
124
|
label: Y("noProject"),
|
|
125
|
-
checked:
|
|
126
|
-
onClick: () =>
|
|
125
|
+
checked: s((e) => !e.project),
|
|
126
|
+
onClick: () => g((e) => e.project ? { projectId: "" } : null)
|
|
127
127
|
}, ...Z.map((e) => ({
|
|
128
128
|
label: e.name,
|
|
129
|
-
icon: /* @__PURE__ */ N(
|
|
130
|
-
checked:
|
|
131
|
-
onClick: () =>
|
|
129
|
+
icon: /* @__PURE__ */ N(_, { status: e.status }),
|
|
130
|
+
checked: s((t) => t.project?.id === e.id),
|
|
131
|
+
onClick: () => g((t) => t.project?.id === e.id ? null : { projectId: e.id })
|
|
132
132
|
}))]
|
|
133
133
|
},
|
|
134
134
|
...I.length > 0 ? [{
|
|
135
135
|
label: Y("milestone"),
|
|
136
136
|
items: [{
|
|
137
137
|
label: Y("noMilestone"),
|
|
138
|
-
checked:
|
|
139
|
-
onClick: () =>
|
|
138
|
+
checked: s((e) => !e.milestone),
|
|
139
|
+
onClick: () => g((e) => e.milestone ? { milestoneId: "" } : null)
|
|
140
140
|
}, ...I.map((e) => ({
|
|
141
141
|
label: e.name,
|
|
142
|
-
checked:
|
|
143
|
-
onClick: () =>
|
|
142
|
+
checked: s((t) => t.milestone?.id === e.id),
|
|
143
|
+
onClick: () => g((t) => t.milestone?.id === e.id ? null : { milestoneId: e.id })
|
|
144
144
|
}))]
|
|
145
145
|
}] : [],
|
|
146
146
|
...j?.cyclesEnabled ? [{
|
|
147
147
|
label: Y("cycleLabel"),
|
|
148
|
-
icon: /* @__PURE__ */ N(
|
|
148
|
+
icon: /* @__PURE__ */ N(l, { className: "size-4" }),
|
|
149
149
|
items: [{
|
|
150
150
|
label: Y("noCycle"),
|
|
151
|
-
checked:
|
|
152
|
-
onClick: () =>
|
|
151
|
+
checked: s((e) => !e.cycle),
|
|
152
|
+
onClick: () => g((e) => e.cycle ? { cycleId: "" } : null)
|
|
153
153
|
}, ...M.map((e) => ({
|
|
154
154
|
label: Y("cycleWithState", {
|
|
155
155
|
cycle: oe(e),
|
|
156
156
|
state: Y(`states.${e.state}`)
|
|
157
157
|
}),
|
|
158
|
-
checked:
|
|
159
|
-
onClick: () =>
|
|
158
|
+
checked: s((t) => t.cycle?.id === e.id),
|
|
159
|
+
onClick: () => g((t) => t.cycle?.id === e.id ? null : { cycleId: e.id })
|
|
160
160
|
}))]
|
|
161
161
|
}] : [],
|
|
162
162
|
...P === "none" ? [] : [{
|
|
163
163
|
label: Y("estimate"),
|
|
164
|
-
icon: /* @__PURE__ */ N(
|
|
165
|
-
items: [0, ...
|
|
164
|
+
icon: /* @__PURE__ */ N(u, { className: "size-4" }),
|
|
165
|
+
items: [0, ...v(P)].map((e) => ({
|
|
166
166
|
label: e ? X(e, P) : Y("noEstimate"),
|
|
167
|
-
checked:
|
|
168
|
-
onClick: () =>
|
|
167
|
+
checked: s((t) => (t.estimate ?? 0) === e),
|
|
168
|
+
onClick: () => g((t) => (t.estimate ?? 0) === e ? null : { estimate: e })
|
|
169
169
|
}))
|
|
170
170
|
}],
|
|
171
171
|
{
|
|
172
172
|
label: Y("dueDate"),
|
|
173
173
|
shortcut: "D",
|
|
174
|
-
icon: /* @__PURE__ */ N(
|
|
174
|
+
icon: /* @__PURE__ */ N(ee, { className: "size-4" }),
|
|
175
175
|
items: [
|
|
176
176
|
...se.map((e) => ({
|
|
177
177
|
label: e.label,
|
|
178
|
-
checked:
|
|
179
|
-
onClick: () =>
|
|
178
|
+
checked: s((t) => t.dueDate === e.date),
|
|
179
|
+
onClick: () => g((t) => t.dueDate === e.date ? null : { dueDate: e.date })
|
|
180
180
|
})),
|
|
181
181
|
k,
|
|
182
182
|
{
|
|
183
183
|
label: Y("noDueDate"),
|
|
184
|
-
checked:
|
|
185
|
-
onClick: () =>
|
|
184
|
+
checked: s((e) => !e.dueDate),
|
|
185
|
+
onClick: () => g((e) => e.dueDate ? { dueDate: "" } : null)
|
|
186
186
|
}
|
|
187
187
|
]
|
|
188
188
|
}
|
|
@@ -190,27 +190,27 @@ function R(e) {
|
|
|
190
190
|
return [
|
|
191
191
|
{
|
|
192
192
|
label: K("status"),
|
|
193
|
-
icon: /* @__PURE__ */ N(
|
|
194
|
-
category:
|
|
195
|
-
step:
|
|
193
|
+
icon: /* @__PURE__ */ N(p, {
|
|
194
|
+
category: a.status.category,
|
|
195
|
+
step: a.status.step
|
|
196
196
|
}),
|
|
197
197
|
shortcut: "S",
|
|
198
|
-
items:
|
|
198
|
+
items: o(a.teamId).map((e) => ({
|
|
199
199
|
label: e.name,
|
|
200
|
-
icon: /* @__PURE__ */ N(
|
|
200
|
+
icon: /* @__PURE__ */ N(p, {
|
|
201
201
|
category: e.category,
|
|
202
202
|
step: e.step
|
|
203
203
|
}),
|
|
204
|
-
checked:
|
|
205
|
-
onClick: () =>
|
|
206
|
-
let n =
|
|
204
|
+
checked: s((t) => t.status.name === e.name),
|
|
205
|
+
onClick: () => g((t) => {
|
|
206
|
+
let n = w(e, t);
|
|
207
207
|
return n && n !== t.status.id ? { statusId: n } : null;
|
|
208
208
|
})
|
|
209
209
|
}))
|
|
210
210
|
},
|
|
211
211
|
{
|
|
212
212
|
label: K("priority"),
|
|
213
|
-
icon: /* @__PURE__ */ N(
|
|
213
|
+
icon: /* @__PURE__ */ N(d, { priority: a.priority }),
|
|
214
214
|
shortcut: "P",
|
|
215
215
|
items: [
|
|
216
216
|
1,
|
|
@@ -220,32 +220,32 @@ function R(e) {
|
|
|
220
220
|
0
|
|
221
221
|
].map((e) => ({
|
|
222
222
|
label: U[e] ?? "",
|
|
223
|
-
icon: /* @__PURE__ */ N(
|
|
224
|
-
checked:
|
|
225
|
-
onClick: () =>
|
|
223
|
+
icon: /* @__PURE__ */ N(d, { priority: e }),
|
|
224
|
+
checked: s((t) => t.priority === e),
|
|
225
|
+
onClick: () => g((t) => t.priority === e ? null : { priority: e })
|
|
226
226
|
}))
|
|
227
227
|
},
|
|
228
228
|
{
|
|
229
229
|
label: K("assignee"),
|
|
230
|
-
icon: /* @__PURE__ */ N(
|
|
230
|
+
icon: /* @__PURE__ */ N(h, {}),
|
|
231
231
|
shortcut: "A",
|
|
232
232
|
items: V.map((e) => {
|
|
233
|
-
let t =
|
|
233
|
+
let t = re(e.value), n = (t) => t.assignees.some((t) => ne(t) === e.value), r = s(n);
|
|
234
234
|
return {
|
|
235
235
|
label: e.label,
|
|
236
236
|
icon: e.icon,
|
|
237
237
|
checked: r,
|
|
238
|
-
onClick: () =>
|
|
238
|
+
onClick: () => g((e) => r ? { removeAssignees: [t] } : n(e) ? null : { addAssignees: [t] })
|
|
239
239
|
};
|
|
240
240
|
})
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
label: K("labels"),
|
|
244
|
-
icon: /* @__PURE__ */ N(
|
|
244
|
+
icon: /* @__PURE__ */ N(m, {}),
|
|
245
245
|
shortcut: "L",
|
|
246
246
|
disabled: B.length === 0,
|
|
247
247
|
items: B.map((e) => {
|
|
248
|
-
let t = (t) => t.labels.some((t) => t.id === e.id), n =
|
|
248
|
+
let t = (t) => t.labels.some((t) => t.id === e.id), n = s(t);
|
|
249
249
|
return {
|
|
250
250
|
label: e.name,
|
|
251
251
|
icon: /* @__PURE__ */ N("span", {
|
|
@@ -253,49 +253,49 @@ function R(e) {
|
|
|
253
253
|
style: { background: e.color }
|
|
254
254
|
}),
|
|
255
255
|
checked: n,
|
|
256
|
-
onClick: () =>
|
|
256
|
+
onClick: () => g((r) => n ? { removeLabels: [e.id] } : t(r) ? null : { addLabels: [e.id] })
|
|
257
257
|
};
|
|
258
258
|
})
|
|
259
259
|
},
|
|
260
260
|
...ce,
|
|
261
261
|
{
|
|
262
262
|
label: W("moveToTeam"),
|
|
263
|
-
icon: /* @__PURE__ */ N(
|
|
263
|
+
icon: /* @__PURE__ */ N(te, {}),
|
|
264
264
|
disabled: z.length < 2,
|
|
265
265
|
items: z.filter((e) => !e.archivedAt).map((e) => ({
|
|
266
266
|
label: e.name,
|
|
267
|
-
checked:
|
|
268
|
-
onClick: () =>
|
|
267
|
+
checked: s((t) => t.teamId === e.id),
|
|
268
|
+
onClick: () => y(e.key)
|
|
269
269
|
}))
|
|
270
270
|
},
|
|
271
271
|
k,
|
|
272
|
-
...
|
|
272
|
+
...E ? [
|
|
273
273
|
{
|
|
274
274
|
label: K("open"),
|
|
275
275
|
onClick: () => R({
|
|
276
276
|
to: "/$workspace/issues/$identifier",
|
|
277
277
|
params: {
|
|
278
|
-
workspace:
|
|
279
|
-
identifier:
|
|
278
|
+
workspace: x,
|
|
279
|
+
identifier: a.identifier
|
|
280
280
|
}
|
|
281
281
|
})
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
label: K("openInNewTab"),
|
|
285
|
-
href: L(
|
|
285
|
+
href: L(x, a.identifier),
|
|
286
286
|
target: "_blank"
|
|
287
287
|
},
|
|
288
288
|
k
|
|
289
289
|
] : [],
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
...
|
|
293
|
-
...
|
|
294
|
-
label: H.find("issue",
|
|
295
|
-
onClick: () => H.toggle("issue",
|
|
290
|
+
T(W("copyLinks", { count: r.length }), r.map((e) => L(x, e.identifier)).join("\n")),
|
|
291
|
+
T(W("copyIds", { count: r.length }), r.map((e) => e.identifier).join(", ")),
|
|
292
|
+
...E ? [T(W("copyTitle"), a.title), T(W("copyBranch"), ie(a.identifier, a.title))] : [],
|
|
293
|
+
...E ? [k, {
|
|
294
|
+
label: H.find("issue", a.id) ? q("remove") : q("add"),
|
|
295
|
+
onClick: () => H.toggle("issue", a.id)
|
|
296
296
|
}] : [],
|
|
297
297
|
k,
|
|
298
|
-
|
|
298
|
+
s((e) => !!e.archivedAt) ? {
|
|
299
299
|
label: W("restore"),
|
|
300
300
|
onClick: () => b(!1)
|
|
301
301
|
} : {
|
|
@@ -314,8 +314,8 @@ function R(e) {
|
|
|
314
314
|
Z,
|
|
315
315
|
Y,
|
|
316
316
|
X,
|
|
317
|
-
|
|
318
|
-
|
|
317
|
+
x,
|
|
318
|
+
S,
|
|
319
319
|
R,
|
|
320
320
|
U,
|
|
321
321
|
W,
|