@parallelworks/tandem-web 0.142.0 → 0.144.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 +156 -6
- package/_virtual/_virtual_i18n/es/common.js +156 -6
- package/_virtual/_virtual_i18n/ja/common.js +156 -6
- package/_virtual/_virtual_i18n/ko/common.js +156 -6
- package/_virtual/_virtual_i18n/zh/common.js +156 -6
- package/api/queries.js +85 -74
- 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 +8 -2
- 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 +45 -35
- 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/components/icons.js +8 -8
- package/lib/boardMove.js +69 -47
- package/lib/customFields.js +113 -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 +186 -174
- package/routes/_workspace/agents/index2.js +9 -9
- 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/import.js +6 -0
- package/routes/_workspace/settings/import2.js +330 -0
- package/routes/_workspace/settings/import3.js +4 -0
- 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 +320 -318
package/components/IssueBoard.js
CHANGED
|
@@ -1,53 +1,54 @@
|
|
|
1
1
|
import { Link as e } from "../lib/router.js";
|
|
2
2
|
import { PriorityIcon as t, ProjectIcon as n } from "./icons.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { TypeIcon as r } from "./IssueTypes.js";
|
|
4
|
+
import { usePeople as i } from "../lib/people.js";
|
|
5
|
+
import { Avatar as a } from "@parallelworks/ui";
|
|
6
|
+
import { useState as o } from "react";
|
|
7
|
+
import { useTranslations as s } from "use-intl";
|
|
8
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
9
|
// src/components/IssueBoard.tsx
|
|
9
|
-
function
|
|
10
|
-
let i =
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
function u({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
|
|
11
|
+
let i = s("issues"), [a, u] = o(null), [f, p] = o(null);
|
|
12
|
+
return /* @__PURE__ */ c("ul", {
|
|
12
13
|
className: "flex h-full min-h-0 snap-x gap-3 overflow-x-auto p-3 md:p-4",
|
|
13
14
|
"aria-label": i("board"),
|
|
14
15
|
children: t.map((t) => {
|
|
15
|
-
let i = !!
|
|
16
|
-
return /* @__PURE__ */
|
|
16
|
+
let i = !!a && !!n && !t.issues.some((e) => e.id === a.issue.id);
|
|
17
|
+
return /* @__PURE__ */ l("li", {
|
|
17
18
|
"aria-label": t.label,
|
|
18
19
|
onDragOver: (e) => {
|
|
19
20
|
i && (e.preventDefault(), e.dataTransfer.dropEffect = "move", p(t.key));
|
|
20
21
|
},
|
|
21
22
|
onDragLeave: () => p((e) => e === t.key ? null : e),
|
|
22
23
|
onDrop: (e) => {
|
|
23
|
-
e.preventDefault(), i &&
|
|
24
|
+
e.preventDefault(), i && a && n?.(a.issue, a.from, t.key), u(null), p(null);
|
|
24
25
|
},
|
|
25
26
|
className: `flex max-h-full min-w-60 flex-1 basis-0 snap-start flex-col rounded-lg border bg-muted/30 ${f === t.key ? "border-primary" : "border-border"}`,
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ l("h2", {
|
|
27
28
|
className: "flex h-9 shrink-0 items-center gap-2 px-3 text-xs font-medium",
|
|
28
29
|
children: [
|
|
29
30
|
t.icon,
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ c("span", {
|
|
31
32
|
className: "truncate",
|
|
32
33
|
children: t.label
|
|
33
34
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ c("span", {
|
|
35
36
|
className: "text-muted-foreground tabular-nums",
|
|
36
37
|
children: t.issues.length
|
|
37
38
|
})
|
|
38
39
|
]
|
|
39
|
-
}), /* @__PURE__ */
|
|
40
|
+
}), /* @__PURE__ */ c("ul", {
|
|
40
41
|
className: "min-h-12 flex-1 space-y-2 overflow-y-auto px-2 pb-2",
|
|
41
|
-
children: t.issues.map((i) => /* @__PURE__ */
|
|
42
|
+
children: t.issues.map((i) => /* @__PURE__ */ c(d, {
|
|
42
43
|
workspace: e,
|
|
43
44
|
issue: i,
|
|
44
45
|
draggable: !!n,
|
|
45
|
-
onDragStart: () =>
|
|
46
|
+
onDragStart: () => u({
|
|
46
47
|
issue: i,
|
|
47
48
|
from: t.key
|
|
48
49
|
}),
|
|
49
50
|
onDragEnd: () => {
|
|
50
|
-
|
|
51
|
+
u(null), p(null);
|
|
51
52
|
},
|
|
52
53
|
onContextMenu: (e) => r(e, i)
|
|
53
54
|
}, i.id))
|
|
@@ -56,54 +57,58 @@ function l({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
|
|
|
56
57
|
})
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
function
|
|
60
|
-
let { nameOf:
|
|
61
|
-
return /* @__PURE__ */
|
|
60
|
+
function d({ workspace: o, issue: s, draggable: u, onDragStart: d, onDragEnd: f, onContextMenu: p }) {
|
|
61
|
+
let { nameOf: m, avatarOf: h } = i(o), g = s.assignees[0];
|
|
62
|
+
return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l(e, {
|
|
62
63
|
to: "/$workspace/issues/$identifier",
|
|
63
64
|
params: {
|
|
64
|
-
workspace:
|
|
65
|
-
identifier:
|
|
65
|
+
workspace: o,
|
|
66
|
+
identifier: s.identifier
|
|
66
67
|
},
|
|
67
|
-
draggable:
|
|
68
|
+
draggable: u,
|
|
68
69
|
onDragStart: (e) => {
|
|
69
|
-
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain",
|
|
70
|
+
e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", s.identifier), d();
|
|
70
71
|
},
|
|
71
|
-
onDragEnd:
|
|
72
|
-
onContextMenu:
|
|
72
|
+
onDragEnd: f,
|
|
73
|
+
onContextMenu: p,
|
|
73
74
|
className: "block space-y-2 rounded-md border border-border bg-background p-2.5 text-sm shadow-xs hover:border-foreground/30",
|
|
74
75
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ l("span", {
|
|
76
77
|
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
77
78
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
/* @__PURE__ */ c(t, { priority: s.priority }),
|
|
80
|
+
s.type && /* @__PURE__ */ c(r, {
|
|
81
|
+
type: s.type,
|
|
82
|
+
className: "size-3.5"
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ c("span", { children: s.identifier }),
|
|
85
|
+
g && /* @__PURE__ */ c(a, {
|
|
86
|
+
name: m(g.kind, g.handle),
|
|
87
|
+
src: h(g.kind, g.handle),
|
|
83
88
|
size: "xs",
|
|
84
89
|
className: "ml-auto"
|
|
85
90
|
})
|
|
86
91
|
]
|
|
87
92
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ c("span", {
|
|
89
94
|
className: "line-clamp-3 block",
|
|
90
|
-
children:
|
|
95
|
+
children: s.title
|
|
91
96
|
}),
|
|
92
|
-
(
|
|
97
|
+
(s.project || s.labels.length > 0) && /* @__PURE__ */ l("span", {
|
|
93
98
|
className: "flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",
|
|
94
|
-
children: [
|
|
99
|
+
children: [s.project && /* @__PURE__ */ l("span", {
|
|
95
100
|
className: "inline-flex max-w-full items-center gap-1 truncate",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
101
|
+
children: [/* @__PURE__ */ c(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ c("span", {
|
|
97
102
|
className: "truncate",
|
|
98
|
-
children:
|
|
103
|
+
children: s.project.name
|
|
99
104
|
})]
|
|
100
|
-
}),
|
|
105
|
+
}), s.labels.map((e) => /* @__PURE__ */ l("span", {
|
|
101
106
|
title: e.name,
|
|
102
107
|
className: "inline-flex max-w-full min-w-0 items-center gap-1 rounded-full border border-border px-1.5",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ c("span", {
|
|
104
109
|
className: "size-1.5 shrink-0 rounded-full",
|
|
105
110
|
style: { background: e.color }
|
|
106
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ c("span", {
|
|
107
112
|
className: "truncate",
|
|
108
113
|
children: e.name
|
|
109
114
|
})]
|
|
@@ -112,4 +117,4 @@ function u({ workspace: a, issue: o, draggable: l, onDragStart: u, onDragEnd: d,
|
|
|
112
117
|
]
|
|
113
118
|
}) });
|
|
114
119
|
}
|
|
115
|
-
export {
|
|
120
|
+
export { u as IssueBoard };
|
package/components/IssueEvent.js
CHANGED
|
@@ -97,6 +97,8 @@ function f({ workspace: f, event: p }) {
|
|
|
97
97
|
case "issue.cycle_changed": return C.number ? T("cycleSet", { number: String(C.number) }) : T("cycleCleared");
|
|
98
98
|
case "issue.estimate_changed": return Number(C.to) ? T("estimateSet", { points: _.number(Number(C.to)) }) : T("estimateCleared");
|
|
99
99
|
case "issue.due_date_changed": return C.to ? T("dueDateSet", { date: b.day(String(C.to)) }) : T("dueDateCleared");
|
|
100
|
+
case "issue.type_changed": return C.to ? T("typeChanged", { type: String(C.to) }) : T("typeCleared");
|
|
101
|
+
case "issue.fields_changed": return T("fieldsChanged", { fields: _.list(C.fields ?? []) });
|
|
100
102
|
case "issue.label_added": return T("labelAdded", { label: String(C.name) });
|
|
101
103
|
case "issue.label_removed": return T("labelRemoved", { label: String(C.name) });
|
|
102
104
|
case "run.created": return T("runCreated");
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as a } from "../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { customFieldsQuery as o, fieldsFor as s, filterableKinds as c, formatFieldFilters as l, parseFieldFilters as u } from "../lib/customFields.js";
|
|
3
|
+
import { issueTypesQuery as d } from "../lib/issueTypes.js";
|
|
4
|
+
import { CalendarIcon as f, CycleIcon as ee, FolderIcon as p, PriorityIcon as m, ProjectIcon as h, StatusIcon as g, TagIcon as _, UserIcon as v, UsersIcon as y, usePriorityNames as te } from "./icons.js";
|
|
5
|
+
import { TypeIcon as ne } from "./IssueTypes.js";
|
|
6
|
+
import { statusRef as re } from "../lib/refs.js";
|
|
7
|
+
import { ProjectStatusIcon as b } from "./Planning.js";
|
|
8
|
+
import { usePeople as x } from "../lib/people.js";
|
|
9
|
+
import { projectRef as S } from "../lib/projects.js";
|
|
10
|
+
import { Avatar as C } from "@parallelworks/ui";
|
|
11
|
+
import { useMemo as ie } from "react";
|
|
12
|
+
import { useTranslations as w } from "use-intl";
|
|
13
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
14
|
+
import { useQuery as E } from "@tanstack/react-query";
|
|
15
|
+
import { useListFilters as D } from "@parallelworks/ui/list";
|
|
13
16
|
// src/components/IssueFilters.tsx
|
|
14
|
-
var
|
|
17
|
+
var O = (e) => `field:${e}`, k = [
|
|
15
18
|
"team",
|
|
16
19
|
"assignee",
|
|
17
20
|
"assigneeKind",
|
|
@@ -22,9 +25,11 @@ var E = [
|
|
|
22
25
|
"project",
|
|
23
26
|
"customer",
|
|
24
27
|
"cycle",
|
|
28
|
+
"type",
|
|
29
|
+
"fields",
|
|
25
30
|
"overdue"
|
|
26
|
-
],
|
|
27
|
-
function
|
|
31
|
+
], A = (e) => `agent:${e}`;
|
|
32
|
+
function j(e) {
|
|
28
33
|
let t = [], n = (e, n) => {
|
|
29
34
|
n && t.push({
|
|
30
35
|
field: e,
|
|
@@ -32,7 +37,7 @@ function O(e) {
|
|
|
32
37
|
values: [n]
|
|
33
38
|
});
|
|
34
39
|
};
|
|
35
|
-
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ?
|
|
40
|
+
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? A(e.assignee) : e.assignee)), n("creator", e.creator);
|
|
36
41
|
for (let n of ["status", "priority"]) {
|
|
37
42
|
let r = e[n]?.split(",").filter(Boolean) ?? [];
|
|
38
43
|
r.length > 0 && t.push({
|
|
@@ -41,64 +46,85 @@ function O(e) {
|
|
|
41
46
|
values: r
|
|
42
47
|
});
|
|
43
48
|
}
|
|
44
|
-
|
|
49
|
+
n("label", e.label), n("project", e.project), n("customer", e.customer), n("cycle", e.cycle);
|
|
50
|
+
let r = e.type?.split(",").filter(Boolean) ?? [];
|
|
51
|
+
r.length > 0 && t.push({
|
|
52
|
+
field: "type",
|
|
53
|
+
op: "is",
|
|
54
|
+
values: r
|
|
55
|
+
});
|
|
56
|
+
let i = /* @__PURE__ */ new Map();
|
|
57
|
+
for (let t of u(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
|
|
58
|
+
for (let [e, n] of i) t.push({
|
|
59
|
+
field: O(e),
|
|
60
|
+
op: "is",
|
|
61
|
+
values: n
|
|
62
|
+
});
|
|
63
|
+
return n("overdue", e.overdue), t;
|
|
45
64
|
}
|
|
46
|
-
function
|
|
47
|
-
let t = {};
|
|
48
|
-
for (let
|
|
49
|
-
let e =
|
|
50
|
-
if (e)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
function M(e) {
|
|
66
|
+
let t = {}, n = [];
|
|
67
|
+
for (let r of e) {
|
|
68
|
+
let e = r.values[0];
|
|
69
|
+
if (e) {
|
|
70
|
+
if (r.field.startsWith("field:")) for (let e of r.values) n.push({
|
|
71
|
+
field: r.field.slice(6),
|
|
72
|
+
value: e
|
|
73
|
+
});
|
|
74
|
+
else switch (r.field) {
|
|
75
|
+
case "assignee":
|
|
76
|
+
e.startsWith("agent:") ? (t.assignee = e.slice(6), t.assigneeKind = "agent") : t.assignee = e;
|
|
77
|
+
break;
|
|
78
|
+
case "overdue":
|
|
79
|
+
e === "true" && (t.overdue = "true");
|
|
80
|
+
break;
|
|
81
|
+
case "status":
|
|
82
|
+
case "priority":
|
|
83
|
+
case "type":
|
|
84
|
+
t[r.field] = r.values.join(",");
|
|
85
|
+
break;
|
|
86
|
+
case "team":
|
|
87
|
+
case "creator":
|
|
88
|
+
case "label":
|
|
89
|
+
case "project":
|
|
90
|
+
case "customer":
|
|
91
|
+
case "cycle": t[r.field] = e;
|
|
92
|
+
}
|
|
67
93
|
}
|
|
68
94
|
}
|
|
69
|
-
return t;
|
|
95
|
+
return n.length > 0 && (t.fields = l(n)), t;
|
|
70
96
|
}
|
|
71
|
-
function
|
|
97
|
+
function N(e, t) {
|
|
72
98
|
let n = { ...e };
|
|
73
|
-
for (let e of
|
|
99
|
+
for (let e of k) delete n[e];
|
|
74
100
|
return {
|
|
75
101
|
...n,
|
|
76
102
|
...t
|
|
77
103
|
};
|
|
78
104
|
}
|
|
79
|
-
function
|
|
80
|
-
let
|
|
81
|
-
...t(
|
|
82
|
-
enabled: !!
|
|
83
|
-
}), { data:
|
|
84
|
-
...i(
|
|
85
|
-
enabled: !!
|
|
86
|
-
}),
|
|
105
|
+
function P(l, k, N, P = !1) {
|
|
106
|
+
let F = w("issueFilters"), I = w("planning"), { data: L = [] } = E(a(l)), { data: R = [] } = E(n(l)), { data: z = [] } = E(r(l)), { data: B = [] } = E(e(l)), V = L.find((e) => e.key === k.team), { data: H = [] } = E({
|
|
107
|
+
...t(l, V?.key ?? ""),
|
|
108
|
+
enabled: !!V?.cyclesEnabled
|
|
109
|
+
}), { data: U = [] } = E({
|
|
110
|
+
...i(l, V?.key ?? ""),
|
|
111
|
+
enabled: !!V
|
|
112
|
+
}), W = te(), { members: G, agents: K, person: q, agentName: J } = x(l), { data: Y } = E(o(l)), { data: X } = E(d(l)), Z = w("issueTypes"), Q = w("customFields"), ae = ie(() => {
|
|
87
113
|
let e = {
|
|
88
114
|
multiple: !1,
|
|
89
115
|
operators: ["is"]
|
|
90
|
-
}, t = (e) => e.name ?
|
|
116
|
+
}, t = (e) => e.name ? I("cycleNamed", {
|
|
91
117
|
number: e.number,
|
|
92
118
|
name: e.name
|
|
93
|
-
}) :
|
|
119
|
+
}) : I("cycle", { number: e.number }), n = [
|
|
94
120
|
{
|
|
95
121
|
key: "team",
|
|
96
|
-
label:
|
|
97
|
-
icon: /* @__PURE__ */
|
|
122
|
+
label: F("team"),
|
|
123
|
+
icon: /* @__PURE__ */ T(p, {}),
|
|
98
124
|
kind: "enum",
|
|
99
125
|
...e,
|
|
100
|
-
required:
|
|
101
|
-
options:
|
|
126
|
+
required: P,
|
|
127
|
+
options: L.filter((e) => !e.archivedAt).map((e) => ({
|
|
102
128
|
value: e.key,
|
|
103
129
|
label: e.name,
|
|
104
130
|
description: e.key
|
|
@@ -106,55 +132,55 @@ function j(E, A, j, M = !1) {
|
|
|
106
132
|
},
|
|
107
133
|
{
|
|
108
134
|
key: "assignee",
|
|
109
|
-
label:
|
|
110
|
-
icon: /* @__PURE__ */
|
|
135
|
+
label: F("assignee"),
|
|
136
|
+
icon: /* @__PURE__ */ T(v, {}),
|
|
111
137
|
kind: "people",
|
|
112
138
|
...e,
|
|
113
|
-
options: [...
|
|
139
|
+
options: [...G.map((e) => ({
|
|
114
140
|
value: e.user.username,
|
|
115
141
|
label: e.user.name,
|
|
116
|
-
group:
|
|
117
|
-
icon: /* @__PURE__ */ C
|
|
142
|
+
group: F("people"),
|
|
143
|
+
icon: /* @__PURE__ */ T(C, {
|
|
118
144
|
name: e.user.name,
|
|
119
145
|
src: e.user.avatarUrl,
|
|
120
146
|
size: "xs",
|
|
121
147
|
decorative: !0
|
|
122
148
|
})
|
|
123
|
-
})), ...
|
|
124
|
-
value:
|
|
149
|
+
})), ...K.map((e) => ({
|
|
150
|
+
value: A(e.slug),
|
|
125
151
|
label: e.name,
|
|
126
|
-
group:
|
|
127
|
-
icon: /* @__PURE__ */ C
|
|
152
|
+
group: F("agents"),
|
|
153
|
+
icon: /* @__PURE__ */ T(C, {
|
|
128
154
|
name: e.name,
|
|
129
155
|
kind: "agent",
|
|
130
156
|
size: "xs",
|
|
131
157
|
decorative: !0
|
|
132
158
|
})
|
|
133
159
|
}))],
|
|
134
|
-
valueLabel: (e) => e.startsWith("agent:") ?
|
|
160
|
+
valueLabel: (e) => e.startsWith("agent:") ? J(e.slice(6)) : q(e).name
|
|
135
161
|
},
|
|
136
162
|
{
|
|
137
163
|
key: "creator",
|
|
138
|
-
label:
|
|
139
|
-
icon: /* @__PURE__ */
|
|
164
|
+
label: F("creator"),
|
|
165
|
+
icon: /* @__PURE__ */ T(v, {}),
|
|
140
166
|
kind: "people",
|
|
141
167
|
...e,
|
|
142
|
-
options:
|
|
168
|
+
options: G.map((e) => ({
|
|
143
169
|
value: e.user.username,
|
|
144
170
|
label: e.user.name,
|
|
145
|
-
icon: /* @__PURE__ */ C
|
|
171
|
+
icon: /* @__PURE__ */ T(C, {
|
|
146
172
|
name: e.user.name,
|
|
147
173
|
src: e.user.avatarUrl,
|
|
148
174
|
size: "xs",
|
|
149
175
|
decorative: !0
|
|
150
176
|
})
|
|
151
177
|
})),
|
|
152
|
-
valueLabel: (e) =>
|
|
178
|
+
valueLabel: (e) => q(e).name
|
|
153
179
|
},
|
|
154
180
|
{
|
|
155
181
|
key: "priority",
|
|
156
|
-
label:
|
|
157
|
-
icon: /* @__PURE__ */
|
|
182
|
+
label: F("priority"),
|
|
183
|
+
icon: /* @__PURE__ */ T(m, { priority: 2 }),
|
|
158
184
|
kind: "enum",
|
|
159
185
|
operators: ["is"],
|
|
160
186
|
options: [
|
|
@@ -165,108 +191,170 @@ function j(E, A, j, M = !1) {
|
|
|
165
191
|
0
|
|
166
192
|
].map((e) => ({
|
|
167
193
|
value: String(e),
|
|
168
|
-
label:
|
|
169
|
-
icon: /* @__PURE__ */
|
|
194
|
+
label: W[e] ?? "",
|
|
195
|
+
icon: /* @__PURE__ */ T(m, { priority: e })
|
|
170
196
|
}))
|
|
171
197
|
},
|
|
172
198
|
{
|
|
173
199
|
key: "label",
|
|
174
|
-
label:
|
|
175
|
-
icon: /* @__PURE__ */
|
|
200
|
+
label: F("label"),
|
|
201
|
+
icon: /* @__PURE__ */ T(_, {}),
|
|
176
202
|
kind: "enum",
|
|
177
203
|
...e,
|
|
178
|
-
options:
|
|
204
|
+
options: R.map((e) => ({
|
|
179
205
|
value: e.name,
|
|
180
206
|
label: e.name,
|
|
181
|
-
icon: /* @__PURE__ */
|
|
207
|
+
icon: /* @__PURE__ */ T("span", {
|
|
182
208
|
className: "size-2 rounded-full",
|
|
183
209
|
style: { background: e.color }
|
|
184
210
|
})
|
|
185
211
|
})),
|
|
186
|
-
valueLabel: () =>
|
|
212
|
+
valueLabel: () => F("deletedLabel")
|
|
187
213
|
},
|
|
188
214
|
{
|
|
189
215
|
key: "project",
|
|
190
|
-
label:
|
|
191
|
-
icon: /* @__PURE__ */
|
|
216
|
+
label: F("project"),
|
|
217
|
+
icon: /* @__PURE__ */ T(h, {}),
|
|
192
218
|
kind: "enum",
|
|
193
219
|
...e,
|
|
194
|
-
options:
|
|
195
|
-
value:
|
|
220
|
+
options: z.map((e) => ({
|
|
221
|
+
value: S(e),
|
|
196
222
|
label: e.name,
|
|
197
|
-
icon: /* @__PURE__ */
|
|
223
|
+
icon: /* @__PURE__ */ T(b, { status: e.status })
|
|
198
224
|
}))
|
|
199
225
|
}
|
|
200
226
|
];
|
|
201
|
-
|
|
227
|
+
(B.length > 0 || k.customer) && n.push({
|
|
202
228
|
key: "customer",
|
|
203
|
-
label:
|
|
204
|
-
icon: /* @__PURE__ */
|
|
229
|
+
label: F("customer"),
|
|
230
|
+
icon: /* @__PURE__ */ T(y, {}),
|
|
205
231
|
kind: "enum",
|
|
206
232
|
...e,
|
|
207
|
-
options:
|
|
233
|
+
options: B.map((e) => ({
|
|
208
234
|
value: e.id,
|
|
209
235
|
label: e.name
|
|
210
236
|
}))
|
|
211
|
-
}), (
|
|
237
|
+
}), (V || k.status) && n.splice(3, 0, {
|
|
212
238
|
key: "status",
|
|
213
|
-
label:
|
|
214
|
-
icon: /* @__PURE__ */
|
|
239
|
+
label: F("status"),
|
|
240
|
+
icon: /* @__PURE__ */ T(g, { category: "started" }),
|
|
215
241
|
kind: "enum",
|
|
216
242
|
operators: ["is"],
|
|
217
|
-
options:
|
|
218
|
-
value:
|
|
243
|
+
options: U.map((e) => ({
|
|
244
|
+
value: re(e),
|
|
219
245
|
label: e.name,
|
|
220
|
-
icon: /* @__PURE__ */
|
|
246
|
+
icon: /* @__PURE__ */ T(g, { category: e.category })
|
|
221
247
|
}))
|
|
222
|
-
}), (
|
|
248
|
+
}), (V?.cyclesEnabled || k.cycle) && n.push({
|
|
223
249
|
key: "cycle",
|
|
224
|
-
label:
|
|
225
|
-
icon: /* @__PURE__ */
|
|
250
|
+
label: F("cycle"),
|
|
251
|
+
icon: /* @__PURE__ */ T(ee, {}),
|
|
226
252
|
kind: "enum",
|
|
227
253
|
...e,
|
|
228
|
-
options:
|
|
254
|
+
options: H.map((e) => ({
|
|
229
255
|
value: String(e.number),
|
|
230
256
|
label: t(e),
|
|
231
|
-
description:
|
|
257
|
+
description: I(`states.${e.state}`)
|
|
232
258
|
}))
|
|
233
|
-
})
|
|
259
|
+
});
|
|
260
|
+
let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
|
|
261
|
+
(r.length > 0 || k.type) && n.push({
|
|
262
|
+
key: "type",
|
|
263
|
+
label: Z("type"),
|
|
264
|
+
icon: /* @__PURE__ */ T(_, {}),
|
|
265
|
+
kind: "enum",
|
|
266
|
+
multiple: !0,
|
|
267
|
+
operators: ["is"],
|
|
268
|
+
options: [...r.map((e) => ({
|
|
269
|
+
value: e.id,
|
|
270
|
+
label: e.name,
|
|
271
|
+
icon: /* @__PURE__ */ T(ne, {
|
|
272
|
+
type: e,
|
|
273
|
+
className: "size-3.5"
|
|
274
|
+
})
|
|
275
|
+
})), {
|
|
276
|
+
value: "none",
|
|
277
|
+
label: Z("noType")
|
|
278
|
+
}]
|
|
279
|
+
});
|
|
280
|
+
let i = new Set(u(k.fields).map((e) => e.field));
|
|
281
|
+
for (let e of (Y ?? []).filter((e) => e.target === "issue" && c.includes(e.kind) && (s([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
|
|
282
|
+
let t = {
|
|
283
|
+
value: "none",
|
|
284
|
+
label: Q("noValue")
|
|
285
|
+
};
|
|
286
|
+
n.push({
|
|
287
|
+
key: O(e.id),
|
|
288
|
+
label: e.name,
|
|
289
|
+
icon: /* @__PURE__ */ T(_, {}),
|
|
290
|
+
kind: "enum",
|
|
291
|
+
multiple: !0,
|
|
292
|
+
operators: ["is"],
|
|
293
|
+
options: e.kind === "person" ? [...G.map((e) => ({
|
|
294
|
+
value: e.user.username,
|
|
295
|
+
label: e.user.name,
|
|
296
|
+
icon: /* @__PURE__ */ T(C, {
|
|
297
|
+
name: e.user.name,
|
|
298
|
+
src: e.user.avatarUrl,
|
|
299
|
+
size: "xs",
|
|
300
|
+
decorative: !0
|
|
301
|
+
})
|
|
302
|
+
})), t] : e.kind === "checkbox" ? [{
|
|
303
|
+
value: "true",
|
|
304
|
+
label: Q("yes")
|
|
305
|
+
}, t] : [...e.options.map((e) => ({
|
|
306
|
+
value: e.id ?? "",
|
|
307
|
+
label: e.name,
|
|
308
|
+
...e.color && { icon: /* @__PURE__ */ T("span", {
|
|
309
|
+
className: "size-2 rounded-full",
|
|
310
|
+
style: { background: e.color }
|
|
311
|
+
}) }
|
|
312
|
+
})), t]
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
return n.push({
|
|
234
316
|
key: "overdue",
|
|
235
|
-
label:
|
|
236
|
-
icon: /* @__PURE__ */
|
|
317
|
+
label: F("overdue"),
|
|
318
|
+
icon: /* @__PURE__ */ T(f, {}),
|
|
237
319
|
kind: "boolean"
|
|
238
320
|
}), n;
|
|
239
321
|
}, [
|
|
240
|
-
|
|
241
|
-
|
|
322
|
+
X,
|
|
323
|
+
Z,
|
|
324
|
+
k.type,
|
|
325
|
+
Y,
|
|
326
|
+
Q,
|
|
327
|
+
k.fields,
|
|
242
328
|
F,
|
|
243
|
-
U,
|
|
244
|
-
W,
|
|
245
329
|
I,
|
|
246
330
|
L,
|
|
331
|
+
G,
|
|
332
|
+
K,
|
|
247
333
|
R,
|
|
248
|
-
|
|
334
|
+
z,
|
|
249
335
|
B,
|
|
250
|
-
|
|
336
|
+
k.customer,
|
|
251
337
|
H,
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
338
|
+
U,
|
|
339
|
+
W,
|
|
340
|
+
V,
|
|
341
|
+
k.cycle,
|
|
342
|
+
k.status,
|
|
343
|
+
q,
|
|
344
|
+
J,
|
|
345
|
+
P
|
|
346
|
+
]), $ = j(k), oe = {
|
|
347
|
+
value: $.length > 0 ? $ : null,
|
|
260
348
|
onChange: (e) => {
|
|
261
|
-
let t =
|
|
262
|
-
t.team !==
|
|
349
|
+
let t = M(e);
|
|
350
|
+
t.team !== k.team && delete t.status, N(t);
|
|
263
351
|
}
|
|
264
352
|
};
|
|
265
|
-
return
|
|
266
|
-
storageKey: `issues:${
|
|
267
|
-
fields:
|
|
268
|
-
store:
|
|
353
|
+
return D({
|
|
354
|
+
storageKey: `issues:${l}`,
|
|
355
|
+
fields: ae,
|
|
356
|
+
store: oe,
|
|
269
357
|
remember: !1
|
|
270
358
|
});
|
|
271
359
|
}
|
|
272
|
-
export {
|
|
360
|
+
export { P as useIssueFilters, N as withIssueFilters };
|
|
@@ -105,7 +105,7 @@ function b({ workspace: e, row: t }) {
|
|
|
105
105
|
}),
|
|
106
106
|
t.warnings.length > 0 && /* @__PURE__ */ m("span", {
|
|
107
107
|
className: "mt-0.5 block text-muted-foreground",
|
|
108
|
-
children: r("leftOut", { values: t.warnings.map((e) => `${r(`field.${e.field}`)} “${e.value}”`).join(", ") })
|
|
108
|
+
children: r("leftOut", { values: t.warnings.map((e) => `${e.field === "field" && e.name ? e.name : r(`field.${e.field}`)} “${e.value}”`).join(", ") })
|
|
109
109
|
})
|
|
110
110
|
]
|
|
111
111
|
}),
|