@parallelworks/tandem-web 0.171.0 → 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/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- 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 +103 -99
- 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/assigneeOrder.js +6 -0
- package/lib/assignees.js +24 -20
- 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
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { customersQuery as e, cyclesQuery as t, labelsQuery as n,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ProjectStatusIcon as m } from "./Planning.js";
|
|
5
|
-
import { projectRef as ie } from "../lib/projects.js";
|
|
6
|
-
import { customFieldsQuery as h, fieldsFor as g, filterableKinds as _, formatFieldFilters as v, parseFieldFilters as y } from "../lib/customFields.js";
|
|
1
|
+
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, meQuery as r, myTeamsQuery as i, projectsQuery as ee, statusesQuery as te, teamsQuery as ne } from "../api/queries.js";
|
|
2
|
+
import { youFirst as re } from "../lib/assigneeOrder.js";
|
|
3
|
+
import { customFieldsQuery as ie, fieldsFor as a, filterableKinds as o, formatFieldFilters as s, parseFieldFilters as c } from "../lib/customFields.js";
|
|
7
4
|
import { issueTypesQuery as ae } from "../lib/issueTypes.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
5
|
+
import { usePeople as oe } from "../lib/people.js";
|
|
6
|
+
import { projectRef as l } from "../lib/projects.js";
|
|
7
|
+
import { statusRef as u } from "../lib/refs.js";
|
|
8
|
+
import { TypeIcon as d } from "./IssueTypes.js";
|
|
9
|
+
import { CalendarIcon as f, CycleIcon as p, FolderIcon as se, PriorityIcon as m, ProjectIcon as ce, StatusIcon as h, TagIcon as g, UserIcon as _, UsersIcon as v, usePriorityNames as y } from "./icons.js";
|
|
10
|
+
import { ProjectStatusIcon as le } from "./Planning.js";
|
|
11
|
+
import { Avatar as b } from "@parallelworks/ui";
|
|
12
|
+
import { useMemo as ue } from "react";
|
|
13
|
+
import { useTranslations as x } from "use-intl";
|
|
14
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
15
|
+
import { useQuery as C } from "@tanstack/react-query";
|
|
16
|
+
import { useListFilters as w } from "@parallelworks/ui/list";
|
|
16
17
|
// src/components/IssueFilters.tsx
|
|
17
|
-
var
|
|
18
|
+
var T = (e) => `field:${e}`, E = [
|
|
18
19
|
"team",
|
|
19
20
|
"assignee",
|
|
20
21
|
"assigneeKind",
|
|
@@ -29,8 +30,8 @@ var D = (e) => `field:${e}`, O = [
|
|
|
29
30
|
"type",
|
|
30
31
|
"fields",
|
|
31
32
|
"overdue"
|
|
32
|
-
],
|
|
33
|
-
function
|
|
33
|
+
], D = ":none", O = (e) => `agent:${e}`;
|
|
34
|
+
function de(e) {
|
|
34
35
|
let t = [], n = (e, n) => {
|
|
35
36
|
n && t.push({
|
|
36
37
|
field: e,
|
|
@@ -38,7 +39,7 @@ function se(e) {
|
|
|
38
39
|
values: [n]
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
|
-
n("team", e.team), n("assignee", e.assignee ? e.assigneeKind === "agent" ?
|
|
42
|
+
n("team", e.team), n("assignee", e.assignee ? e.assigneeKind === "agent" ? O(e.assignee) : e.assignee : e.unassigned && D), n("creator", e.creator);
|
|
42
43
|
for (let n of ["status", "priority"]) {
|
|
43
44
|
let r = e[n]?.split(",").filter(Boolean) ?? [];
|
|
44
45
|
r.length > 0 && t.push({
|
|
@@ -55,15 +56,15 @@ function se(e) {
|
|
|
55
56
|
values: r
|
|
56
57
|
});
|
|
57
58
|
let i = /* @__PURE__ */ new Map();
|
|
58
|
-
for (let t of
|
|
59
|
+
for (let t of c(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
|
|
59
60
|
for (let [e, n] of i) t.push({
|
|
60
|
-
field:
|
|
61
|
+
field: T(e),
|
|
61
62
|
op: "is",
|
|
62
63
|
values: n
|
|
63
64
|
});
|
|
64
65
|
return n("overdue", e.overdue), t;
|
|
65
66
|
}
|
|
66
|
-
function
|
|
67
|
+
function fe(e) {
|
|
67
68
|
let t = {}, n = [];
|
|
68
69
|
for (let r of e) {
|
|
69
70
|
let e = r.values[0];
|
|
@@ -74,7 +75,7 @@ function ce(e) {
|
|
|
74
75
|
});
|
|
75
76
|
else switch (r.field) {
|
|
76
77
|
case "assignee":
|
|
77
|
-
e ===
|
|
78
|
+
e === D ? t.unassigned = "true" : e.startsWith("agent:") ? (t.assignee = e.slice(6), t.assigneeKind = "agent") : t.assignee = e;
|
|
78
79
|
break;
|
|
79
80
|
case "overdue":
|
|
80
81
|
e === "true" && (t.overdue = "true");
|
|
@@ -93,38 +94,38 @@ function ce(e) {
|
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
return n.length > 0 && (t.fields =
|
|
97
|
+
return n.length > 0 && (t.fields = s(n)), t;
|
|
97
98
|
}
|
|
98
|
-
function
|
|
99
|
+
function k(e, t) {
|
|
99
100
|
let n = { ...e };
|
|
100
|
-
for (let e of
|
|
101
|
+
for (let e of E) delete n[e];
|
|
101
102
|
return {
|
|
102
103
|
...n,
|
|
103
104
|
...t
|
|
104
105
|
};
|
|
105
106
|
}
|
|
106
|
-
function
|
|
107
|
-
let
|
|
108
|
-
...t(
|
|
107
|
+
function A(s, E, k, A = !1) {
|
|
108
|
+
let j = x("issueFilters"), M = x("common"), N = x("planning"), P = C(r).data?.user.username, { data: F = [] } = C(ne(s)), { data: I = [] } = C(i(s)), L = I.some((e) => e.key === E.team) ? I : [...I, ...F.filter((e) => e.key === E.team)], { data: R = [] } = C(n(s)), { data: z = [] } = C(ee(s)), { data: B = [] } = C(e(s)), V = L.find((e) => e.key === E.team), { data: H = [] } = C({
|
|
109
|
+
...t(s, V?.key ?? ""),
|
|
109
110
|
enabled: !!V?.cyclesEnabled
|
|
110
|
-
}), { data: U = [] } =
|
|
111
|
-
...
|
|
111
|
+
}), { data: U = [] } = C({
|
|
112
|
+
...te(s, V?.key ?? ""),
|
|
112
113
|
enabled: !!V
|
|
113
|
-
}), W =
|
|
114
|
+
}), W = y(), { members: G, agents: K, person: q, agentName: J } = oe(s), { data: Y } = C(ie(s)), { data: X } = C(ae(s)), Z = x("issueTypes"), Q = x("customFields"), pe = ue(() => {
|
|
114
115
|
let e = {
|
|
115
116
|
multiple: !1,
|
|
116
117
|
operators: ["is"]
|
|
117
|
-
}, t = (e) => e.name ?
|
|
118
|
+
}, t = (e) => e.name ? N("cycleNamed", {
|
|
118
119
|
number: e.number,
|
|
119
120
|
name: e.name
|
|
120
|
-
}) :
|
|
121
|
+
}) : N("cycle", { number: e.number }), n = [
|
|
121
122
|
{
|
|
122
123
|
key: "team",
|
|
123
|
-
label:
|
|
124
|
-
icon: /* @__PURE__ */
|
|
124
|
+
label: j("team"),
|
|
125
|
+
icon: /* @__PURE__ */ S(se, {}),
|
|
125
126
|
kind: "enum",
|
|
126
127
|
...e,
|
|
127
|
-
required:
|
|
128
|
+
required: A,
|
|
128
129
|
options: L.filter((e) => !e.archivedAt).map((e) => ({
|
|
129
130
|
value: e.key,
|
|
130
131
|
label: e.name,
|
|
@@ -133,21 +134,22 @@ function M(v, O, j, M = !1) {
|
|
|
133
134
|
},
|
|
134
135
|
{
|
|
135
136
|
key: "assignee",
|
|
136
|
-
label:
|
|
137
|
-
icon: /* @__PURE__ */
|
|
137
|
+
label: j("assignee"),
|
|
138
|
+
icon: /* @__PURE__ */ S(_, {}),
|
|
138
139
|
kind: "people",
|
|
139
140
|
...e,
|
|
140
141
|
options: [
|
|
141
142
|
{
|
|
142
|
-
value:
|
|
143
|
-
label:
|
|
144
|
-
icon: /* @__PURE__ */
|
|
143
|
+
value: D,
|
|
144
|
+
label: j("noAssignee"),
|
|
145
|
+
icon: /* @__PURE__ */ S(_, {})
|
|
145
146
|
},
|
|
146
|
-
...G.map((e) => ({
|
|
147
|
+
...re(G, P).map((e) => ({
|
|
147
148
|
value: e.user.username,
|
|
148
149
|
label: e.user.name,
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
...e.user.username === P && { description: M("you") },
|
|
151
|
+
group: j("people"),
|
|
152
|
+
icon: /* @__PURE__ */ S(b, {
|
|
151
153
|
name: e.user.name,
|
|
152
154
|
src: e.user.avatarUrl,
|
|
153
155
|
size: "xs",
|
|
@@ -155,10 +157,10 @@ function M(v, O, j, M = !1) {
|
|
|
155
157
|
})
|
|
156
158
|
})),
|
|
157
159
|
...K.map((e) => ({
|
|
158
|
-
value:
|
|
160
|
+
value: O(e.slug),
|
|
159
161
|
label: e.name,
|
|
160
|
-
group:
|
|
161
|
-
icon: /* @__PURE__ */
|
|
162
|
+
group: j("agents"),
|
|
163
|
+
icon: /* @__PURE__ */ S(b, {
|
|
162
164
|
name: e.name,
|
|
163
165
|
kind: "agent",
|
|
164
166
|
size: "xs",
|
|
@@ -170,14 +172,14 @@ function M(v, O, j, M = !1) {
|
|
|
170
172
|
},
|
|
171
173
|
{
|
|
172
174
|
key: "creator",
|
|
173
|
-
label:
|
|
174
|
-
icon: /* @__PURE__ */
|
|
175
|
+
label: j("creator"),
|
|
176
|
+
icon: /* @__PURE__ */ S(_, {}),
|
|
175
177
|
kind: "people",
|
|
176
178
|
...e,
|
|
177
179
|
options: G.map((e) => ({
|
|
178
180
|
value: e.user.username,
|
|
179
181
|
label: e.user.name,
|
|
180
|
-
icon: /* @__PURE__ */
|
|
182
|
+
icon: /* @__PURE__ */ S(b, {
|
|
181
183
|
name: e.user.name,
|
|
182
184
|
src: e.user.avatarUrl,
|
|
183
185
|
size: "xs",
|
|
@@ -188,8 +190,8 @@ function M(v, O, j, M = !1) {
|
|
|
188
190
|
},
|
|
189
191
|
{
|
|
190
192
|
key: "priority",
|
|
191
|
-
label:
|
|
192
|
-
icon: /* @__PURE__ */
|
|
193
|
+
label: j("priority"),
|
|
194
|
+
icon: /* @__PURE__ */ S(m, { priority: 2 }),
|
|
193
195
|
kind: "enum",
|
|
194
196
|
operators: ["is"],
|
|
195
197
|
options: [
|
|
@@ -201,86 +203,86 @@ function M(v, O, j, M = !1) {
|
|
|
201
203
|
].map((e) => ({
|
|
202
204
|
value: String(e),
|
|
203
205
|
label: W[e] ?? "",
|
|
204
|
-
icon: /* @__PURE__ */
|
|
206
|
+
icon: /* @__PURE__ */ S(m, { priority: e })
|
|
205
207
|
}))
|
|
206
208
|
},
|
|
207
209
|
{
|
|
208
210
|
key: "label",
|
|
209
|
-
label:
|
|
210
|
-
icon: /* @__PURE__ */
|
|
211
|
+
label: j("label"),
|
|
212
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
211
213
|
kind: "enum",
|
|
212
214
|
...e,
|
|
213
215
|
options: R.map((e) => ({
|
|
214
216
|
value: e.name,
|
|
215
217
|
label: e.name,
|
|
216
|
-
icon: /* @__PURE__ */
|
|
218
|
+
icon: /* @__PURE__ */ S("span", {
|
|
217
219
|
className: "size-2 rounded-full",
|
|
218
220
|
style: { background: e.color }
|
|
219
221
|
})
|
|
220
222
|
})),
|
|
221
|
-
valueLabel: () =>
|
|
223
|
+
valueLabel: () => j("deletedLabel")
|
|
222
224
|
},
|
|
223
225
|
{
|
|
224
226
|
key: "project",
|
|
225
|
-
label:
|
|
226
|
-
icon: /* @__PURE__ */
|
|
227
|
+
label: j("project"),
|
|
228
|
+
icon: /* @__PURE__ */ S(ce, {}),
|
|
227
229
|
kind: "enum",
|
|
228
230
|
...e,
|
|
229
231
|
options: z.map((e) => ({
|
|
230
|
-
value:
|
|
232
|
+
value: l(e),
|
|
231
233
|
label: e.name,
|
|
232
|
-
icon: /* @__PURE__ */
|
|
234
|
+
icon: /* @__PURE__ */ S(le, { status: e.status })
|
|
233
235
|
}))
|
|
234
236
|
}
|
|
235
237
|
];
|
|
236
|
-
(B.length > 0 ||
|
|
238
|
+
(B.length > 0 || E.customer) && n.push({
|
|
237
239
|
key: "customer",
|
|
238
|
-
label:
|
|
239
|
-
icon: /* @__PURE__ */
|
|
240
|
+
label: j("customer"),
|
|
241
|
+
icon: /* @__PURE__ */ S(v, {}),
|
|
240
242
|
kind: "enum",
|
|
241
243
|
...e,
|
|
242
244
|
options: B.map((e) => ({
|
|
243
245
|
value: e.id,
|
|
244
246
|
label: e.name
|
|
245
247
|
}))
|
|
246
|
-
}), (V ||
|
|
248
|
+
}), (V || E.status) && n.splice(3, 0, {
|
|
247
249
|
key: "status",
|
|
248
|
-
label:
|
|
249
|
-
icon: /* @__PURE__ */
|
|
250
|
+
label: j("status"),
|
|
251
|
+
icon: /* @__PURE__ */ S(h, { category: "started" }),
|
|
250
252
|
kind: "enum",
|
|
251
253
|
operators: ["is"],
|
|
252
254
|
options: U.map((e) => ({
|
|
253
|
-
value:
|
|
255
|
+
value: u(e),
|
|
254
256
|
label: e.name,
|
|
255
|
-
icon: /* @__PURE__ */
|
|
257
|
+
icon: /* @__PURE__ */ S(h, {
|
|
256
258
|
category: e.category,
|
|
257
259
|
step: e.step
|
|
258
260
|
})
|
|
259
261
|
}))
|
|
260
|
-
}), (V?.cyclesEnabled ||
|
|
262
|
+
}), (V?.cyclesEnabled || E.cycle) && n.push({
|
|
261
263
|
key: "cycle",
|
|
262
|
-
label:
|
|
263
|
-
icon: /* @__PURE__ */
|
|
264
|
+
label: j("cycle"),
|
|
265
|
+
icon: /* @__PURE__ */ S(p, {}),
|
|
264
266
|
kind: "enum",
|
|
265
267
|
...e,
|
|
266
268
|
options: H.map((e) => ({
|
|
267
269
|
value: e.id,
|
|
268
270
|
label: t(e),
|
|
269
|
-
description:
|
|
271
|
+
description: N(`states.${e.state}`)
|
|
270
272
|
}))
|
|
271
273
|
});
|
|
272
274
|
let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
|
|
273
|
-
(r.length > 0 ||
|
|
275
|
+
(r.length > 0 || E.type) && n.push({
|
|
274
276
|
key: "type",
|
|
275
277
|
label: Z("type"),
|
|
276
|
-
icon: /* @__PURE__ */
|
|
278
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
277
279
|
kind: "enum",
|
|
278
280
|
multiple: !0,
|
|
279
281
|
operators: ["is"],
|
|
280
282
|
options: [...r.map((e) => ({
|
|
281
283
|
value: e.id,
|
|
282
284
|
label: e.name,
|
|
283
|
-
icon: /* @__PURE__ */
|
|
285
|
+
icon: /* @__PURE__ */ S(d, {
|
|
284
286
|
type: e,
|
|
285
287
|
className: "size-3.5"
|
|
286
288
|
})
|
|
@@ -289,23 +291,23 @@ function M(v, O, j, M = !1) {
|
|
|
289
291
|
label: Z("noType")
|
|
290
292
|
}]
|
|
291
293
|
});
|
|
292
|
-
let i = new Set(
|
|
293
|
-
for (let e of (Y ?? []).filter((e) => e.target === "issue" &&
|
|
294
|
+
let i = new Set(c(E.fields).map((e) => e.field));
|
|
295
|
+
for (let e of (Y ?? []).filter((e) => e.target === "issue" && o.includes(e.kind) && (a([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
|
|
294
296
|
let t = {
|
|
295
297
|
value: "none",
|
|
296
298
|
label: Q("noValue")
|
|
297
299
|
};
|
|
298
300
|
n.push({
|
|
299
|
-
key:
|
|
301
|
+
key: T(e.id),
|
|
300
302
|
label: e.name,
|
|
301
|
-
icon: /* @__PURE__ */
|
|
303
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
302
304
|
kind: "enum",
|
|
303
305
|
multiple: !0,
|
|
304
306
|
operators: ["is"],
|
|
305
307
|
options: e.kind === "person" ? [...G.map((e) => ({
|
|
306
308
|
value: e.user.username,
|
|
307
309
|
label: e.user.name,
|
|
308
|
-
icon: /* @__PURE__ */
|
|
310
|
+
icon: /* @__PURE__ */ S(b, {
|
|
309
311
|
name: e.user.name,
|
|
310
312
|
src: e.user.avatarUrl,
|
|
311
313
|
size: "xs",
|
|
@@ -317,7 +319,7 @@ function M(v, O, j, M = !1) {
|
|
|
317
319
|
}, t] : [...e.options.map((e) => ({
|
|
318
320
|
value: e.id ?? "",
|
|
319
321
|
label: e.name,
|
|
320
|
-
...e.color && { icon: /* @__PURE__ */
|
|
322
|
+
...e.color && { icon: /* @__PURE__ */ S("span", {
|
|
321
323
|
className: "size-2 rounded-full",
|
|
322
324
|
style: { background: e.color }
|
|
323
325
|
}) }
|
|
@@ -326,47 +328,49 @@ function M(v, O, j, M = !1) {
|
|
|
326
328
|
}
|
|
327
329
|
return n.push({
|
|
328
330
|
key: "overdue",
|
|
329
|
-
label:
|
|
330
|
-
icon: /* @__PURE__ */
|
|
331
|
+
label: j("overdue"),
|
|
332
|
+
icon: /* @__PURE__ */ S(f, {}),
|
|
331
333
|
kind: "boolean"
|
|
332
334
|
}), n;
|
|
333
335
|
}, [
|
|
334
336
|
X,
|
|
335
337
|
Z,
|
|
336
|
-
|
|
338
|
+
E.type,
|
|
337
339
|
Y,
|
|
338
340
|
Q,
|
|
339
|
-
|
|
341
|
+
E.fields,
|
|
342
|
+
j,
|
|
343
|
+
M,
|
|
340
344
|
N,
|
|
341
|
-
P,
|
|
342
345
|
L,
|
|
343
346
|
G,
|
|
347
|
+
P,
|
|
344
348
|
K,
|
|
345
349
|
R,
|
|
346
350
|
z,
|
|
347
351
|
B,
|
|
348
|
-
|
|
352
|
+
E.customer,
|
|
349
353
|
H,
|
|
350
354
|
U,
|
|
351
355
|
W,
|
|
352
356
|
V,
|
|
353
|
-
|
|
354
|
-
|
|
357
|
+
E.cycle,
|
|
358
|
+
E.status,
|
|
355
359
|
q,
|
|
356
360
|
J,
|
|
357
|
-
|
|
358
|
-
]), $ =
|
|
361
|
+
A
|
|
362
|
+
]), $ = de(E), me = {
|
|
359
363
|
value: $.length > 0 ? $ : null,
|
|
360
364
|
onChange: (e) => {
|
|
361
|
-
let t =
|
|
362
|
-
t.team !==
|
|
365
|
+
let t = fe(e);
|
|
366
|
+
t.team !== E.team && delete t.status, k(t);
|
|
363
367
|
}
|
|
364
368
|
};
|
|
365
|
-
return
|
|
366
|
-
storageKey: `issues:${
|
|
367
|
-
fields:
|
|
368
|
-
store:
|
|
369
|
+
return w({
|
|
370
|
+
storageKey: `issues:${s}`,
|
|
371
|
+
fields: pe,
|
|
372
|
+
store: me,
|
|
369
373
|
remember: !1
|
|
370
374
|
});
|
|
371
375
|
}
|
|
372
|
-
export {
|
|
376
|
+
export { A as useIssueFilters, k as withIssueFilters };
|
package/components/IssueGroup.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { teamsQuery as e } from "../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { useIssueMenu as t } from "../lib/issueMenu.js";
|
|
3
|
+
import { IssueRow as n } from "./IssueRow.js";
|
|
4
|
+
import { IssueSection as r } from "./IssueSection.js";
|
|
5
|
+
import { StatusIcon as i } from "./icons.js";
|
|
6
6
|
import { useOpenMenu as a } from "@parallelworks/ui";
|
|
7
7
|
import { useTranslations as o } from "use-intl";
|
|
8
8
|
import { jsx as s } from "react/jsx-runtime";
|
|
9
9
|
import { useQuery as c } from "@tanstack/react-query";
|
|
10
10
|
// src/components/IssueGroup.tsx
|
|
11
|
-
function l({ workspace:
|
|
12
|
-
let { data: d = [] } = c(e(
|
|
13
|
-
return /* @__PURE__ */ s(
|
|
11
|
+
function l({ workspace: i, title: o, icon: l, issues: u }) {
|
|
12
|
+
let { data: d = [] } = c(e(i)), f = a(), p = t(i);
|
|
13
|
+
return /* @__PURE__ */ s(r, {
|
|
14
14
|
label: o,
|
|
15
15
|
icon: l,
|
|
16
16
|
count: u.length,
|
|
17
|
-
children: u.map((e) => /* @__PURE__ */ s(
|
|
17
|
+
children: u.map((e) => /* @__PURE__ */ s(n, {
|
|
18
18
|
issue: e,
|
|
19
19
|
team: d.find((t) => t.id === e.teamId),
|
|
20
|
-
workspace:
|
|
20
|
+
workspace: i,
|
|
21
21
|
onContextMenu: (t) => f(t, p([e]))
|
|
22
22
|
}, e.id))
|
|
23
23
|
});
|
|
@@ -30,16 +30,16 @@ var u = [
|
|
|
30
30
|
"completed",
|
|
31
31
|
"canceled"
|
|
32
32
|
];
|
|
33
|
-
function d({ workspace: e, issues:
|
|
34
|
-
let
|
|
35
|
-
return u.map((
|
|
36
|
-
let a =
|
|
33
|
+
function d({ workspace: e, issues: t }) {
|
|
34
|
+
let n = o("issues.groups");
|
|
35
|
+
return u.map((r) => {
|
|
36
|
+
let a = t.filter((e) => e.status.category === r);
|
|
37
37
|
return a.length > 0 ? /* @__PURE__ */ s(l, {
|
|
38
38
|
workspace: e,
|
|
39
|
-
title: r
|
|
40
|
-
icon: /* @__PURE__ */ s(
|
|
39
|
+
title: n(r),
|
|
40
|
+
icon: /* @__PURE__ */ s(i, { category: r }),
|
|
41
41
|
issues: a
|
|
42
|
-
},
|
|
42
|
+
}, r) : null;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
export { l as IssueGroup, d as StatusGroups };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { invalidateIssueViews as n } from "../api/mutations.js";
|
|
3
|
+
import { Link as r } from "../lib/router.js";
|
|
4
4
|
import { Button as i, ErrorText as a, Modal as o, ModalTitle as s } from "@parallelworks/ui";
|
|
5
5
|
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
6
6
|
import { useErrorMessage as d } from "@parallelworks/problem/react";
|
|
@@ -15,20 +15,20 @@ function v(e) {
|
|
|
15
15
|
n && e(n.name, await n.text());
|
|
16
16
|
}, t.click();
|
|
17
17
|
}
|
|
18
|
-
function y({ workspace:
|
|
18
|
+
function y({ workspace: r, team: v, file: y, onClose: x }) {
|
|
19
19
|
let S = f("issueImport"), C = d(), w = _(), [T, E] = u(!1), D = g({
|
|
20
|
-
mutationFn: async (
|
|
20
|
+
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issues/import", {
|
|
21
21
|
params: { path: {
|
|
22
|
-
workspace:
|
|
22
|
+
workspace: r,
|
|
23
23
|
key: v
|
|
24
24
|
} },
|
|
25
25
|
body: {
|
|
26
26
|
csv: y.text,
|
|
27
|
-
dryRun:
|
|
27
|
+
dryRun: n
|
|
28
28
|
}
|
|
29
29
|
})),
|
|
30
30
|
onSuccess: (e, t) => {
|
|
31
|
-
t || (E(!0),
|
|
31
|
+
t || (E(!0), n(w, r));
|
|
32
32
|
}
|
|
33
33
|
}), O = l(!1), k = l(D.mutate);
|
|
34
34
|
c(() => {
|
|
@@ -62,7 +62,7 @@ function y({ workspace: n, team: v, file: y, onClose: x }) {
|
|
|
62
62
|
}) }), /* @__PURE__ */ m("ol", {
|
|
63
63
|
className: "mt-3 max-h-80 divide-y divide-border overflow-y-auto rounded-md border border-border",
|
|
64
64
|
children: A.rows.map((e) => /* @__PURE__ */ m(b, {
|
|
65
|
-
workspace:
|
|
65
|
+
workspace: r,
|
|
66
66
|
row: e
|
|
67
67
|
}, e.row))
|
|
68
68
|
})] })
|
|
@@ -84,7 +84,7 @@ function y({ workspace: n, team: v, file: y, onClose: x }) {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
function b({ workspace: e, row: t }) {
|
|
87
|
-
let
|
|
87
|
+
let n = f("issueImport");
|
|
88
88
|
return /* @__PURE__ */ h("li", {
|
|
89
89
|
className: "flex gap-3 px-3 py-2 text-xs",
|
|
90
90
|
children: [
|
|
@@ -97,19 +97,19 @@ function b({ workspace: e, row: t }) {
|
|
|
97
97
|
children: [
|
|
98
98
|
/* @__PURE__ */ m("span", {
|
|
99
99
|
className: t.skipped ? "text-muted-foreground line-through" : "",
|
|
100
|
-
children: t.title ||
|
|
100
|
+
children: t.title || n("untitled")
|
|
101
101
|
}),
|
|
102
102
|
t.skipped && /* @__PURE__ */ m("span", {
|
|
103
103
|
className: "ml-2 text-danger",
|
|
104
|
-
children:
|
|
104
|
+
children: n(`skipped.${t.skipped}`)
|
|
105
105
|
}),
|
|
106
106
|
t.warnings.length > 0 && /* @__PURE__ */ m("span", {
|
|
107
107
|
className: "mt-0.5 block text-muted-foreground",
|
|
108
|
-
children:
|
|
108
|
+
children: n("leftOut", { values: t.warnings.map((e) => `${e.field === "field" && e.name ? e.name : n(`field.${e.field}`)} “${e.value}”`).join(", ") })
|
|
109
109
|
})
|
|
110
110
|
]
|
|
111
111
|
}),
|
|
112
|
-
t.identifier && /* @__PURE__ */ m(
|
|
112
|
+
t.identifier && /* @__PURE__ */ m(r, {
|
|
113
113
|
to: "/$workspace/issues/$identifier",
|
|
114
114
|
params: {
|
|
115
115
|
workspace: e,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { usePeople as e } from "../lib/people.js";
|
|
2
|
+
import { PriorityIcon as t, StatusIcon as n, usePriorityNames as r } from "./icons.js";
|
|
3
3
|
import { ChartTooltipFrame as i, Select as a, SeriesSwatch as o } from "@parallelworks/ui";
|
|
4
4
|
import { useState as s } from "react";
|
|
5
5
|
import { useFormatter as c, useTranslations as l } from "use-intl";
|
|
@@ -51,7 +51,7 @@ function C(e) {
|
|
|
51
51
|
}
|
|
52
52
|
var w = "#1099e3", T = (e) => `color-mix(in oklch, ${w} ${e}%, var(--theme-panel-bg))`;
|
|
53
53
|
function E({ workspace: h, issues: y }) {
|
|
54
|
-
let b = l("insights"), w = l("issues.groups"), E = c(), D =
|
|
54
|
+
let b = l("insights"), w = l("issues.groups"), E = c(), D = r(), { nameOf: O } = e(h), [k, A] = s("count"), [j, M] = s("status"), [N, P] = s(null), F = k === "cycle" || k === "lead", I = (e) => e === void 0 ? "–" : F ? b("days", { days: E.number(e, { maximumFractionDigits: 1 }) }) : E.number(e, { maximumFractionDigits: 1 }), L = [b(`measures.${k}`)], R;
|
|
55
55
|
if (j === "week") {
|
|
56
56
|
let e = S(Date.now()), t = Math.min(e, ...y.map((e) => S(Date.parse(e.createdAt)))), n = Math.min(_, Math.max(v, Math.round((e - t) / g) + 1)), r = Array.from({ length: n }, (t, r) => e - (n - 1 - r) * g), i = (e, t) => !!t && S(Date.parse(t)) === e, a = (e) => E.dateTime(new Date(e), {
|
|
57
57
|
month: "short",
|
|
@@ -67,33 +67,33 @@ function E({ workspace: h, issues: y }) {
|
|
|
67
67
|
values: [x(y.filter((t) => i(e, t.createdAt)), k), x(y.filter((t) => t.status.category === "completed" && i(e, t.completedAt)), k)]
|
|
68
68
|
})));
|
|
69
69
|
} else {
|
|
70
|
-
let
|
|
71
|
-
let o =
|
|
72
|
-
key:
|
|
73
|
-
label:
|
|
70
|
+
let e = /* @__PURE__ */ new Map(), r = (t, n, r, i, a) => {
|
|
71
|
+
let o = e.get(t) ?? {
|
|
72
|
+
key: t,
|
|
73
|
+
label: n,
|
|
74
74
|
icon: i,
|
|
75
75
|
issues: [],
|
|
76
76
|
order: r,
|
|
77
77
|
values: []
|
|
78
78
|
};
|
|
79
|
-
o.issues.push(a),
|
|
79
|
+
o.issues.push(a), e.set(t, o);
|
|
80
80
|
};
|
|
81
|
-
for (let
|
|
82
|
-
category:
|
|
83
|
-
step:
|
|
84
|
-
}),
|
|
85
|
-
else if (j === "priority") r(String(
|
|
81
|
+
for (let e of y) if (j === "status") r(e.status.category, w(e.status.category), m.indexOf(e.status.category), /* @__PURE__ */ u(n, {
|
|
82
|
+
category: e.status.category,
|
|
83
|
+
step: e.status.step
|
|
84
|
+
}), e);
|
|
85
|
+
else if (j === "priority") r(String(e.priority), D[e.priority] ?? "", e.priority === 0 ? 5 : e.priority, /* @__PURE__ */ u(t, { priority: e.priority }), e);
|
|
86
86
|
else if (j === "label") {
|
|
87
|
-
|
|
88
|
-
for (let
|
|
87
|
+
e.labels.length === 0 && r("", b("none"), Infinity, null, e);
|
|
88
|
+
for (let t of e.labels) r(t.id, t.name, 0, /* @__PURE__ */ u("span", {
|
|
89
89
|
className: "size-2 rounded-full",
|
|
90
|
-
style: { background:
|
|
91
|
-
}),
|
|
90
|
+
style: { background: t.color }
|
|
91
|
+
}), e);
|
|
92
92
|
} else {
|
|
93
|
-
|
|
94
|
-
for (let
|
|
93
|
+
e.assignees.length === 0 && r("", b("unassigned"), Infinity, null, e);
|
|
94
|
+
for (let t of e.assignees) r(`${t.kind}:${t.handle}`, O(t.kind, t.handle), 0, null, e);
|
|
95
95
|
}
|
|
96
|
-
R = [...
|
|
96
|
+
R = [...e.values()].map((e) => ({
|
|
97
97
|
...e,
|
|
98
98
|
values: [x(e.issues, k)]
|
|
99
99
|
})).sort((e, t) => j === "status" || j === "priority" ? e.order - t.order : e.order - t.order || (t.values[0] ?? 0) - (e.values[0] ?? 0));
|