@parallelworks/tandem-web 0.141.2 → 0.143.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 +162 -5
- package/_virtual/_virtual_i18n/es/common.js +162 -5
- package/_virtual/_virtual_i18n/ja/common.js +162 -5
- package/_virtual/_virtual_i18n/ko/common.js +162 -5
- package/_virtual/_virtual_i18n/zh/common.js +162 -5
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +2 -0
- package/components/CodeHostSettings.js +25 -25
- package/components/CustomFields.js +349 -0
- package/components/DocProperties.js +320 -0
- package/components/DocTable.js +176 -0
- package/components/DocViewBlock.js +104 -0
- package/components/DocsTree.js +16 -6
- package/components/Editor.js +30 -28
- package/components/GitHub.js +22 -22
- package/components/IssueBoard.js +48 -43
- package/components/IssueEvent.js +2 -0
- package/components/IssueFilters.js +210 -122
- package/components/IssueImport.js +1 -1
- package/components/IssueRow.js +96 -79
- package/components/IssueTemplates.js +216 -156
- package/components/IssueTypes.js +318 -0
- package/components/NewIssueDialog.js +254 -216
- package/components/SettingsNav.js +40 -35
- package/components/SlashMenu.js +2 -0
- package/components/TeamForm.js +49 -35
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +8 -8
- package/components/Updates.js +8 -8
- package/lib/boardMove.js +69 -47
- package/lib/customFields.js +113 -0
- package/lib/docProperties.js +135 -0
- package/lib/issueDisplay.js +27 -12
- package/lib/issueList.js +166 -62
- package/lib/issueTypes.js +50 -0
- package/lib/teamTree.js +24 -0
- package/lib/views.js +13 -11
- package/package.json +1 -1
- package/pages/issues.js +331 -291
- package/routeTree.gen.js +174 -162
- package/routes/_workspace/agents/index2.js +9 -9
- package/routes/_workspace/docs/_doc2.js +147 -140
- package/routes/_workspace/docs/space._space.js +6 -0
- package/routes/_workspace/docs/space2._space.js +256 -0
- package/routes/_workspace/docs2.js +3 -3
- package/routes/_workspace/issues/_identifier2.js +433 -370
- package/routes/_workspace/projects/_projectId3.js +213 -201
- package/routes/_workspace/settings/audit-log3.js +2 -0
- package/routes/_workspace/settings/fields.js +6 -0
- package/routes/_workspace/settings/fields2.js +30 -0
- package/routes/_workspace/settings/fields3.js +5 -0
- package/routes/_workspace/settings/groups2.js +74 -74
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +35 -35
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +18 -18
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/slack2.js +8 -8
- package/routes/_workspace/settings/sso2.js +50 -50
- package/routes/_workspace/settings/tokens2.js +15 -15
- package/routes/_workspace/settings/webhooks2.js +42 -42
- package/routes/_workspace/teams/_key/settings2.js +138 -76
- package/routes/_workspace2.js +321 -319
- package/styles.css +39 -0
package/lib/issueList.js
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { fieldRef as e, groupableKinds as t, parseFieldFilters as n, sortableKinds as r } from "./customFields.js";
|
|
2
|
+
import { PriorityIcon as i, StatusIcon as a } from "../components/icons.js";
|
|
3
|
+
import { TypeIcon as o } from "../components/IssueTypes.js";
|
|
4
|
+
import { statusRef as s } from "./refs.js";
|
|
5
|
+
import { Avatar as c } from "@parallelworks/ui";
|
|
6
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
7
|
// src/lib/issueList.tsx
|
|
6
|
-
var
|
|
8
|
+
var u = {
|
|
7
9
|
active: { categories: ["started", "unstarted"] },
|
|
8
10
|
backlog: { categories: ["backlog"] },
|
|
9
11
|
done: { categories: ["completed", "canceled"] },
|
|
10
12
|
all: { categories: [] }
|
|
11
|
-
},
|
|
13
|
+
}, d = [
|
|
12
14
|
"updated",
|
|
13
15
|
"priority",
|
|
14
16
|
"created",
|
|
15
17
|
"due",
|
|
16
18
|
"requests"
|
|
17
|
-
],
|
|
19
|
+
], f = [
|
|
18
20
|
"status",
|
|
19
21
|
"assignee",
|
|
20
22
|
"priority",
|
|
21
23
|
"project",
|
|
22
24
|
"label",
|
|
25
|
+
"type",
|
|
23
26
|
"none"
|
|
24
|
-
],
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
for (let
|
|
27
|
+
], p = (t, n) => d.includes(t) || n.some((n) => e(t) === n.id && r.includes(n.kind)), m = (n, r) => f.includes(n) || r.some((r) => e(n) === r.id && t.includes(r.kind)), h = (e) => typeof e == "number" ? String(e) : typeof e == "string" && e !== "" ? e : void 0;
|
|
28
|
+
function g(t) {
|
|
29
|
+
let n = {}, r = h(t.view);
|
|
30
|
+
r && r in u && (n.view = r);
|
|
31
|
+
for (let e of [
|
|
29
32
|
"team",
|
|
30
33
|
"assignee",
|
|
31
34
|
"creator",
|
|
@@ -35,103 +38,202 @@ function l(e) {
|
|
|
35
38
|
"project",
|
|
36
39
|
"customer",
|
|
37
40
|
"cycle",
|
|
41
|
+
"type",
|
|
42
|
+
"fields",
|
|
38
43
|
"q",
|
|
39
44
|
"saved"
|
|
40
45
|
]) {
|
|
41
|
-
let r =
|
|
42
|
-
r && (
|
|
46
|
+
let r = h(t[e]);
|
|
47
|
+
r && (n[e] = r);
|
|
43
48
|
}
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
return
|
|
49
|
+
n.assignee && t.assigneeKind === "agent" && (n.assigneeKind = "agent"), (t.overdue === "true" || t.overdue === !0) && (n.overdue = "true");
|
|
50
|
+
let i = h(t.order);
|
|
51
|
+
i && i !== "updated" && (d.includes(i) || e(i)) && (n.order = i), t.layout === "board" && (n.layout = "board");
|
|
52
|
+
let a = h(t.group);
|
|
53
|
+
return a && a !== "status" && (f.includes(a) || e(a)) && (n.group = a), n;
|
|
49
54
|
}
|
|
50
|
-
var
|
|
55
|
+
var _ = [
|
|
51
56
|
"started",
|
|
52
57
|
"unstarted",
|
|
53
58
|
"backlog",
|
|
54
59
|
"triage",
|
|
55
60
|
"completed",
|
|
56
61
|
"canceled"
|
|
57
|
-
],
|
|
58
|
-
function
|
|
59
|
-
let
|
|
62
|
+
], v = (e) => e === 0 ? 5 : e;
|
|
63
|
+
function y(t, n, r = []) {
|
|
64
|
+
let i = r.find((t) => t.id === e(n));
|
|
65
|
+
if (i) return [...t].sort(b(i));
|
|
66
|
+
let a = {
|
|
60
67
|
updated: () => 0,
|
|
61
|
-
priority: (e, t) =>
|
|
68
|
+
priority: (e, t) => v(e.priority) - v(t.priority),
|
|
62
69
|
created: (e, t) => t.createdAt.localeCompare(e.createdAt),
|
|
63
70
|
due: (e, t) => (e.dueDate ?? "9999").localeCompare(t.dueDate ?? "9999"),
|
|
64
71
|
requests: (e, t) => (t.requests ?? 0) - (e.requests ?? 0)
|
|
65
|
-
}[
|
|
66
|
-
return [...
|
|
72
|
+
}[n];
|
|
73
|
+
return [...t].sort(a ?? (() => 0));
|
|
67
74
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
75
|
+
function b(e) {
|
|
76
|
+
let t = (t) => {
|
|
77
|
+
let n = t.fields[e.id];
|
|
78
|
+
if (n != null) return e.kind === "select" ? e.options.findIndex((e) => e.id === n) : typeof n == "number" ? n : String(n);
|
|
79
|
+
};
|
|
80
|
+
return (e, n) => {
|
|
81
|
+
let r = t(e), i = t(n);
|
|
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
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function x(t, n, r, s = !1, u = [], d = []) {
|
|
86
|
+
let f = u.find((t) => t.id === e(n));
|
|
87
|
+
if (f) return S(t, f, r, s);
|
|
88
|
+
if (n === "type") {
|
|
89
|
+
let e = {
|
|
90
|
+
key: "none",
|
|
91
|
+
label: r.noType ?? r.none.all,
|
|
92
|
+
issues: []
|
|
93
|
+
}, n = d.map((e) => ({
|
|
94
|
+
key: e.id,
|
|
95
|
+
label: e.name,
|
|
96
|
+
icon: /* @__PURE__ */ l(o, {
|
|
97
|
+
type: e,
|
|
98
|
+
className: "size-3.5"
|
|
99
|
+
}),
|
|
100
|
+
issues: []
|
|
101
|
+
}));
|
|
102
|
+
for (let r of t) {
|
|
103
|
+
if (!r.type) {
|
|
104
|
+
e.issues.push(r);
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
let t = n.find((e) => e.key === r.type?.id);
|
|
108
|
+
t || (t = {
|
|
109
|
+
key: r.type.id,
|
|
110
|
+
label: r.type.name,
|
|
111
|
+
icon: /* @__PURE__ */ l(o, {
|
|
112
|
+
type: r.type,
|
|
113
|
+
className: "size-3.5"
|
|
114
|
+
}),
|
|
115
|
+
issues: []
|
|
116
|
+
}, n.push(t)), t.issues.push(r);
|
|
117
|
+
}
|
|
118
|
+
return n.push(e), n.filter((e) => s || e.issues.length > 0);
|
|
119
|
+
}
|
|
120
|
+
if (n === "none") return t.length > 0 ? [{
|
|
70
121
|
key: "all",
|
|
71
|
-
label:
|
|
72
|
-
issues:
|
|
122
|
+
label: r.none.all,
|
|
123
|
+
issues: t
|
|
73
124
|
}] : [];
|
|
74
|
-
if (
|
|
125
|
+
if (n === "status") return _.map((e) => ({
|
|
75
126
|
key: e,
|
|
76
|
-
label:
|
|
77
|
-
icon: /* @__PURE__ */
|
|
78
|
-
issues:
|
|
127
|
+
label: r.status(e),
|
|
128
|
+
icon: /* @__PURE__ */ l(a, { category: e }),
|
|
129
|
+
issues: t.filter((t) => t.status.category === e)
|
|
79
130
|
})).filter((e) => s || e.issues.length > 0);
|
|
80
|
-
if (
|
|
131
|
+
if (n === "priority") return [
|
|
81
132
|
1,
|
|
82
133
|
2,
|
|
83
134
|
3,
|
|
84
135
|
4,
|
|
85
136
|
0
|
|
86
|
-
].map((
|
|
87
|
-
key: String(
|
|
88
|
-
label:
|
|
89
|
-
icon: /* @__PURE__ */ i
|
|
90
|
-
issues:
|
|
137
|
+
].map((e) => ({
|
|
138
|
+
key: String(e),
|
|
139
|
+
label: r.priority(e),
|
|
140
|
+
icon: /* @__PURE__ */ l(i, { priority: e }),
|
|
141
|
+
issues: t.filter((t) => t.priority === e)
|
|
91
142
|
})).filter((e) => s || e.issues.length > 0);
|
|
92
|
-
let
|
|
143
|
+
let p = /* @__PURE__ */ new Map(), m = {
|
|
93
144
|
key: "",
|
|
94
145
|
label: "",
|
|
95
146
|
issues: []
|
|
96
|
-
},
|
|
97
|
-
let i =
|
|
147
|
+
}, h = (e, t, n, r) => {
|
|
148
|
+
let i = p.get(t) ?? {
|
|
98
149
|
key: t,
|
|
99
150
|
label: n,
|
|
100
151
|
icon: r,
|
|
101
152
|
issues: []
|
|
102
153
|
};
|
|
103
|
-
i.issues.push(e),
|
|
154
|
+
i.issues.push(e), p.set(t, i);
|
|
104
155
|
};
|
|
105
|
-
for (let e of
|
|
156
|
+
for (let e of t) if (n === "assignee") {
|
|
106
157
|
for (let t of s ? e.assignees : e.assignees.slice(0, 1)) {
|
|
107
|
-
let n =
|
|
108
|
-
|
|
158
|
+
let n = r.person(t.kind, t.handle);
|
|
159
|
+
h(e, `${t.kind}:${t.handle}`, n, /* @__PURE__ */ l(c, {
|
|
109
160
|
name: n,
|
|
110
|
-
src:
|
|
161
|
+
src: r.avatar(t.kind, t.handle),
|
|
111
162
|
size: "xs",
|
|
112
163
|
decorative: !0
|
|
113
164
|
}));
|
|
114
165
|
}
|
|
115
|
-
e.assignees.length === 0 &&
|
|
116
|
-
} else if (
|
|
166
|
+
e.assignees.length === 0 && m.issues.push(e);
|
|
167
|
+
} else if (n === "project") e.project ? h(e, e.project.id, e.project.name) : m.issues.push(e);
|
|
117
168
|
else {
|
|
118
|
-
for (let t of s ? e.labels : e.labels.slice(0, 1))
|
|
169
|
+
for (let t of s ? e.labels : e.labels.slice(0, 1)) h(e, t.id, t.name, /* @__PURE__ */ l("span", {
|
|
119
170
|
className: "size-2 rounded-full",
|
|
120
171
|
style: { background: t.color }
|
|
121
172
|
}));
|
|
122
|
-
e.labels.length === 0 &&
|
|
173
|
+
e.labels.length === 0 && m.issues.push(e);
|
|
123
174
|
}
|
|
124
|
-
let
|
|
125
|
-
return (s ||
|
|
126
|
-
...
|
|
175
|
+
let g = [...p.values()].sort((e, t) => e.label.localeCompare(t.label));
|
|
176
|
+
return (s || m.issues.length > 0) && g.push({
|
|
177
|
+
...m,
|
|
127
178
|
key: "none",
|
|
128
|
-
label:
|
|
129
|
-
}),
|
|
179
|
+
label: r.none[n]
|
|
180
|
+
}), g;
|
|
181
|
+
}
|
|
182
|
+
function S(e, t, n, r) {
|
|
183
|
+
let i = {
|
|
184
|
+
key: "none",
|
|
185
|
+
label: n.noField?.(t.name) ?? n.none.all,
|
|
186
|
+
issues: []
|
|
187
|
+
}, a = (e) => {
|
|
188
|
+
let n = e.fields[t.id];
|
|
189
|
+
return Array.isArray(n) ? r ? n.map(String) : n.slice(0, 1).map(String) : n === !0 ? ["true"] : typeof n == "string" && n ? [n] : [];
|
|
190
|
+
}, o = /* @__PURE__ */ new Map(), s = (e) => e ? /* @__PURE__ */ l("span", {
|
|
191
|
+
className: "size-2 rounded-full",
|
|
192
|
+
style: { background: e }
|
|
193
|
+
}) : void 0;
|
|
194
|
+
if (t.kind === "select" || t.kind === "multi_select") for (let e of t.options) {
|
|
195
|
+
let t = s(e.color);
|
|
196
|
+
o.set(e.id ?? "", {
|
|
197
|
+
key: e.id ?? "",
|
|
198
|
+
label: e.name,
|
|
199
|
+
issues: [],
|
|
200
|
+
...t && { icon: t }
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
t.kind === "checkbox" && o.set("true", {
|
|
204
|
+
key: "true",
|
|
205
|
+
label: n.yes ?? t.name,
|
|
206
|
+
issues: []
|
|
207
|
+
});
|
|
208
|
+
for (let r of e) {
|
|
209
|
+
let e = a(r);
|
|
210
|
+
e.length === 0 && i.issues.push(r);
|
|
211
|
+
for (let i of e) {
|
|
212
|
+
let e = o.get(i);
|
|
213
|
+
if (!e) {
|
|
214
|
+
let r = t.kind === "person" ? n.person("user", i) : i;
|
|
215
|
+
e = {
|
|
216
|
+
key: i,
|
|
217
|
+
label: r,
|
|
218
|
+
issues: [],
|
|
219
|
+
...t.kind === "person" && { icon: /* @__PURE__ */ l(c, {
|
|
220
|
+
name: r,
|
|
221
|
+
src: n.avatar("user", i),
|
|
222
|
+
size: "xs",
|
|
223
|
+
decorative: !0
|
|
224
|
+
}) }
|
|
225
|
+
}, o.set(i, e);
|
|
226
|
+
}
|
|
227
|
+
e.issues.push(r);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
let u = [...o.values()];
|
|
231
|
+
return t.kind === "person" && u.sort((e, t) => e.label.localeCompare(t.label)), u.push(i), u.filter((e) => r || e.issues.length > 0);
|
|
130
232
|
}
|
|
131
|
-
function
|
|
233
|
+
function C(e, t) {
|
|
132
234
|
let r = e.view ?? "active", i = (e.status ?? "").split(",").flatMap((e) => {
|
|
133
|
-
let
|
|
134
|
-
return
|
|
235
|
+
let n = t?.filter((t) => s(t) === e).map((e) => e.id) ?? [];
|
|
236
|
+
return n.length > 0 ? n : [e];
|
|
135
237
|
});
|
|
136
238
|
return {
|
|
137
239
|
...e.team && { team: e.team },
|
|
@@ -144,10 +246,12 @@ function m(e, t) {
|
|
|
144
246
|
...e.project && { project: e.project },
|
|
145
247
|
...e.customer && { customer: e.customer },
|
|
146
248
|
...e.cycle && { cycle: e.cycle },
|
|
249
|
+
...e.type && { type: e.type.split(",") },
|
|
250
|
+
...e.fields && { field: n(e.fields).map((e) => `${e.field}:${e.value}`) },
|
|
147
251
|
...e.overdue && { overdue: !0 },
|
|
148
252
|
...e.q && { q: e.q },
|
|
149
|
-
...
|
|
253
|
+
...u[r].categories.length > 0 && { category: u[r].categories },
|
|
150
254
|
...r === "all" && { triage: "include" }
|
|
151
255
|
};
|
|
152
256
|
}
|
|
153
|
-
export {
|
|
257
|
+
export { x as groupIssues, f as groupings, m as isGrouping, p as isOrder, C as issueFilterOf, g as issueSearch, d as orders, y as sortIssues, u as views };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
+
import { queryOptions as n, useMutation as r, useQueryClient as i } from "@tanstack/react-query";
|
|
3
|
+
// src/lib/issueTypes.ts
|
|
4
|
+
var a = (r) => n({
|
|
5
|
+
queryKey: [
|
|
6
|
+
"workspace",
|
|
7
|
+
r,
|
|
8
|
+
"issueTypes"
|
|
9
|
+
],
|
|
10
|
+
queryFn: async ({ signal: n }) => t(await e.GET("/api/v1/workspaces/{workspace}/issue-types", {
|
|
11
|
+
params: { path: { workspace: r } },
|
|
12
|
+
signal: n
|
|
13
|
+
})).types
|
|
14
|
+
}), o = (e, t) => (e ?? []).filter((e) => !e.archivedAt && (e.teamIds.length === 0 || !!t && e.teamIds.includes(t))), s = (e, t) => !e || e.fieldIds.length === 0 || e.fieldIds.includes(t);
|
|
15
|
+
function c(n) {
|
|
16
|
+
let o = i(), s = () => {
|
|
17
|
+
o.invalidateQueries({ queryKey: a(n).queryKey }), o.invalidateQueries({ queryKey: [
|
|
18
|
+
"workspace",
|
|
19
|
+
n,
|
|
20
|
+
"issues"
|
|
21
|
+
] });
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
create: r({
|
|
25
|
+
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/issue-types", {
|
|
26
|
+
params: { path: { workspace: n } },
|
|
27
|
+
body: r
|
|
28
|
+
})),
|
|
29
|
+
onSettled: s
|
|
30
|
+
}),
|
|
31
|
+
update: r({
|
|
32
|
+
mutationFn: async ({ id: r, ...i }) => t(await e.PUT("/api/v1/workspaces/{workspace}/issue-types/{type}", {
|
|
33
|
+
params: { path: {
|
|
34
|
+
workspace: n,
|
|
35
|
+
type: r
|
|
36
|
+
} },
|
|
37
|
+
body: i
|
|
38
|
+
})),
|
|
39
|
+
onSettled: s
|
|
40
|
+
}),
|
|
41
|
+
remove: r({
|
|
42
|
+
mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issue-types/{type}", { params: { path: {
|
|
43
|
+
workspace: n,
|
|
44
|
+
type: r
|
|
45
|
+
} } })),
|
|
46
|
+
onSettled: s
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export { a as issueTypesQuery, s as typeShows, o as typesFor, c as useIssueTypeActions };
|
package/lib/teamTree.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/lib/teamTree.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = new Set(e.map((e) => e.id)), n = /* @__PURE__ */ new Map();
|
|
4
|
+
for (let r of e) {
|
|
5
|
+
let e = r.parentId && t.has(r.parentId) ? r.parentId : "";
|
|
6
|
+
n.set(e, [...n.get(e) ?? [], r]);
|
|
7
|
+
}
|
|
8
|
+
let r = [], i = (e, t) => {
|
|
9
|
+
for (let a of n.get(e) ?? []) r.push({
|
|
10
|
+
team: a,
|
|
11
|
+
depth: t
|
|
12
|
+
}), i(a.id, t + 1);
|
|
13
|
+
};
|
|
14
|
+
return i("", 0), r;
|
|
15
|
+
}
|
|
16
|
+
function t(e, t) {
|
|
17
|
+
let n = /* @__PURE__ */ new Set([t]);
|
|
18
|
+
for (let t = !0; t;) {
|
|
19
|
+
t = !1;
|
|
20
|
+
for (let r of e) r.parentId && n.has(r.parentId) && !n.has(r.id) && (n.add(r.id), t = !0);
|
|
21
|
+
}
|
|
22
|
+
return n;
|
|
23
|
+
}
|
|
24
|
+
export { e as teamTree, t as withSubTeams };
|
package/lib/views.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { useNavigate as n } from "./router.js";
|
|
3
3
|
import { viewsQuery as r } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useConfirm as i } from "./confirm.js";
|
|
5
|
+
import { viewRef as a } from "./refs.js";
|
|
6
|
+
import { issuesHref as o } from "./teamPaths.js";
|
|
7
|
+
import { useLinkItems as s } from "./menus.js";
|
|
8
|
+
import { ViewDialog as c } from "../components/ViewDialog.js";
|
|
9
9
|
import { menuDivider as l } from "@parallelworks/ui";
|
|
10
10
|
import { useState as u } from "react";
|
|
11
11
|
import { useTranslations as d } from "use-intl";
|
|
@@ -23,6 +23,8 @@ var v = [
|
|
|
23
23
|
"label",
|
|
24
24
|
"project",
|
|
25
25
|
"cycle",
|
|
26
|
+
"type",
|
|
27
|
+
"fields",
|
|
26
28
|
"overdue",
|
|
27
29
|
"q",
|
|
28
30
|
"order",
|
|
@@ -44,11 +46,11 @@ function b(e, t) {
|
|
|
44
46
|
function x(e) {
|
|
45
47
|
return {
|
|
46
48
|
...y(e.filters),
|
|
47
|
-
saved:
|
|
49
|
+
saved: a(e)
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
52
|
function S(e, t) {
|
|
51
|
-
return
|
|
53
|
+
return o(e, x(t));
|
|
52
54
|
}
|
|
53
55
|
function C(n) {
|
|
54
56
|
let i = _(), { data: a = [] } = g(r(n)), o = () => i.invalidateQueries({ queryKey: r(n).queryKey });
|
|
@@ -81,12 +83,12 @@ function C(n) {
|
|
|
81
83
|
};
|
|
82
84
|
}
|
|
83
85
|
function w(e) {
|
|
84
|
-
let t = d("savedViews"), r = d("common"),
|
|
86
|
+
let t = d("savedViews"), r = d("common"), a = n(), o = s(), { update: h, remove: g } = C(e), { confirm: _, dialog: v } = i(), [y, b] = u(null);
|
|
85
87
|
return {
|
|
86
88
|
menu: (n) => [
|
|
87
89
|
{
|
|
88
90
|
label: r("open"),
|
|
89
|
-
onClick: () =>
|
|
91
|
+
onClick: () => a({
|
|
90
92
|
to: "/$workspace/issues",
|
|
91
93
|
params: { workspace: e },
|
|
92
94
|
search: x(n)
|
|
@@ -98,7 +100,7 @@ function w(e) {
|
|
|
98
100
|
onClick: () => b(n)
|
|
99
101
|
},
|
|
100
102
|
l,
|
|
101
|
-
...
|
|
103
|
+
...o(S(e, n)),
|
|
102
104
|
l,
|
|
103
105
|
{
|
|
104
106
|
label: t("delete"),
|
|
@@ -112,7 +114,7 @@ function w(e) {
|
|
|
112
114
|
})
|
|
113
115
|
}
|
|
114
116
|
],
|
|
115
|
-
dialogs: /* @__PURE__ */ m(f, { children: [v, y && /* @__PURE__ */ p(
|
|
117
|
+
dialogs: /* @__PURE__ */ m(f, { children: [v, y && /* @__PURE__ */ p(c, {
|
|
116
118
|
title: t("renameTitle"),
|
|
117
119
|
submitLabel: r("save"),
|
|
118
120
|
defaultName: y.name,
|