@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/IssueRow.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { usePeople as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TypeIcon as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { actorAvatar as e } from "../lib/avatar.js";
|
|
2
|
+
import { hasValue as t } from "../lib/customFields.js";
|
|
3
|
+
import { usePeople as n } from "../lib/people.js";
|
|
4
|
+
import { Link as r } from "../lib/router.js";
|
|
5
|
+
import { useTime as i } from "../lib/time.js";
|
|
6
|
+
import { useFieldText as a } from "./CustomFields.js";
|
|
7
|
+
import { TypeIcon as o } from "./IssueTypes.js";
|
|
8
|
+
import { PriorityIcon as s, ProjectIcon as c, StatusIcon as l, UsersIcon as u } from "./icons.js";
|
|
9
|
+
import { PersonHoverCard as d } from "./PersonHoverCard.js";
|
|
10
|
+
import { DueDate as f, SlaBadge as p, estimateShort as m } from "./Planning.js";
|
|
11
11
|
import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
|
|
12
12
|
import { memo as b } from "react";
|
|
13
13
|
import { useFormatter as x, useTranslations as S } from "use-intl";
|
|
14
14
|
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
15
|
// src/components/IssueRow.tsx
|
|
16
16
|
var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [], ref: F, style: I, index: L }) {
|
|
17
|
-
let R = S("issues"), z = x(), B =
|
|
17
|
+
let R = S("issues"), z = x(), B = i(), V = y(b.updatedAt, "compact"), { person: H, nameOf: U, avatarOf: W } = n(E), G = a(E);
|
|
18
18
|
return /* @__PURE__ */ w("li", {
|
|
19
19
|
ref: F,
|
|
20
20
|
style: I,
|
|
@@ -41,7 +41,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
41
41
|
})
|
|
42
42
|
})
|
|
43
43
|
}),
|
|
44
|
-
/* @__PURE__ */ w(
|
|
44
|
+
/* @__PURE__ */ w(r, {
|
|
45
45
|
to: "/$workspace/issues/$identifier",
|
|
46
46
|
params: {
|
|
47
47
|
workspace: E,
|
|
@@ -51,19 +51,19 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
51
51
|
onContextMenu: N,
|
|
52
52
|
className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
|
|
53
53
|
children: [
|
|
54
|
-
/* @__PURE__ */ C(
|
|
54
|
+
/* @__PURE__ */ C(s, { priority: b.priority }),
|
|
55
55
|
/* @__PURE__ */ w("span", {
|
|
56
|
-
className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${b.type ? "w-
|
|
56
|
+
className: `flex shrink-0 items-center gap-1 text-xs whitespace-nowrap text-muted-foreground ${b.type ? "min-w-28" : "min-w-24"}`,
|
|
57
57
|
children: [b.type && /* @__PURE__ */ C(v, {
|
|
58
58
|
content: b.type.name,
|
|
59
59
|
describesAnchor: !0,
|
|
60
|
-
children: /* @__PURE__ */ C(
|
|
60
|
+
children: /* @__PURE__ */ C(o, {
|
|
61
61
|
type: b.type,
|
|
62
62
|
className: "size-3.5"
|
|
63
63
|
})
|
|
64
64
|
}), b.identifier]
|
|
65
65
|
}),
|
|
66
|
-
/* @__PURE__ */ C(
|
|
66
|
+
/* @__PURE__ */ C(l, {
|
|
67
67
|
category: b.status.category,
|
|
68
68
|
step: b.status.step
|
|
69
69
|
}),
|
|
@@ -75,21 +75,21 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
75
75
|
content: R("requestCount", { count: b.requests }),
|
|
76
76
|
children: /* @__PURE__ */ w("span", {
|
|
77
77
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
|
|
78
|
-
children: [/* @__PURE__ */ C(
|
|
78
|
+
children: [/* @__PURE__ */ C(u, { className: "size-3" }), b.requests]
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
81
|
b.project && /* @__PURE__ */ w("span", {
|
|
82
82
|
className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
|
|
83
|
-
children: [/* @__PURE__ */ C(
|
|
83
|
+
children: [/* @__PURE__ */ C(c, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
|
|
84
84
|
className: "truncate",
|
|
85
85
|
children: b.project.name
|
|
86
86
|
})]
|
|
87
87
|
}),
|
|
88
|
-
b.dueDate && /* @__PURE__ */ C(
|
|
88
|
+
b.dueDate && /* @__PURE__ */ C(f, {
|
|
89
89
|
date: b.dueDate,
|
|
90
90
|
closed: b.status.category === "completed" || b.status.category === "canceled"
|
|
91
91
|
}),
|
|
92
|
-
/* @__PURE__ */ C(
|
|
92
|
+
/* @__PURE__ */ C(p, {
|
|
93
93
|
issue: b,
|
|
94
94
|
team: T
|
|
95
95
|
}),
|
|
@@ -98,12 +98,12 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
98
98
|
describesAnchor: !0,
|
|
99
99
|
children: /* @__PURE__ */ C("span", {
|
|
100
100
|
className: "hidden h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border px-1 text-[11px] text-muted-foreground tabular-nums sm:inline-flex",
|
|
101
|
-
children:
|
|
101
|
+
children: m(b.estimate, T?.estimateScale)
|
|
102
102
|
})
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ w("span", {
|
|
105
105
|
className: "hidden shrink-0 gap-1 md:flex",
|
|
106
|
-
children: [P.filter((e) =>
|
|
106
|
+
children: [P.filter((e) => t(b.fields[e.id])).map((e) => /* @__PURE__ */ C(v, {
|
|
107
107
|
content: e.name,
|
|
108
108
|
describesAnchor: !0,
|
|
109
109
|
children: /* @__PURE__ */ C("span", {
|
|
@@ -124,7 +124,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
124
124
|
size: "xs",
|
|
125
125
|
ringColor: "var(--avatar-person-text)",
|
|
126
126
|
className: "shrink-0",
|
|
127
|
-
children: k.map((e) => /* @__PURE__ */ C(
|
|
127
|
+
children: k.map((e) => /* @__PURE__ */ C(d, {
|
|
128
128
|
workspace: E,
|
|
129
129
|
handle: e,
|
|
130
130
|
children: /* @__PURE__ */ C(h, {
|
|
@@ -136,17 +136,17 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
|
|
|
136
136
|
}),
|
|
137
137
|
/* @__PURE__ */ C(g, {
|
|
138
138
|
size: "sm",
|
|
139
|
-
children: b.assignees.map((
|
|
139
|
+
children: b.assignees.map((t) => /* @__PURE__ */ C(d, {
|
|
140
140
|
workspace: E,
|
|
141
|
-
kind:
|
|
142
|
-
handle:
|
|
141
|
+
kind: t.kind,
|
|
142
|
+
handle: t.handle,
|
|
143
143
|
children: /* @__PURE__ */ C(h, {
|
|
144
|
-
...
|
|
145
|
-
name: U(
|
|
146
|
-
src: W(
|
|
147
|
-
tooltip:
|
|
144
|
+
...e(t.kind),
|
|
145
|
+
name: U(t.kind, t.handle),
|
|
146
|
+
src: W(t.kind, t.handle),
|
|
147
|
+
tooltip: t.kind !== "user"
|
|
148
148
|
})
|
|
149
|
-
}, `${
|
|
149
|
+
}, `${t.kind}:${t.handle}`))
|
|
150
150
|
}),
|
|
151
151
|
/* @__PURE__ */ C(v, {
|
|
152
152
|
content: R("updated", { time: B.full(b.updatedAt) }),
|
|
@@ -1,70 +1,72 @@
|
|
|
1
1
|
import { issueSentryQuery as e } from "../api/queries.js";
|
|
2
2
|
import { externalUrl as t } from "../lib/externalUrl.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { Card as i, TagList as a } from "@parallelworks/ui";
|
|
6
|
-
import { useTranslations as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import { useQuery as
|
|
3
|
+
import { useTime as n } from "../lib/time.js";
|
|
4
|
+
import { AlertIcon as r } from "./icons.js";
|
|
5
|
+
import { Card as i, TagList as a, Tooltip as o } from "@parallelworks/ui";
|
|
6
|
+
import { useTranslations as s } from "use-intl";
|
|
7
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
8
|
+
import { useQuery as u } from "@tanstack/react-query";
|
|
9
9
|
// src/components/IssueSentry.tsx
|
|
10
|
-
var
|
|
10
|
+
var d = {
|
|
11
11
|
fatal: "text-danger",
|
|
12
12
|
error: "text-danger",
|
|
13
13
|
warning: "text-warning"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
return !
|
|
15
|
+
function f({ workspace: f, identifier: p }) {
|
|
16
|
+
let m = s("sentry"), h = n(), { data: g } = u(e(f, p));
|
|
17
|
+
return !g?.enabled || g.links.length === 0 ? null : /* @__PURE__ */ l("section", {
|
|
18
18
|
className: "mt-6",
|
|
19
|
-
"aria-label":
|
|
20
|
-
children: [/* @__PURE__ */
|
|
19
|
+
"aria-label": m("issueSection"),
|
|
20
|
+
children: [/* @__PURE__ */ c("h2", {
|
|
21
21
|
className: "text-xs font-medium text-muted-foreground",
|
|
22
|
-
children:
|
|
23
|
-
}), /* @__PURE__ */
|
|
22
|
+
children: m("issueSection")
|
|
23
|
+
}), /* @__PURE__ */ c(i, {
|
|
24
24
|
size: "fill",
|
|
25
25
|
padding: "none",
|
|
26
26
|
divided: !0,
|
|
27
27
|
interactive: !1,
|
|
28
|
-
render: /* @__PURE__ */
|
|
28
|
+
render: /* @__PURE__ */ c("ul", {}),
|
|
29
29
|
className: "mt-1",
|
|
30
|
-
children:
|
|
30
|
+
children: g.links.map((e) => /* @__PURE__ */ c("li", {
|
|
31
31
|
className: "hover:bg-muted",
|
|
32
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ l("a", {
|
|
33
33
|
href: t(e.url),
|
|
34
34
|
target: "_blank",
|
|
35
35
|
rel: "noopener noreferrer",
|
|
36
36
|
className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ c(r, { className: `size-4 shrink-0 ${d[e.level] ?? "text-muted-foreground"}` }),
|
|
39
|
+
/* @__PURE__ */ c("span", {
|
|
40
40
|
className: "shrink-0 text-muted-foreground",
|
|
41
41
|
children: e.shortId || e.project
|
|
42
42
|
}),
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ c("span", {
|
|
44
44
|
className: "min-w-0 flex-1 truncate",
|
|
45
45
|
children: e.title
|
|
46
46
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ l("span", {
|
|
48
48
|
className: "flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground",
|
|
49
49
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
e.lastSeen && /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
children:
|
|
50
|
+
/* @__PURE__ */ c("span", { children: m("events", { count: e.events }) }),
|
|
51
|
+
/* @__PURE__ */ c("span", { children: m("users", { count: e.users }) }),
|
|
52
|
+
e.lastSeen && /* @__PURE__ */ c(o, {
|
|
53
|
+
content: h.full(e.lastSeen),
|
|
54
|
+
children: /* @__PURE__ */ c("span", { children: m("lastSeen", { when: h.relative(e.lastSeen) }) })
|
|
55
55
|
}),
|
|
56
|
-
e.firstSeen && /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
e.firstSeen && /* @__PURE__ */ c(o, {
|
|
57
|
+
content: h.full(e.firstSeen),
|
|
58
|
+
children: /* @__PURE__ */ c("span", {
|
|
59
|
+
className: "hidden sm:inline",
|
|
60
|
+
children: m("firstSeen", { when: h.relative(e.firstSeen) })
|
|
61
|
+
})
|
|
60
62
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ c("span", {
|
|
62
64
|
className: e.status === "resolved" ? "text-success" : "",
|
|
63
|
-
children:
|
|
65
|
+
children: m(`status.${e.status === "resolved" || e.status === "ignored" ? e.status : "unresolved"}`)
|
|
64
66
|
})
|
|
65
67
|
]
|
|
66
68
|
}),
|
|
67
|
-
e.repositories.length > 0 && /* @__PURE__ */
|
|
69
|
+
e.repositories.length > 0 && /* @__PURE__ */ c(a, {
|
|
68
70
|
className: "basis-full",
|
|
69
71
|
mono: !0,
|
|
70
72
|
tags: e.repositories.map((e) => ({
|
|
@@ -78,4 +80,4 @@ function d({ workspace: d, identifier: f }) {
|
|
|
78
80
|
})]
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
|
-
export {
|
|
83
|
+
export { f as IssueSentry };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { issueTemplatesQuery as n, labelsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { TypeIcon as
|
|
9
|
-
import {
|
|
3
|
+
import { useConfirm as a } from "../lib/confirm.js";
|
|
4
|
+
import { customFieldsQuery as o, fieldsFor as s } from "../lib/customFields.js";
|
|
5
|
+
import { issueTypesQuery as c, typesFor as l } from "../lib/issueTypes.js";
|
|
6
|
+
import { PropertyField as u } from "./DocProperties.js";
|
|
7
|
+
import { Editor as d } from "./Editor.js";
|
|
8
|
+
import { TypeIcon as f } from "./IssueTypes.js";
|
|
9
|
+
import { AddIcon as p, PriorityIcon as m, usePriorityNames as h } from "./icons.js";
|
|
10
10
|
import { Button as g, Combobox as _, DatePicker as v, Input as y, Modal as ee, Select as b, SettingsCard as x, menuDivider as S } from "@parallelworks/ui";
|
|
11
11
|
import { useId as C, useState as w } from "react";
|
|
12
12
|
import { useErrorMessage as te } from "@parallelworks/problem/react";
|
|
@@ -16,7 +16,7 @@ import { useMutation as k, useQuery as A, useQueryClient as j } from "@tanstack/
|
|
|
16
16
|
import { MoreButton as M } from "@parallelworks/ui/list";
|
|
17
17
|
// src/components/IssueTemplates.tsx
|
|
18
18
|
function N({ workspace: r, teamKey: i, isAdmin: o }) {
|
|
19
|
-
let s = E("issueTemplates"), c = T(), l = E("common"), u = j(), { data:
|
|
19
|
+
let s = E("issueTemplates"), c = T(), l = E("common"), u = j(), { data: d = [] } = A(n(r, i)), [f, m] = w(null), { confirm: h, dialog: _ } = a(), v = k({
|
|
20
20
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", { params: { path: {
|
|
21
21
|
workspace: r,
|
|
22
22
|
key: i,
|
|
@@ -30,15 +30,15 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
|
|
|
30
30
|
action: o && /* @__PURE__ */ D(g, {
|
|
31
31
|
variant: "outline",
|
|
32
32
|
size: "sm",
|
|
33
|
-
icon: /* @__PURE__ */ D(
|
|
33
|
+
icon: /* @__PURE__ */ D(p, { className: "size-3.5" }),
|
|
34
34
|
onClick: () => m("new"),
|
|
35
35
|
children: s("new")
|
|
36
36
|
}),
|
|
37
37
|
children: [
|
|
38
|
-
|
|
38
|
+
d.length === 0 ? /* @__PURE__ */ D("p", {
|
|
39
39
|
className: "px-4 py-3 text-sm text-muted-foreground",
|
|
40
40
|
children: s("none")
|
|
41
|
-
}) : /* @__PURE__ */ D("ul", { children:
|
|
41
|
+
}) : /* @__PURE__ */ D("ul", { children: d.map((e) => /* @__PURE__ */ O("li", {
|
|
42
42
|
className: "flex items-center gap-3 border-b border-border/60 px-4 py-2.5 last:border-b-0",
|
|
43
43
|
children: [/* @__PURE__ */ O("span", {
|
|
44
44
|
className: "min-w-0 flex-1",
|
|
@@ -80,18 +80,18 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
|
|
|
80
80
|
]
|
|
81
81
|
})]
|
|
82
82
|
}, e.id)) }),
|
|
83
|
-
|
|
83
|
+
f && /* @__PURE__ */ D(P, {
|
|
84
84
|
workspace: r,
|
|
85
85
|
teamKey: i,
|
|
86
|
-
template:
|
|
86
|
+
template: f === "new" ? void 0 : f,
|
|
87
87
|
onClose: () => m(null)
|
|
88
88
|
}),
|
|
89
89
|
_
|
|
90
90
|
]
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
function P({ workspace: a, teamKey:
|
|
94
|
-
let M = E("issueTemplates"), N = T(), P = E("common"), R = te(), z =
|
|
93
|
+
function P({ workspace: a, teamKey: p, template: x, onClose: S }) {
|
|
94
|
+
let M = E("issueTemplates"), N = T(), P = E("common"), R = te(), z = h(), B = j(), { data: V = [] } = A(r(a)), [H, U] = w({
|
|
95
95
|
name: x?.name ?? "",
|
|
96
96
|
title: x?.title ?? "",
|
|
97
97
|
body: x?.body ?? "",
|
|
@@ -111,21 +111,21 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
|
|
|
111
111
|
mutationFn: async () => t(x ? await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", {
|
|
112
112
|
params: { path: {
|
|
113
113
|
workspace: a,
|
|
114
|
-
key:
|
|
114
|
+
key: p,
|
|
115
115
|
templateId: x.id
|
|
116
116
|
} },
|
|
117
117
|
body: H
|
|
118
118
|
}) : await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates", {
|
|
119
119
|
params: { path: {
|
|
120
120
|
workspace: a,
|
|
121
|
-
key:
|
|
121
|
+
key: p
|
|
122
122
|
} },
|
|
123
123
|
body: H
|
|
124
124
|
})),
|
|
125
125
|
onSuccess: () => {
|
|
126
|
-
B.invalidateQueries({ queryKey: n(a,
|
|
126
|
+
B.invalidateQueries({ queryKey: n(a, p).queryKey }), S();
|
|
127
127
|
}
|
|
128
|
-
}), Y = V.filter((e) => H.labelIds?.includes(e.id)), { data: X = [] } = A(i(a)), { data: ie } = A(
|
|
128
|
+
}), Y = V.filter((e) => H.labelIds?.includes(e.id)), { data: X = [] } = A(i(a)), { data: ie } = A(o(a)), Z = s(ie, "issue", X.find((e) => e.key === p)?.id), ae = E("customFields"), Q = E("issueTypes"), { data: oe } = A(c(a)), $ = l(oe, X.find((e) => e.key === p)?.id);
|
|
129
129
|
return /* @__PURE__ */ D(ee, {
|
|
130
130
|
open: !0,
|
|
131
131
|
onClose: S,
|
|
@@ -179,7 +179,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
|
|
|
179
179
|
className: "text-xs font-medium text-muted-foreground",
|
|
180
180
|
children: [M("body"), /* @__PURE__ */ D("div", {
|
|
181
181
|
className: "mt-1 min-h-32 rounded-md border border-border px-3 py-2 text-sm font-normal text-foreground",
|
|
182
|
-
children: /* @__PURE__ */ D(
|
|
182
|
+
children: /* @__PURE__ */ D(d, {
|
|
183
183
|
value: H.body ?? "",
|
|
184
184
|
onChange: (e) => q({ body: e }),
|
|
185
185
|
label: M("body"),
|
|
@@ -198,7 +198,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
|
|
|
198
198
|
items: z.map((e, t) => ({
|
|
199
199
|
value: String(t),
|
|
200
200
|
label: e,
|
|
201
|
-
icon: /* @__PURE__ */ D(
|
|
201
|
+
icon: /* @__PURE__ */ D(m, { priority: t })
|
|
202
202
|
})),
|
|
203
203
|
onValueChange: (e) => e !== null && q({ priority: Number(e) }),
|
|
204
204
|
"aria-label": M("priority")
|
|
@@ -244,7 +244,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
|
|
|
244
244
|
}, ...$.map((e) => ({
|
|
245
245
|
value: e.id,
|
|
246
246
|
label: e.name,
|
|
247
|
-
icon: /* @__PURE__ */ D(
|
|
247
|
+
icon: /* @__PURE__ */ D(f, {
|
|
248
248
|
type: e,
|
|
249
249
|
className: "size-3.5"
|
|
250
250
|
})
|
|
@@ -273,7 +273,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
|
|
|
273
273
|
children: e.name
|
|
274
274
|
}), /* @__PURE__ */ D("div", {
|
|
275
275
|
className: "min-w-0 flex-1",
|
|
276
|
-
children: /* @__PURE__ */ D(
|
|
276
|
+
children: /* @__PURE__ */ D(u, {
|
|
277
277
|
workspace: a,
|
|
278
278
|
property: e,
|
|
279
279
|
value: H.fields?.[e.id],
|
package/components/IssueTypes.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { teamsQuery as e } from "../api/queries.js";
|
|
2
|
-
import {
|
|
2
|
+
import { useConfirm as t } from "../lib/confirm.js";
|
|
3
3
|
import { customFieldsQuery as n } from "../lib/customFields.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { issueTypesQuery as r, useIssueTypeActions as i } from "../lib/issueTypes.js";
|
|
5
|
+
import { AddIcon as a } from "./icons.js";
|
|
6
6
|
import { Button as o, ColorInput as s, ErrorText as c, IconButton as l, Input as u, Select as d, SettingsCard as f, Textarea as p, menuDivider as m, useOpenMenu as h } from "@parallelworks/ui";
|
|
7
7
|
import { useState as g } from "react";
|
|
8
8
|
import { useErrorMessage as _ } from "@parallelworks/problem/react";
|
|
@@ -23,44 +23,44 @@ function S({ type: e, className: t = "size-4" }) {
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function C({ workspace: e }) {
|
|
26
|
-
let
|
|
26
|
+
let t = v("issueTypes"), { data: n = [] } = x(r(e)), [i, s] = g(!1);
|
|
27
27
|
return /* @__PURE__ */ b(f, {
|
|
28
|
-
title:
|
|
29
|
-
description:
|
|
28
|
+
title: t("title"),
|
|
29
|
+
description: t("description"),
|
|
30
30
|
action: /* @__PURE__ */ y(o, {
|
|
31
31
|
size: "sm",
|
|
32
|
-
icon: /* @__PURE__ */ y(
|
|
32
|
+
icon: /* @__PURE__ */ y(a, {}),
|
|
33
33
|
onClick: () => s(!0),
|
|
34
|
-
children:
|
|
34
|
+
children: t("add")
|
|
35
35
|
}),
|
|
36
|
-
children: [
|
|
36
|
+
children: [i && /* @__PURE__ */ y("div", {
|
|
37
37
|
className: "p-2",
|
|
38
38
|
children: /* @__PURE__ */ y(T, {
|
|
39
39
|
workspace: e,
|
|
40
40
|
onDone: () => s(!1)
|
|
41
41
|
})
|
|
42
|
-
}),
|
|
42
|
+
}), n.length === 0 && !i ? /* @__PURE__ */ y("p", {
|
|
43
43
|
className: "px-3 py-3 text-sm text-muted-foreground",
|
|
44
|
-
children:
|
|
44
|
+
children: t("none")
|
|
45
45
|
}) : /* @__PURE__ */ y("ul", {
|
|
46
46
|
className: "divide-y divide-border",
|
|
47
|
-
children:
|
|
47
|
+
children: n.map((t, r) => /* @__PURE__ */ y(w, {
|
|
48
48
|
workspace: e,
|
|
49
49
|
type: t,
|
|
50
|
-
before: r
|
|
51
|
-
after: r
|
|
50
|
+
before: n[r - 1],
|
|
51
|
+
after: n[r + 1]
|
|
52
52
|
}, t.id))
|
|
53
53
|
})]
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
|
-
function w({ workspace:
|
|
57
|
-
let s = v("issueTypes"), c =
|
|
56
|
+
function w({ workspace: n, type: r, before: a, after: o }) {
|
|
57
|
+
let s = v("issueTypes"), c = i(n), u = h(), { confirm: d, dialog: f } = t(), [p, _] = g(!1), { data: C = [] } = x(e(n)), w = (e) => {
|
|
58
58
|
let t = {
|
|
59
|
-
...
|
|
59
|
+
...r,
|
|
60
60
|
...e
|
|
61
61
|
};
|
|
62
62
|
return {
|
|
63
|
-
id:
|
|
63
|
+
id: r.id,
|
|
64
64
|
name: t.name,
|
|
65
65
|
description: t.description ?? "",
|
|
66
66
|
icon: t.icon ?? "",
|
|
@@ -75,11 +75,11 @@ function w({ workspace: t, type: n, before: i, after: o }) {
|
|
|
75
75
|
label: s("edit"),
|
|
76
76
|
onClick: () => _(!0)
|
|
77
77
|
},
|
|
78
|
-
...
|
|
78
|
+
...a ? [{
|
|
79
79
|
label: s("moveUp"),
|
|
80
80
|
onClick: () => c.update.mutate({
|
|
81
81
|
...w({}),
|
|
82
|
-
position:
|
|
82
|
+
position: a.position - .5
|
|
83
83
|
})
|
|
84
84
|
}] : [],
|
|
85
85
|
...o ? [{
|
|
@@ -90,10 +90,10 @@ function w({ workspace: t, type: n, before: i, after: o }) {
|
|
|
90
90
|
})
|
|
91
91
|
}] : [],
|
|
92
92
|
{
|
|
93
|
-
label:
|
|
93
|
+
label: r.archivedAt ? s("restore") : s("archive"),
|
|
94
94
|
onClick: () => c.update.mutate({
|
|
95
95
|
...w({}),
|
|
96
|
-
archived: !
|
|
96
|
+
archived: !r.archivedAt
|
|
97
97
|
})
|
|
98
98
|
},
|
|
99
99
|
m,
|
|
@@ -101,38 +101,38 @@ function w({ workspace: t, type: n, before: i, after: o }) {
|
|
|
101
101
|
label: s("delete"),
|
|
102
102
|
destructive: !0,
|
|
103
103
|
onClick: () => d({
|
|
104
|
-
title: s("deleteTitle", { name:
|
|
105
|
-
description: s("deleteDescription", { count:
|
|
104
|
+
title: s("deleteTitle", { name: r.name }),
|
|
105
|
+
description: s("deleteDescription", { count: r.issues }),
|
|
106
106
|
confirmLabel: s("delete"),
|
|
107
|
-
onConfirm: () => c.remove.mutateAsync(
|
|
107
|
+
onConfirm: () => c.remove.mutateAsync(r.id)
|
|
108
108
|
})
|
|
109
109
|
}
|
|
110
110
|
];
|
|
111
111
|
if (p) return /* @__PURE__ */ y("li", {
|
|
112
112
|
className: "p-2",
|
|
113
113
|
children: /* @__PURE__ */ y(T, {
|
|
114
|
-
workspace:
|
|
115
|
-
type:
|
|
114
|
+
workspace: n,
|
|
115
|
+
type: r,
|
|
116
116
|
onDone: () => _(!1)
|
|
117
117
|
})
|
|
118
118
|
});
|
|
119
|
-
let D =
|
|
119
|
+
let D = r.teamIds.map((e) => C.find((t) => t.id === e)?.name).filter(Boolean).join(", ");
|
|
120
120
|
return /* @__PURE__ */ b("li", {
|
|
121
121
|
className: "flex min-h-10 items-center gap-3 px-3 py-1.5",
|
|
122
122
|
onContextMenu: (e) => u(e, E()),
|
|
123
123
|
children: [
|
|
124
|
-
/* @__PURE__ */ y(S, { type:
|
|
124
|
+
/* @__PURE__ */ y(S, { type: r }),
|
|
125
125
|
/* @__PURE__ */ b("div", {
|
|
126
126
|
className: "min-w-0 flex-1",
|
|
127
127
|
children: [/* @__PURE__ */ y("p", {
|
|
128
|
-
className: `truncate text-sm ${
|
|
129
|
-
children:
|
|
130
|
-
}),
|
|
128
|
+
className: `truncate text-sm ${r.archivedAt ? "text-muted-foreground" : ""}`,
|
|
129
|
+
children: r.name
|
|
130
|
+
}), r.description && /* @__PURE__ */ y("p", {
|
|
131
131
|
className: "truncate text-xs text-muted-foreground",
|
|
132
|
-
children:
|
|
132
|
+
children: r.description
|
|
133
133
|
})]
|
|
134
134
|
}),
|
|
135
|
-
|
|
135
|
+
r.archivedAt && /* @__PURE__ */ y("span", {
|
|
136
136
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
137
137
|
children: s("archived")
|
|
138
138
|
}),
|
|
@@ -142,12 +142,12 @@ function w({ workspace: t, type: n, before: i, after: o }) {
|
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ y("span", {
|
|
144
144
|
className: "w-20 shrink-0 text-right text-xs tabular-nums text-muted-foreground",
|
|
145
|
-
children: s("issues", { count:
|
|
145
|
+
children: s("issues", { count: r.issues })
|
|
146
146
|
}),
|
|
147
147
|
/* @__PURE__ */ y(l, {
|
|
148
148
|
variant: "ghost",
|
|
149
149
|
size: "sm",
|
|
150
|
-
label: s("actions", { name:
|
|
150
|
+
label: s("actions", { name: r.name }),
|
|
151
151
|
icon: /* @__PURE__ */ y("span", {
|
|
152
152
|
"aria-hidden": !0,
|
|
153
153
|
children: "⋯"
|
|
@@ -158,8 +158,8 @@ function w({ workspace: t, type: n, before: i, after: o }) {
|
|
|
158
158
|
]
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
function T({ workspace: t, type: r, onDone:
|
|
162
|
-
let l = v("issueTypes"), f = v("common"), m = _(), h =
|
|
161
|
+
function T({ workspace: t, type: r, onDone: a }) {
|
|
162
|
+
let l = v("issueTypes"), f = v("common"), m = _(), h = i(t), { data: S = [] } = x(e(t)), { data: C = [] } = x(n(t)), w = C.filter((e) => e.target === "issue" && !e.archivedAt), [T, E] = g(r?.name ?? ""), [D, O] = g(r?.description ?? ""), [k, A] = g(r?.icon ?? ""), [j, M] = g(r?.color || "#6e7781"), [N, P] = g(r?.teamIds ?? []), [F, I] = g(r?.fieldIds ?? []), [L, R] = g(r?.requiredFieldIds ?? []), [z, B] = g(r?.template ?? ""), V = r ? h.update : h.create, H = F.length > 0 ? w.filter((e) => F.includes(e.id)) : w, U = (e) => {
|
|
163
163
|
e.preventDefault();
|
|
164
164
|
let t = {
|
|
165
165
|
name: T,
|
|
@@ -174,7 +174,7 @@ function T({ workspace: t, type: r, onDone: i }) {
|
|
|
174
174
|
r ? h.update.mutate({
|
|
175
175
|
id: r.id,
|
|
176
176
|
...t
|
|
177
|
-
}, { onSuccess:
|
|
177
|
+
}, { onSuccess: a }) : h.create.mutate(t, { onSuccess: a });
|
|
178
178
|
}, W = "block text-xs font-medium text-muted-foreground";
|
|
179
179
|
return /* @__PURE__ */ b("form", {
|
|
180
180
|
onSubmit: U,
|
|
@@ -301,7 +301,7 @@ function T({ workspace: t, type: r, onDone: i }) {
|
|
|
301
301
|
children: [/* @__PURE__ */ y(o, {
|
|
302
302
|
size: "sm",
|
|
303
303
|
variant: "ghost",
|
|
304
|
-
onClick:
|
|
304
|
+
onClick: a,
|
|
305
305
|
children: f("cancel")
|
|
306
306
|
}), /* @__PURE__ */ y(o, {
|
|
307
307
|
type: "submit",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
+
import { appURL as n } from "../lib/base.js";
|
|
3
|
+
import { docRef as r, downloadMarkdown as i } from "../lib/docs.js";
|
|
4
|
+
import { useNavigate as a } from "../lib/router.js";
|
|
5
5
|
import { Button as o, ErrorText as s, Modal as c, ModalTitle as l } from "@parallelworks/ui";
|
|
6
6
|
import { useErrorMessage as u } from "@parallelworks/problem/react";
|
|
7
7
|
import { useTranslations as d } from "use-intl";
|
|
@@ -10,10 +10,10 @@ import { useMutation as h, useQueryClient as g } from "@tanstack/react-query";
|
|
|
10
10
|
// src/components/MarkdownTransfer.tsx
|
|
11
11
|
var _ = (e) => /\.(md|markdown)$/i.test(e);
|
|
12
12
|
function v(v) {
|
|
13
|
-
let y = d("docs"), b = u(), x = g(), S =
|
|
13
|
+
let y = d("docs"), b = u(), x = g(), S = a(), C = h({
|
|
14
14
|
mutationFn: async ({ target: r, files: i }) => {
|
|
15
|
-
let a =
|
|
16
|
-
if (i.length === 1 && o && /\.zip$/i.test(o.name)) return
|
|
15
|
+
let a = n(`/${v}/docs/`), [o] = i;
|
|
16
|
+
if (i.length === 1 && o && /\.zip$/i.test(o.name)) return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import/zip", {
|
|
17
17
|
params: {
|
|
18
18
|
path: { workspace: v },
|
|
19
19
|
query: {
|
|
@@ -29,7 +29,7 @@ function v(v) {
|
|
|
29
29
|
path: e.webkitRelativePath || e.name,
|
|
30
30
|
content: _(e.name) ? await e.text() : ""
|
|
31
31
|
})));
|
|
32
|
-
return
|
|
32
|
+
return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import", {
|
|
33
33
|
params: { path: { workspace: v } },
|
|
34
34
|
body: {
|
|
35
35
|
...r,
|
|
@@ -58,7 +58,7 @@ function v(v) {
|
|
|
58
58
|
files: t
|
|
59
59
|
});
|
|
60
60
|
}, n.click();
|
|
61
|
-
}, T = (e) =>
|
|
61
|
+
}, T = (e) => i(v, e), E = C.data, D = C.isPending || C.isError || !!E, O = () => C.reset();
|
|
62
62
|
return {
|
|
63
63
|
pick: w,
|
|
64
64
|
download: T,
|
|
@@ -112,7 +112,7 @@ function v(v) {
|
|
|
112
112
|
to: "/$workspace/docs/$doc",
|
|
113
113
|
params: {
|
|
114
114
|
workspace: v,
|
|
115
|
-
doc:
|
|
115
|
+
doc: r(e)
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
118
|
},
|