@parallelworks/tandem-web 0.171.1 → 0.171.3
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 +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- 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 +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- 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 +201 -164
- 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 +97 -92
- 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 +36 -34
- 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 +99 -97
- 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/triageSeen.js +2 -2
- 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 +202 -212
- 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 +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- 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/components/IssueEvent.js
CHANGED
|
@@ -1,133 +1,138 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { usePeople as e } from "../lib/people.js";
|
|
2
|
+
import { useTime as t } from "../lib/time.js";
|
|
3
|
+
import { TimelineItem as n, activityIcon as r } from "./ActivityTimeline.js";
|
|
4
|
+
import { ActorLink as i } from "./ActorLink.js";
|
|
5
|
+
import { useMoney as a } from "./AgentWork.js";
|
|
6
|
+
import { StatusIcon as o, usePriorityNames as s } from "./icons.js";
|
|
7
|
+
import { useFormatter as c, useTranslations as l } from "use-intl";
|
|
8
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
8
9
|
// src/components/IssueEvent.tsx
|
|
9
|
-
function
|
|
10
|
+
function d(e) {
|
|
10
11
|
return e.state === "open" ? e.review === "changes_requested" ? "changes_requested" : e.checks === "failing" ? "failing" : e.review === "approved" ? "approved" : e.checks === "passing" || e.checks === "pending" ? String(e.checks) : "open" : String(e.state);
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function f(e) {
|
|
13
14
|
return e.type === "related" ? "related" : e.type === "blocks" ? e.outgoing ? "blocks" : "blockedBy" : e.outgoing ? "duplicates" : "duplicatedBy";
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
...
|
|
18
|
-
name:
|
|
19
|
-
actor: (e) => /* @__PURE__ */
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
function p({ workspace: p, event: m }) {
|
|
17
|
+
let h = l("relations"), g = l("flow"), _ = l("issue.events"), v = c(), y = a(), b = s(), x = t(), { nameOf: S, actorName: C } = e(p), w = m.data, T = () => S(String(w.kind), String(w.handle)), E = (e, t = {}) => _.rich(e, {
|
|
18
|
+
...t,
|
|
19
|
+
name: C(m.actor),
|
|
20
|
+
actor: (e) => /* @__PURE__ */ u(i, {
|
|
21
|
+
workspace: p,
|
|
22
|
+
actor: m.actor,
|
|
23
|
+
children: /* @__PURE__ */ u("span", {
|
|
24
|
+
className: "font-medium text-foreground",
|
|
25
|
+
children: e
|
|
26
|
+
})
|
|
22
27
|
}),
|
|
23
28
|
icon: () => {
|
|
24
|
-
let
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
category:
|
|
27
|
-
step: Number(
|
|
29
|
+
let e = w.to;
|
|
30
|
+
return /* @__PURE__ */ u(o, {
|
|
31
|
+
category: e.category,
|
|
32
|
+
step: Number(e.step) || 0,
|
|
28
33
|
className: "inline align-[-2px]"
|
|
29
34
|
});
|
|
30
35
|
}
|
|
31
|
-
}),
|
|
36
|
+
}), D = (e, t) => {
|
|
32
37
|
let n = {
|
|
33
38
|
reason: t,
|
|
34
39
|
hasReason: t ? "yes" : "no"
|
|
35
40
|
};
|
|
36
41
|
switch (e) {
|
|
37
|
-
case "queued": return
|
|
38
|
-
case "working": return
|
|
39
|
-
case "awaiting_human": return
|
|
40
|
-
case "blocked_external": return
|
|
41
|
-
case "done_pending_verification": return
|
|
42
|
-
case "closed": return
|
|
43
|
-
case "stopped": return
|
|
44
|
-
default: return
|
|
42
|
+
case "queued": return E("runQueued", n);
|
|
43
|
+
case "working": return E("runWorking");
|
|
44
|
+
case "awaiting_human": return E("runAwaitingHuman");
|
|
45
|
+
case "blocked_external": return E("runBlocked", n);
|
|
46
|
+
case "done_pending_verification": return E("runDone");
|
|
47
|
+
case "closed": return E("runClosed");
|
|
48
|
+
case "stopped": return E("runStopped", n);
|
|
49
|
+
default: return E("runMoved", { state: e });
|
|
45
50
|
}
|
|
46
|
-
},
|
|
47
|
-
let t = String(e.limit), n = Number(e.used), r = Number(e.allowed), i = (e) => t === "cost" ?
|
|
48
|
-
return
|
|
51
|
+
}, O = (e) => {
|
|
52
|
+
let t = String(e.limit), n = Number(e.used), r = Number(e.allowed), i = (e) => t === "cost" ? y(e) : v.number(t === "minutes" ? Math.floor(e / 60) : e);
|
|
53
|
+
return E("runLimit", {
|
|
49
54
|
limit: t,
|
|
50
55
|
used: i(n),
|
|
51
56
|
allowed: i(r)
|
|
52
57
|
});
|
|
53
58
|
};
|
|
54
|
-
return /* @__PURE__ */
|
|
55
|
-
workspace:
|
|
56
|
-
icon:
|
|
57
|
-
actor:
|
|
58
|
-
at:
|
|
59
|
+
return /* @__PURE__ */ u(n, {
|
|
60
|
+
workspace: p,
|
|
61
|
+
icon: r(m.type, m.data),
|
|
62
|
+
actor: m.actor,
|
|
63
|
+
at: m.createdAt,
|
|
59
64
|
children: (() => {
|
|
60
|
-
switch (
|
|
61
|
-
case "issue.created": return
|
|
62
|
-
case "issue.title_changed": return
|
|
63
|
-
case "issue.body_changed": return
|
|
64
|
-
case "issue.status_changed": return
|
|
65
|
-
case "issue.archived": return
|
|
66
|
-
case "issue.restored": return
|
|
67
|
-
case "issue.priority_changed": return Number(
|
|
68
|
-
case "issue.assignee_added": return
|
|
69
|
-
case "issue.assignee_removed": return
|
|
65
|
+
switch (m.type) {
|
|
66
|
+
case "issue.created": return E("created");
|
|
67
|
+
case "issue.title_changed": return E("titleChanged", { title: String(w.to) });
|
|
68
|
+
case "issue.body_changed": return E("bodyChanged");
|
|
69
|
+
case "issue.status_changed": return w.reason === "inactive" ? E("autoClosed", { days: String(w.days) }) : E("statusChanged", { status: w.to.name });
|
|
70
|
+
case "issue.archived": return m.actor.kind === "system" ? E("archived") : E("archivedBy");
|
|
71
|
+
case "issue.restored": return E("restored");
|
|
72
|
+
case "issue.priority_changed": return Number(w.to) === 0 ? E("priorityRemoved") : E("priorityChanged", { priority: b[Number(w.to)] ?? "" });
|
|
73
|
+
case "issue.assignee_added": return w.kind === m.actor.kind && w.handle === m.actor.handle ? E("selfAssigned") : E("assigned", { assignee: T() });
|
|
74
|
+
case "issue.assignee_removed": return w.kind === m.actor.kind && w.handle === m.actor.handle ? E("selfUnassigned") : E("unassigned", { assignee: T() });
|
|
70
75
|
case "issue.team_changed": {
|
|
71
76
|
let e = (e) => {
|
|
72
77
|
let t = e;
|
|
73
78
|
return `${t?.key ?? ""}-${t?.number ?? ""}`;
|
|
74
79
|
};
|
|
75
|
-
return
|
|
76
|
-
from: e(
|
|
77
|
-
to: e(
|
|
80
|
+
return E("teamChanged", {
|
|
81
|
+
from: e(w.from),
|
|
82
|
+
to: e(w.to)
|
|
78
83
|
});
|
|
79
84
|
}
|
|
80
|
-
case "issue.parent_changed": return
|
|
85
|
+
case "issue.parent_changed": return w.identifier ? E("parentSet", { identifier: String(w.identifier) }) : E("parentCleared");
|
|
81
86
|
case "issue.relation_added":
|
|
82
|
-
case "issue.relation_removed": return
|
|
83
|
-
relation:
|
|
84
|
-
identifier: String(
|
|
87
|
+
case "issue.relation_removed": return E(m.type === "issue.relation_added" ? "relationAdded" : "relationRemoved", {
|
|
88
|
+
relation: h(`kinds.${f(w)}`).toLowerCase(),
|
|
89
|
+
identifier: String(w.identifier)
|
|
85
90
|
});
|
|
86
|
-
case "issue.attachment_added": return
|
|
87
|
-
case "issue.released": return
|
|
88
|
-
commit: String(
|
|
89
|
-
targets:
|
|
91
|
+
case "issue.attachment_added": return E("attachmentAdded", { file: String(w.name) });
|
|
92
|
+
case "issue.released": return E("released", {
|
|
93
|
+
commit: String(w.commit).slice(0, 7),
|
|
94
|
+
targets: w.targets?.join(", ") ?? ""
|
|
90
95
|
});
|
|
91
|
-
case "issue.stage_changed": return
|
|
96
|
+
case "issue.stage_changed": return w.to ? E("stageMoved", { stage: g(`stages.${String(w.to)}`) }) : E("stageLeft");
|
|
92
97
|
case "issue.area_changed": {
|
|
93
|
-
let e =
|
|
94
|
-
return e?.title ?
|
|
98
|
+
let e = w.to;
|
|
99
|
+
return e?.title ? E("areaSet", { area: e.title }) : E("areaCleared");
|
|
95
100
|
}
|
|
96
|
-
case "issue.project_changed": return
|
|
97
|
-
case "issue.milestone_changed": return
|
|
98
|
-
case "issue.cycle_changed": return
|
|
99
|
-
case "issue.estimate_changed": return Number(
|
|
100
|
-
case "issue.due_date_changed": return
|
|
101
|
-
case "issue.type_changed": return
|
|
102
|
-
case "issue.fields_changed": return
|
|
103
|
-
case "issue.label_added": return
|
|
104
|
-
case "issue.label_removed": return
|
|
105
|
-
case "run.created": return
|
|
106
|
-
case "run.state_changed": return
|
|
107
|
-
turns:
|
|
108
|
-
minutes:
|
|
109
|
-
cost:
|
|
110
|
-
}) :
|
|
111
|
-
case "issue.pull_request_changed": return
|
|
112
|
-
repository: String(
|
|
113
|
-
number: String(
|
|
114
|
-
status:
|
|
101
|
+
case "issue.project_changed": return w.name ? E("projectSet", { project: String(w.name) }) : E("projectCleared");
|
|
102
|
+
case "issue.milestone_changed": return w.name ? E("milestoneSet", { milestone: String(w.name) }) : E("milestoneCleared");
|
|
103
|
+
case "issue.cycle_changed": return w.number ? E("cycleSet", { number: String(w.number) }) : E("cycleCleared");
|
|
104
|
+
case "issue.estimate_changed": return Number(w.to) ? E("estimateSet", { points: v.number(Number(w.to)) }) : E("estimateCleared");
|
|
105
|
+
case "issue.due_date_changed": return w.to ? E("dueDateSet", { date: x.day(String(w.to)) }) : E("dueDateCleared");
|
|
106
|
+
case "issue.type_changed": return w.to ? E("typeChanged", { type: String(w.to) }) : E("typeCleared");
|
|
107
|
+
case "issue.fields_changed": return E("fieldsChanged", { fields: v.list(w.fields ?? []) });
|
|
108
|
+
case "issue.label_added": return E("labelAdded", { label: String(w.name) });
|
|
109
|
+
case "issue.label_removed": return E("labelRemoved", { label: String(w.name) });
|
|
110
|
+
case "run.created": return E("runCreated");
|
|
111
|
+
case "run.state_changed": return w.to === "stopped" && w.limit ? O(w) : w.to === "queued" && w.maxTurns ? E("runBudgetRaised", {
|
|
112
|
+
turns: v.number(Number(w.maxTurns)),
|
|
113
|
+
minutes: v.number(Number(w.maxMinutes)),
|
|
114
|
+
cost: y(Number(w.maxCostMicros))
|
|
115
|
+
}) : w.to === "closed" && w.cause === "merged" ? E("runMerged") : D(String(w.to), String(w.reason ?? ""));
|
|
116
|
+
case "issue.pull_request_changed": return E("pullRequest", {
|
|
117
|
+
repository: String(w.repository),
|
|
118
|
+
number: String(w.number),
|
|
119
|
+
status: d(w)
|
|
115
120
|
});
|
|
116
|
-
case "issue.pull_request_unlinked": return
|
|
117
|
-
repository: String(
|
|
118
|
-
number: String(
|
|
121
|
+
case "issue.pull_request_unlinked": return E("pullRequestUnlinked", {
|
|
122
|
+
repository: String(w.repository),
|
|
123
|
+
number: String(w.number)
|
|
119
124
|
});
|
|
120
|
-
case "issue.branch_changed": return
|
|
121
|
-
branch: String(
|
|
122
|
-
deleted:
|
|
125
|
+
case "issue.branch_changed": return E("branch", {
|
|
126
|
+
branch: String(w.branch),
|
|
127
|
+
deleted: w.deleted ? "yes" : "no"
|
|
123
128
|
});
|
|
124
|
-
case "issue.triage_accepted": return
|
|
125
|
-
case "issue.triage_declined": return
|
|
126
|
-
case "decision.requested": return
|
|
127
|
-
case "decision.answered": return
|
|
128
|
-
default: return
|
|
129
|
+
case "issue.triage_accepted": return E("triageAccepted");
|
|
130
|
+
case "issue.triage_declined": return E("triageDeclined");
|
|
131
|
+
case "decision.requested": return E("decisionRequested");
|
|
132
|
+
case "decision.answered": return E("decisionAnswered");
|
|
133
|
+
default: return E("other", { type: m.type });
|
|
129
134
|
}
|
|
130
135
|
})()
|
|
131
136
|
});
|
|
132
137
|
}
|
|
133
|
-
export {
|
|
138
|
+
export { p as EventLine };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
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 {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { projectRef as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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";
|
|
4
|
+
import { issueTypesQuery as ae } from "../lib/issueTypes.js";
|
|
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
11
|
import { Avatar as b } from "@parallelworks/ui";
|
|
12
12
|
import { useMemo as ue } from "react";
|
|
13
13
|
import { useTranslations as x } from "use-intl";
|
|
@@ -56,7 +56,7 @@ function de(e) {
|
|
|
56
56
|
values: r
|
|
57
57
|
});
|
|
58
58
|
let i = /* @__PURE__ */ new Map();
|
|
59
|
-
for (let t of
|
|
59
|
+
for (let t of c(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
|
|
60
60
|
for (let [e, n] of i) t.push({
|
|
61
61
|
field: T(e),
|
|
62
62
|
op: "is",
|
|
@@ -94,7 +94,7 @@ function fe(e) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
return n.length > 0 && (t.fields =
|
|
97
|
+
return n.length > 0 && (t.fields = s(n)), t;
|
|
98
98
|
}
|
|
99
99
|
function k(e, t) {
|
|
100
100
|
let n = { ...e };
|
|
@@ -104,14 +104,14 @@ function k(e, t) {
|
|
|
104
104
|
...t
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function A(
|
|
108
|
-
let j = x("issueFilters"), M = x("common"), N = x("planning"), P = C(r).data?.user.username, { data: F = [] } = C(ne(
|
|
109
|
-
...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 ?? ""),
|
|
110
110
|
enabled: !!V?.cyclesEnabled
|
|
111
111
|
}), { data: U = [] } = C({
|
|
112
|
-
...te(
|
|
112
|
+
...te(s, V?.key ?? ""),
|
|
113
113
|
enabled: !!V
|
|
114
|
-
}), 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(() => {
|
|
115
115
|
let e = {
|
|
116
116
|
multiple: !1,
|
|
117
117
|
operators: ["is"]
|
|
@@ -122,7 +122,7 @@ function A(h, E, k, A = !1) {
|
|
|
122
122
|
{
|
|
123
123
|
key: "team",
|
|
124
124
|
label: j("team"),
|
|
125
|
-
icon: /* @__PURE__ */ S(
|
|
125
|
+
icon: /* @__PURE__ */ S(se, {}),
|
|
126
126
|
kind: "enum",
|
|
127
127
|
...e,
|
|
128
128
|
required: A,
|
|
@@ -135,16 +135,16 @@ function A(h, E, k, A = !1) {
|
|
|
135
135
|
{
|
|
136
136
|
key: "assignee",
|
|
137
137
|
label: j("assignee"),
|
|
138
|
-
icon: /* @__PURE__ */ S(
|
|
138
|
+
icon: /* @__PURE__ */ S(_, {}),
|
|
139
139
|
kind: "people",
|
|
140
140
|
...e,
|
|
141
141
|
options: [
|
|
142
142
|
{
|
|
143
143
|
value: D,
|
|
144
144
|
label: j("noAssignee"),
|
|
145
|
-
icon: /* @__PURE__ */ S(
|
|
145
|
+
icon: /* @__PURE__ */ S(_, {})
|
|
146
146
|
},
|
|
147
|
-
...
|
|
147
|
+
...re(G, P).map((e) => ({
|
|
148
148
|
value: e.user.username,
|
|
149
149
|
label: e.user.name,
|
|
150
150
|
...e.user.username === P && { description: M("you") },
|
|
@@ -173,7 +173,7 @@ function A(h, E, k, A = !1) {
|
|
|
173
173
|
{
|
|
174
174
|
key: "creator",
|
|
175
175
|
label: j("creator"),
|
|
176
|
-
icon: /* @__PURE__ */ S(
|
|
176
|
+
icon: /* @__PURE__ */ S(_, {}),
|
|
177
177
|
kind: "people",
|
|
178
178
|
...e,
|
|
179
179
|
options: G.map((e) => ({
|
|
@@ -191,7 +191,7 @@ function A(h, E, k, A = !1) {
|
|
|
191
191
|
{
|
|
192
192
|
key: "priority",
|
|
193
193
|
label: j("priority"),
|
|
194
|
-
icon: /* @__PURE__ */ S(
|
|
194
|
+
icon: /* @__PURE__ */ S(m, { priority: 2 }),
|
|
195
195
|
kind: "enum",
|
|
196
196
|
operators: ["is"],
|
|
197
197
|
options: [
|
|
@@ -203,13 +203,13 @@ function A(h, E, k, A = !1) {
|
|
|
203
203
|
].map((e) => ({
|
|
204
204
|
value: String(e),
|
|
205
205
|
label: W[e] ?? "",
|
|
206
|
-
icon: /* @__PURE__ */ S(
|
|
206
|
+
icon: /* @__PURE__ */ S(m, { priority: e })
|
|
207
207
|
}))
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
key: "label",
|
|
211
211
|
label: j("label"),
|
|
212
|
-
icon: /* @__PURE__ */ S(
|
|
212
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
213
213
|
kind: "enum",
|
|
214
214
|
...e,
|
|
215
215
|
options: R.map((e) => ({
|
|
@@ -225,20 +225,20 @@ function A(h, E, k, A = !1) {
|
|
|
225
225
|
{
|
|
226
226
|
key: "project",
|
|
227
227
|
label: j("project"),
|
|
228
|
-
icon: /* @__PURE__ */ S(
|
|
228
|
+
icon: /* @__PURE__ */ S(ce, {}),
|
|
229
229
|
kind: "enum",
|
|
230
230
|
...e,
|
|
231
231
|
options: z.map((e) => ({
|
|
232
|
-
value:
|
|
232
|
+
value: l(e),
|
|
233
233
|
label: e.name,
|
|
234
|
-
icon: /* @__PURE__ */ S(
|
|
234
|
+
icon: /* @__PURE__ */ S(le, { status: e.status })
|
|
235
235
|
}))
|
|
236
236
|
}
|
|
237
237
|
];
|
|
238
238
|
(B.length > 0 || E.customer) && n.push({
|
|
239
239
|
key: "customer",
|
|
240
240
|
label: j("customer"),
|
|
241
|
-
icon: /* @__PURE__ */ S(
|
|
241
|
+
icon: /* @__PURE__ */ S(v, {}),
|
|
242
242
|
kind: "enum",
|
|
243
243
|
...e,
|
|
244
244
|
options: B.map((e) => ({
|
|
@@ -248,13 +248,13 @@ function A(h, E, k, A = !1) {
|
|
|
248
248
|
}), (V || E.status) && n.splice(3, 0, {
|
|
249
249
|
key: "status",
|
|
250
250
|
label: j("status"),
|
|
251
|
-
icon: /* @__PURE__ */ S(
|
|
251
|
+
icon: /* @__PURE__ */ S(h, { category: "started" }),
|
|
252
252
|
kind: "enum",
|
|
253
253
|
operators: ["is"],
|
|
254
254
|
options: U.map((e) => ({
|
|
255
|
-
value:
|
|
255
|
+
value: u(e),
|
|
256
256
|
label: e.name,
|
|
257
|
-
icon: /* @__PURE__ */ S(
|
|
257
|
+
icon: /* @__PURE__ */ S(h, {
|
|
258
258
|
category: e.category,
|
|
259
259
|
step: e.step
|
|
260
260
|
})
|
|
@@ -262,7 +262,7 @@ function A(h, E, k, A = !1) {
|
|
|
262
262
|
}), (V?.cyclesEnabled || E.cycle) && n.push({
|
|
263
263
|
key: "cycle",
|
|
264
264
|
label: j("cycle"),
|
|
265
|
-
icon: /* @__PURE__ */ S(
|
|
265
|
+
icon: /* @__PURE__ */ S(p, {}),
|
|
266
266
|
kind: "enum",
|
|
267
267
|
...e,
|
|
268
268
|
options: H.map((e) => ({
|
|
@@ -275,14 +275,14 @@ function A(h, E, k, A = !1) {
|
|
|
275
275
|
(r.length > 0 || E.type) && n.push({
|
|
276
276
|
key: "type",
|
|
277
277
|
label: Z("type"),
|
|
278
|
-
icon: /* @__PURE__ */ S(
|
|
278
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
279
279
|
kind: "enum",
|
|
280
280
|
multiple: !0,
|
|
281
281
|
operators: ["is"],
|
|
282
282
|
options: [...r.map((e) => ({
|
|
283
283
|
value: e.id,
|
|
284
284
|
label: e.name,
|
|
285
|
-
icon: /* @__PURE__ */ S(
|
|
285
|
+
icon: /* @__PURE__ */ S(d, {
|
|
286
286
|
type: e,
|
|
287
287
|
className: "size-3.5"
|
|
288
288
|
})
|
|
@@ -291,8 +291,8 @@ function A(h, E, k, A = !1) {
|
|
|
291
291
|
label: Z("noType")
|
|
292
292
|
}]
|
|
293
293
|
});
|
|
294
|
-
let i = new Set(
|
|
295
|
-
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)))) {
|
|
296
296
|
let t = {
|
|
297
297
|
value: "none",
|
|
298
298
|
label: Q("noValue")
|
|
@@ -300,7 +300,7 @@ function A(h, E, k, A = !1) {
|
|
|
300
300
|
n.push({
|
|
301
301
|
key: T(e.id),
|
|
302
302
|
label: e.name,
|
|
303
|
-
icon: /* @__PURE__ */ S(
|
|
303
|
+
icon: /* @__PURE__ */ S(g, {}),
|
|
304
304
|
kind: "enum",
|
|
305
305
|
multiple: !0,
|
|
306
306
|
operators: ["is"],
|
|
@@ -329,7 +329,7 @@ function A(h, E, k, A = !1) {
|
|
|
329
329
|
return n.push({
|
|
330
330
|
key: "overdue",
|
|
331
331
|
label: j("overdue"),
|
|
332
|
-
icon: /* @__PURE__ */ S(
|
|
332
|
+
icon: /* @__PURE__ */ S(f, {}),
|
|
333
333
|
kind: "boolean"
|
|
334
334
|
}), n;
|
|
335
335
|
}, [
|
|
@@ -367,7 +367,7 @@ function A(h, E, k, A = !1) {
|
|
|
367
367
|
}
|
|
368
368
|
};
|
|
369
369
|
return w({
|
|
370
|
-
storageKey: `issues:${
|
|
370
|
+
storageKey: `issues:${s}`,
|
|
371
371
|
fields: pe,
|
|
372
372
|
store: me,
|
|
373
373
|
remember: !1
|
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,
|