@parallelworks/tandem-web 0.171.1 → 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/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 +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 +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/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/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,55 +1,55 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
2
|
+
import { invalidateIssueViews as n, useUpdateIssue as r } from "../../../api/mutations.js";
|
|
3
|
+
import { areasQuery as i, attachmentsQuery as a, commentsQuery as o, cyclesQuery as s, eventsQuery as c, issueDocsQuery as l, issueLinksQuery as u, issueQuery as d, labelsQuery as f, meQuery as p, projectsQuery as m, reactionsQuery as h, statusesQuery as g, teamsQuery as _ } from "../../../api/queries.js";
|
|
4
|
+
import { Timeline as v } from "../../../components/ActivityTimeline.js";
|
|
5
|
+
import { AgentPage as y } from "../../../components/AgentPage.js";
|
|
6
|
+
import { AgentWork as b } from "../../../components/AgentWork.js";
|
|
7
|
+
import { AreaLink as x } from "../../../components/AreaLink.js";
|
|
8
|
+
import { AttachButton as S, IssueAttachments as C, UploadStatus as w, useAttachmentUpload as T } from "../../../components/Attachments.js";
|
|
9
|
+
import { CollabEditor as E } from "../../../components/CollabEditor.js";
|
|
10
|
+
import { CustomerRequests as D } from "../../../components/CustomerRequests.js";
|
|
11
|
+
import { IssueFields as ee } from "../../../components/CustomFields.js";
|
|
12
|
+
import { Editor as O } from "../../../components/Editor.js";
|
|
13
|
+
import { FavoriteStar as k } from "../../../components/FavoriteStar.js";
|
|
14
|
+
import { IssueDesigns as A } from "../../../components/Figma.js";
|
|
15
|
+
import { IssueLinkChips as te, IssueLinks as ne, SharedThreadHeader as j } from "../../../components/GitHub.js";
|
|
16
|
+
import { IssueCode as M } from "../../../components/IssueCode.js";
|
|
17
|
+
import { EventLine as N } from "../../../components/IssueEvent.js";
|
|
18
|
+
import { IssueIntercom as re } from "../../../components/IssueIntercom.js";
|
|
19
|
+
import { ParentProperty as P, SubIssuesAndRelations as ie } from "../../../components/IssueRelations.js";
|
|
20
|
+
import { IssueSentry as ae } from "../../../components/IssueSentry.js";
|
|
21
|
+
import { TypeIcon as F } from "../../../components/IssueTypes.js";
|
|
22
|
+
import { IssueZendesk as oe } from "../../../components/IssueZendesk.js";
|
|
23
|
+
import { AreaIcon as se, BranchIcon as ce, CalendarIcon as I, CloseIcon as le, CycleIcon as L, EstimateIcon as ue, FileTextIcon as de, InboxIcon as fe, PriorityIcon as pe, ProjectIcon as me, StatusIcon as he, TriageIcon as ge, usePriorityNames as _e } from "../../../components/icons.js";
|
|
24
|
+
import { PersonHoverCard as ve } from "../../../components/PersonHoverCard.js";
|
|
25
|
+
import { DueDate as ye, ProjectStatusIcon as be, SlaBadge as xe, scalePoints as Se, useEstimateLabel as Ce } from "../../../components/Planning.js";
|
|
26
|
+
import { FieldNote as we, Viewers as Te } from "../../../components/Presence.js";
|
|
27
|
+
import { Reactions as Ee } from "../../../components/Reactions.js";
|
|
28
|
+
import { TimeInStatus as De } from "../../../components/Reports.js";
|
|
29
|
+
import { SubscribeButton as Oe } from "../../../components/SubscribeButton.js";
|
|
30
|
+
import { Widgets as ke } from "../../../components/Widgets.js";
|
|
31
|
+
import { assigneeKey as Ae, parseAssigneeKey as je, useAssigneeOptions as Me } from "../../../lib/assignees.js";
|
|
32
|
+
import { actorAvatar as Ne } from "../../../lib/avatar.js";
|
|
33
|
+
import { branchName as Pe } from "../../../lib/branch.js";
|
|
34
|
+
import { caretColor as Fe, useCollabSession as Ie } from "../../../lib/collab.js";
|
|
35
|
+
import { useConfirm as Le } from "../../../lib/confirm.js";
|
|
36
|
+
import { customFieldsQuery as Re, hasValue as ze } from "../../../lib/customFields.js";
|
|
37
|
+
import { docRef as Be, useDocMenu as Ve } from "../../../lib/docs.js";
|
|
38
|
+
import { issueURL as He, useIssueMenu as Ue } from "../../../lib/issueMenu.js";
|
|
39
|
+
import { issueTypesQuery as We, typeShows as Ge, typesFor as Ke } from "../../../lib/issueTypes.js";
|
|
40
|
+
import { useLinkedIssues as qe } from "../../../lib/linkedIssues.js";
|
|
41
|
+
import { useOthersOn as Je, useReportLocation as Ye } from "../../../lib/live.js";
|
|
42
|
+
import { copyItem as Xe } from "../../../lib/menus.js";
|
|
43
|
+
import { useReadIssueNotifications as Ze } from "../../../lib/notifications.js";
|
|
44
|
+
import { usePageTitle as Qe } from "../../../lib/pageTitle.js";
|
|
45
|
+
import { connectorActor as $e, usePeople as et } from "../../../lib/people.js";
|
|
46
|
+
import { PickManyBox as tt, usePickMany as nt } from "../../../lib/pickMany.js";
|
|
47
|
+
import { rememberPage as rt } from "../../../lib/recent.js";
|
|
48
|
+
import { issueScope as it, useCan as at, useCanTriage as ot } from "../../../lib/roles.js";
|
|
49
|
+
import { Link as R, useNavigate as st } from "../../../lib/router.js";
|
|
50
|
+
import { useShortcuts as ct } from "../../../lib/shortcuts.js";
|
|
51
|
+
import { useTime as lt } from "../../../lib/time.js";
|
|
52
|
+
import { Route as ut } from "./_identifier.js";
|
|
53
53
|
import { Avatar as dt, Button as z, Callout as ft, Card as pt, Combobox as B, CopyButton as mt, DatePicker as ht, ErrorText as gt, IconButton as _t, Kbd as vt, RelativeTime as yt, Select as V, TitleInput as bt, Tooltip as xt, buttonClasses as St, menuDivider as Ct, toast as wt, useOpenMenu as H } from "@parallelworks/ui";
|
|
54
54
|
import { createContext as Tt, useCallback as Et, useContext as Dt, useEffect as Ot, useMemo as kt, useRef as U, useState as W } from "react";
|
|
55
55
|
import { useErrorMessage as At } from "@parallelworks/problem/react";
|
|
@@ -60,99 +60,99 @@ import { MoreButton as Mt } from "@parallelworks/ui/list";
|
|
|
60
60
|
import { ArchiveIcon as Nt } from "@parallelworks/ui/icons";
|
|
61
61
|
// src/routes/$workspace/issues/$identifier.tsx?tsr-split=component
|
|
62
62
|
function Pt() {
|
|
63
|
-
let
|
|
64
|
-
|
|
65
|
-
identifier:
|
|
66
|
-
...
|
|
67
|
-
}),
|
|
68
|
-
let
|
|
63
|
+
let i = G("issue"), a = lt(), o = At(), s = G("common"), { workspace: c, identifier: l } = ut.useParams(), { data: f } = Q(d(c, l)), { data: m } = Q(_(c)), { data: h } = Q(p), { data: g = [] } = X(u(c, l)), [v, y] = W();
|
|
64
|
+
Ye({
|
|
65
|
+
identifier: f.identifier,
|
|
66
|
+
...v && { field: v }
|
|
67
|
+
}), Qe(`${f.identifier} ${f.title}`), Ze(c, f.identifier);
|
|
68
|
+
let x = st(), S = Pe(f.identifier, f.title);
|
|
69
69
|
Ot(() => {
|
|
70
|
-
window.location.pathname.endsWith(`/issues/${
|
|
70
|
+
window.location.pathname.endsWith(`/issues/${S}`) || x({
|
|
71
71
|
to: "/$workspace/issues/$identifier",
|
|
72
72
|
params: {
|
|
73
|
-
workspace:
|
|
74
|
-
identifier:
|
|
73
|
+
workspace: c,
|
|
74
|
+
identifier: f.identifier
|
|
75
75
|
},
|
|
76
76
|
search: !0,
|
|
77
77
|
hash: !0,
|
|
78
78
|
replace: !0
|
|
79
79
|
});
|
|
80
80
|
}, [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
S,
|
|
82
|
+
x,
|
|
83
|
+
c,
|
|
84
|
+
f.identifier
|
|
85
85
|
]);
|
|
86
|
-
let
|
|
86
|
+
let w = at(c, "delete_issues", it(f)), T = Z(), { confirm: E, dialog: ee } = Le(), O = Y({
|
|
87
87
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", { params: { path: {
|
|
88
|
-
workspace:
|
|
89
|
-
identifier:
|
|
88
|
+
workspace: c,
|
|
89
|
+
identifier: f.identifier
|
|
90
90
|
} } })),
|
|
91
91
|
onSuccess: (e) => {
|
|
92
|
-
|
|
92
|
+
T.setQueryData(d(c, f.identifier).queryKey, e), n(T, c, f.identifier);
|
|
93
93
|
}
|
|
94
|
-
}),
|
|
94
|
+
}), ne = Y({
|
|
95
95
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}", { params: { path: {
|
|
96
|
-
workspace:
|
|
97
|
-
identifier:
|
|
96
|
+
workspace: c,
|
|
97
|
+
identifier: f.identifier
|
|
98
98
|
} } })),
|
|
99
99
|
onSuccess: () => {
|
|
100
|
-
wt.success(
|
|
101
|
-
let e =
|
|
102
|
-
|
|
100
|
+
wt.success(i("deleted", { identifier: f.identifier })), n(T, c);
|
|
101
|
+
let e = m.find((e) => e.id === f.teamId)?.key;
|
|
102
|
+
x(e ? {
|
|
103
103
|
to: "/$workspace/teams/$key/issues",
|
|
104
104
|
params: {
|
|
105
|
-
workspace:
|
|
105
|
+
workspace: c,
|
|
106
106
|
key: e
|
|
107
107
|
}
|
|
108
108
|
} : {
|
|
109
109
|
to: "/$workspace/issues",
|
|
110
|
-
params: { workspace:
|
|
110
|
+
params: { workspace: c }
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
}),
|
|
113
|
+
}), j = Et((e) => x({
|
|
114
114
|
to: "/$workspace/issues/$identifier",
|
|
115
115
|
params: {
|
|
116
|
-
workspace:
|
|
116
|
+
workspace: c,
|
|
117
117
|
identifier: e
|
|
118
118
|
}
|
|
119
|
-
}), [
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
}), [x, c]);
|
|
120
|
+
qe(c, f.body, j), Ot(() => {
|
|
121
|
+
rt(c, {
|
|
122
122
|
kind: "issue",
|
|
123
|
-
href: `/${
|
|
124
|
-
label: `${
|
|
123
|
+
href: `/${c}/issues/${f.identifier}`,
|
|
124
|
+
label: `${f.identifier} ${f.title}`
|
|
125
125
|
});
|
|
126
126
|
}, [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
c,
|
|
128
|
+
f.identifier,
|
|
129
|
+
f.title
|
|
130
130
|
]);
|
|
131
|
-
let
|
|
132
|
-
return
|
|
133
|
-
s: () =>
|
|
134
|
-
p: () =>
|
|
135
|
-
a: () =>
|
|
136
|
-
l: () =>
|
|
137
|
-
Escape: () =>
|
|
131
|
+
let N = Je({ issue: f.identifier }, h?.user.username), P = m.find((e) => e.id === f.teamId), F = r(c, l), [se, I] = W(null), le = H(), L = Ue(c);
|
|
132
|
+
return ct({
|
|
133
|
+
s: () => I("status"),
|
|
134
|
+
p: () => I("priority"),
|
|
135
|
+
a: () => I("assignees"),
|
|
136
|
+
l: () => I("labels"),
|
|
137
|
+
Escape: () => x({
|
|
138
138
|
to: "/$workspace/issues",
|
|
139
|
-
params: { workspace:
|
|
139
|
+
params: { workspace: c }
|
|
140
140
|
})
|
|
141
|
-
},
|
|
141
|
+
}, se === null), /* @__PURE__ */ J("div", {
|
|
142
142
|
className: "flex h-full flex-col",
|
|
143
143
|
children: [
|
|
144
144
|
/* @__PURE__ */ J("header", {
|
|
145
145
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-4 text-sm md:px-5",
|
|
146
|
-
onContextMenu: (e) =>
|
|
146
|
+
onContextMenu: (e) => le(e, L([f])),
|
|
147
147
|
children: [
|
|
148
|
-
/* @__PURE__ */ q(
|
|
149
|
-
to:
|
|
148
|
+
/* @__PURE__ */ q(R, {
|
|
149
|
+
to: P ? "/$workspace/teams/$key/issues" : "/$workspace/issues",
|
|
150
150
|
params: {
|
|
151
|
-
workspace:
|
|
152
|
-
key:
|
|
151
|
+
workspace: c,
|
|
152
|
+
key: P?.key ?? ""
|
|
153
153
|
},
|
|
154
154
|
className: "text-muted-foreground hover:text-foreground",
|
|
155
|
-
children:
|
|
155
|
+
children: P?.name ?? i("issues")
|
|
156
156
|
}),
|
|
157
157
|
/* @__PURE__ */ q("span", {
|
|
158
158
|
className: "text-muted-foreground",
|
|
@@ -161,63 +161,63 @@ function Pt() {
|
|
|
161
161
|
}),
|
|
162
162
|
/* @__PURE__ */ q("span", {
|
|
163
163
|
className: "shrink-0 font-medium whitespace-nowrap",
|
|
164
|
-
children:
|
|
164
|
+
children: f.identifier
|
|
165
165
|
}),
|
|
166
|
-
/* @__PURE__ */ q(
|
|
167
|
-
workspace:
|
|
166
|
+
/* @__PURE__ */ q(k, {
|
|
167
|
+
workspace: c,
|
|
168
168
|
kind: "issue",
|
|
169
|
-
target:
|
|
169
|
+
target: f.id
|
|
170
170
|
}),
|
|
171
|
-
/* @__PURE__ */ q(
|
|
172
|
-
workspace:
|
|
173
|
-
identifier:
|
|
171
|
+
/* @__PURE__ */ q(Oe, {
|
|
172
|
+
workspace: c,
|
|
173
|
+
identifier: f.identifier
|
|
174
174
|
}),
|
|
175
175
|
/* @__PURE__ */ q(mt, {
|
|
176
|
-
text:
|
|
177
|
-
label:
|
|
178
|
-
icon: /* @__PURE__ */ q(
|
|
176
|
+
text: Pe(f.identifier, f.title),
|
|
177
|
+
label: i("copyBranchName"),
|
|
178
|
+
icon: /* @__PURE__ */ q(ce, {}),
|
|
179
179
|
size: "sm",
|
|
180
180
|
variant: "ghost",
|
|
181
|
-
success:
|
|
182
|
-
failure:
|
|
181
|
+
success: i("copiedBranchName", { name: Pe(f.identifier, f.title) }),
|
|
182
|
+
failure: i("copyFailed"),
|
|
183
183
|
className: "max-sm:hidden"
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */ q(
|
|
185
|
+
/* @__PURE__ */ q(te, { links: g }),
|
|
186
186
|
/* @__PURE__ */ J("span", {
|
|
187
187
|
className: "ml-auto flex items-center gap-3",
|
|
188
188
|
children: [
|
|
189
|
-
|
|
189
|
+
F.isPending && /* @__PURE__ */ q("span", {
|
|
190
190
|
className: "text-xs text-muted-foreground",
|
|
191
|
-
children:
|
|
191
|
+
children: s("saving")
|
|
192
192
|
}),
|
|
193
|
-
/* @__PURE__ */ q(
|
|
194
|
-
workspace:
|
|
195
|
-
others:
|
|
193
|
+
/* @__PURE__ */ q(Te, {
|
|
194
|
+
workspace: c,
|
|
195
|
+
others: N
|
|
196
196
|
}),
|
|
197
197
|
/* @__PURE__ */ q(Mt, {
|
|
198
|
-
items: () => [...
|
|
199
|
-
label:
|
|
198
|
+
items: () => [...L([f]), ...w ? [{
|
|
199
|
+
label: i("deleteIssue"),
|
|
200
200
|
destructive: !0,
|
|
201
|
-
onClick: () =>
|
|
202
|
-
title:
|
|
203
|
-
description:
|
|
204
|
-
confirmLabel:
|
|
205
|
-
onConfirm: () =>
|
|
201
|
+
onClick: () => E({
|
|
202
|
+
title: i("deleteTitle", { identifier: f.identifier }),
|
|
203
|
+
description: i("deleteDescription"),
|
|
204
|
+
confirmLabel: i("deleteIssue"),
|
|
205
|
+
onConfirm: () => ne.mutateAsync()
|
|
206
206
|
})
|
|
207
207
|
}] : []],
|
|
208
|
-
label:
|
|
208
|
+
label: s("moreActionsFor", { name: f.identifier }),
|
|
209
209
|
visible: !0
|
|
210
210
|
})
|
|
211
211
|
]
|
|
212
212
|
}),
|
|
213
|
-
|
|
213
|
+
F.isError && /* @__PURE__ */ q(gt, {
|
|
214
214
|
inline: !0,
|
|
215
215
|
className: "ml-auto text-xs",
|
|
216
|
-
children:
|
|
216
|
+
children: o(F.error)
|
|
217
217
|
})
|
|
218
218
|
]
|
|
219
219
|
}),
|
|
220
|
-
|
|
220
|
+
ee,
|
|
221
221
|
/* @__PURE__ */ J("div", {
|
|
222
222
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto md:flex-row md:overflow-hidden",
|
|
223
223
|
children: [/* @__PURE__ */ q("div", {
|
|
@@ -226,114 +226,114 @@ function Pt() {
|
|
|
226
226
|
className: "w-full px-4 pt-6 pb-24 md:px-8 md:pt-8",
|
|
227
227
|
children: [
|
|
228
228
|
/* @__PURE__ */ J(Zt.Provider, {
|
|
229
|
-
value:
|
|
229
|
+
value: y,
|
|
230
230
|
children: [
|
|
231
|
-
|
|
232
|
-
workspace:
|
|
233
|
-
issue:
|
|
231
|
+
f.triage && /* @__PURE__ */ q(Ft, {
|
|
232
|
+
workspace: c,
|
|
233
|
+
issue: f
|
|
234
234
|
}),
|
|
235
|
-
|
|
235
|
+
f.archivedAt && /* @__PURE__ */ q(ft, {
|
|
236
236
|
tone: "muted",
|
|
237
237
|
icon: /* @__PURE__ */ q(Nt, {}),
|
|
238
238
|
className: "mb-5",
|
|
239
239
|
children: /* @__PURE__ */ J("span", {
|
|
240
240
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
241
|
-
children: [
|
|
241
|
+
children: [i("archivedNote", { when: a.day(f.archivedAt.slice(0, 10)) }), /* @__PURE__ */ q(z, {
|
|
242
242
|
type: "button",
|
|
243
243
|
size: "sm",
|
|
244
|
-
onClick: () =>
|
|
245
|
-
loading:
|
|
246
|
-
children:
|
|
244
|
+
onClick: () => O.mutate(),
|
|
245
|
+
loading: O.isPending,
|
|
246
|
+
children: i("restore")
|
|
247
247
|
})]
|
|
248
248
|
})
|
|
249
249
|
}),
|
|
250
250
|
/* @__PURE__ */ q(It, {
|
|
251
|
-
issue:
|
|
252
|
-
onSave: (e) =>
|
|
251
|
+
issue: f,
|
|
252
|
+
onSave: (e) => F.mutate({ title: e })
|
|
253
253
|
}),
|
|
254
|
-
/* @__PURE__ */ q(
|
|
255
|
-
workspace:
|
|
256
|
-
others:
|
|
254
|
+
/* @__PURE__ */ q(we, {
|
|
255
|
+
workspace: c,
|
|
256
|
+
others: N,
|
|
257
257
|
field: "title"
|
|
258
258
|
}),
|
|
259
259
|
/* @__PURE__ */ q(Lt, {
|
|
260
|
-
workspace:
|
|
261
|
-
issue:
|
|
260
|
+
workspace: c,
|
|
261
|
+
issue: f
|
|
262
262
|
}),
|
|
263
|
-
/* @__PURE__ */ q(
|
|
264
|
-
workspace:
|
|
265
|
-
others:
|
|
263
|
+
/* @__PURE__ */ q(we, {
|
|
264
|
+
workspace: c,
|
|
265
|
+
others: N,
|
|
266
266
|
field: "body"
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */ q(
|
|
269
|
-
workspace:
|
|
270
|
-
issue:
|
|
268
|
+
/* @__PURE__ */ q(ie, {
|
|
269
|
+
workspace: c,
|
|
270
|
+
issue: f
|
|
271
271
|
}),
|
|
272
|
-
/* @__PURE__ */ q(
|
|
273
|
-
workspace:
|
|
274
|
-
identifier:
|
|
275
|
-
enabled: !!
|
|
272
|
+
/* @__PURE__ */ q(D, {
|
|
273
|
+
workspace: c,
|
|
274
|
+
identifier: f.identifier,
|
|
275
|
+
enabled: !!P?.customerRequestsEnabled
|
|
276
276
|
}),
|
|
277
277
|
/* @__PURE__ */ q(Rt, {
|
|
278
|
-
workspace:
|
|
279
|
-
identifier:
|
|
278
|
+
workspace: c,
|
|
279
|
+
identifier: l
|
|
280
280
|
}),
|
|
281
|
-
/* @__PURE__ */ q(
|
|
282
|
-
workspace:
|
|
283
|
-
identifier:
|
|
281
|
+
/* @__PURE__ */ q(A, {
|
|
282
|
+
workspace: c,
|
|
283
|
+
identifier: l
|
|
284
284
|
}),
|
|
285
|
-
/* @__PURE__ */ q(
|
|
286
|
-
workspace:
|
|
287
|
-
identifier:
|
|
288
|
-
title:
|
|
285
|
+
/* @__PURE__ */ q(M, {
|
|
286
|
+
workspace: c,
|
|
287
|
+
identifier: l,
|
|
288
|
+
title: f.title
|
|
289
289
|
}),
|
|
290
|
-
/* @__PURE__ */ q(
|
|
291
|
-
workspace:
|
|
292
|
-
identifier:
|
|
290
|
+
/* @__PURE__ */ q(oe, {
|
|
291
|
+
workspace: c,
|
|
292
|
+
identifier: l
|
|
293
293
|
}),
|
|
294
|
-
/* @__PURE__ */ q(
|
|
295
|
-
workspace:
|
|
296
|
-
identifier:
|
|
294
|
+
/* @__PURE__ */ q(ae, {
|
|
295
|
+
workspace: c,
|
|
296
|
+
identifier: l
|
|
297
297
|
}),
|
|
298
|
-
/* @__PURE__ */ q(
|
|
299
|
-
workspace:
|
|
300
|
-
identifier:
|
|
298
|
+
/* @__PURE__ */ q(re, {
|
|
299
|
+
workspace: c,
|
|
300
|
+
identifier: l
|
|
301
301
|
}),
|
|
302
|
-
/* @__PURE__ */ q(
|
|
303
|
-
workspace:
|
|
304
|
-
identifier:
|
|
302
|
+
/* @__PURE__ */ q(b, {
|
|
303
|
+
workspace: c,
|
|
304
|
+
identifier: l
|
|
305
305
|
}),
|
|
306
306
|
/* @__PURE__ */ q(Gt, {
|
|
307
|
-
workspace:
|
|
308
|
-
identifier:
|
|
309
|
-
others:
|
|
307
|
+
workspace: c,
|
|
308
|
+
identifier: l,
|
|
309
|
+
others: N
|
|
310
310
|
})
|
|
311
311
|
]
|
|
312
312
|
}),
|
|
313
313
|
/* @__PURE__ */ q(Wt, {
|
|
314
|
-
workspace:
|
|
315
|
-
identifier:
|
|
314
|
+
workspace: c,
|
|
315
|
+
identifier: l
|
|
316
316
|
}),
|
|
317
|
-
/* @__PURE__ */ q(
|
|
318
|
-
workspace:
|
|
319
|
-
identifier:
|
|
317
|
+
/* @__PURE__ */ q(C, {
|
|
318
|
+
workspace: c,
|
|
319
|
+
identifier: l
|
|
320
320
|
})
|
|
321
321
|
]
|
|
322
322
|
})
|
|
323
323
|
}), /* @__PURE__ */ q(zt, {
|
|
324
|
-
workspace:
|
|
325
|
-
issue:
|
|
326
|
-
team:
|
|
327
|
-
open:
|
|
328
|
-
setOpen:
|
|
329
|
-
update: (e) =>
|
|
324
|
+
workspace: c,
|
|
325
|
+
issue: f,
|
|
326
|
+
team: P,
|
|
327
|
+
open: se,
|
|
328
|
+
setOpen: I,
|
|
329
|
+
update: (e) => F.mutate(e)
|
|
330
330
|
})]
|
|
331
331
|
})
|
|
332
332
|
]
|
|
333
333
|
});
|
|
334
334
|
}
|
|
335
335
|
function Ft({ workspace: n, issue: r }) {
|
|
336
|
-
let i = G("triage"), a = At(), o = Z(), s =
|
|
336
|
+
let i = G("triage"), a = At(), o = Z(), s = ot(n, r.teamId), c = Y({
|
|
337
337
|
mutationFn: async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
|
|
338
338
|
params: { path: {
|
|
339
339
|
workspace: n,
|
|
@@ -350,7 +350,7 @@ function Ft({ workspace: n, issue: r }) {
|
|
|
350
350
|
return /* @__PURE__ */ J("div", {
|
|
351
351
|
className: "mb-5 flex flex-wrap items-center gap-3 rounded-xl border border-border bg-muted/40 px-4 py-3",
|
|
352
352
|
children: [
|
|
353
|
-
/* @__PURE__ */ q(
|
|
353
|
+
/* @__PURE__ */ q(ge, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
354
354
|
/* @__PURE__ */ q("p", {
|
|
355
355
|
className: "min-w-0 flex-1 text-sm",
|
|
356
356
|
children: i("waiting")
|
|
@@ -392,23 +392,23 @@ function It({ issue: e, onSave: t }) {
|
|
|
392
392
|
})] });
|
|
393
393
|
}
|
|
394
394
|
function Lt({ workspace: e, issue: t }) {
|
|
395
|
-
let n = G("issue"), r = G("common"), i = Dt(Zt), { data: a } = Q(
|
|
395
|
+
let n = G("issue"), r = G("common"), i = Dt(Zt), { data: a } = Q(p), o = U(null), s = kt(() => ({
|
|
396
396
|
name: a?.user.name ?? n("someone"),
|
|
397
|
-
color:
|
|
397
|
+
color: Fe(a?.user.username ?? "")
|
|
398
398
|
}), [
|
|
399
399
|
a?.user.name,
|
|
400
400
|
a?.user.username,
|
|
401
401
|
n
|
|
402
|
-
]), { session: c, error: l } =
|
|
402
|
+
]), { session: c, error: l } = Ie({
|
|
403
403
|
workspace: e,
|
|
404
404
|
target: { issue: t.identifier },
|
|
405
405
|
user: s,
|
|
406
406
|
getMarkdown: o
|
|
407
|
-
}), u = U(null), d =
|
|
407
|
+
}), u = U(null), d = T(e, t.identifier), { data: f = [] } = X(h(e, t.identifier)), m = at(e, "comment", it(t));
|
|
408
408
|
return /* @__PURE__ */ J("div", {
|
|
409
409
|
className: "group mt-4 min-h-32",
|
|
410
410
|
children: [
|
|
411
|
-
c ? /* @__PURE__ */ q(
|
|
411
|
+
c ? /* @__PURE__ */ q(E, {
|
|
412
412
|
session: c,
|
|
413
413
|
user: s,
|
|
414
414
|
getMarkdown: o,
|
|
@@ -421,7 +421,7 @@ function Lt({ workspace: e, issue: t }) {
|
|
|
421
421
|
placeholder: n("addDescription"),
|
|
422
422
|
label: r("description"),
|
|
423
423
|
className: "min-h-32"
|
|
424
|
-
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ q(
|
|
424
|
+
}, `${c.generation}:${c.doc.guid}`) : /* @__PURE__ */ q(O, {
|
|
425
425
|
value: t.body,
|
|
426
426
|
editable: !1,
|
|
427
427
|
className: "min-h-32"
|
|
@@ -432,23 +432,23 @@ function Lt({ workspace: e, issue: t }) {
|
|
|
432
432
|
}),
|
|
433
433
|
c && /* @__PURE__ */ J("div", {
|
|
434
434
|
className: "mt-1 flex items-center justify-end gap-2",
|
|
435
|
-
children: [/* @__PURE__ */ q(
|
|
435
|
+
children: [/* @__PURE__ */ q(w, {
|
|
436
436
|
pending: d.pending,
|
|
437
437
|
error: d.error
|
|
438
|
-
}), /* @__PURE__ */ q(
|
|
438
|
+
}), /* @__PURE__ */ q(S, { onFiles: (e) => d.upload(u.current, e) })]
|
|
439
439
|
}),
|
|
440
|
-
/* @__PURE__ */ q(
|
|
440
|
+
/* @__PURE__ */ q(Ee, {
|
|
441
441
|
workspace: e,
|
|
442
442
|
identifier: t.identifier,
|
|
443
443
|
reactions: f,
|
|
444
444
|
me: a?.user.username,
|
|
445
|
-
disabled: !
|
|
445
|
+
disabled: !m
|
|
446
446
|
})
|
|
447
447
|
]
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
450
|
function Rt({ workspace: e, identifier: t }) {
|
|
451
|
-
let n = G("issue"), { data: r } = Q(
|
|
451
|
+
let n = G("issue"), { data: r } = Q(l(e, t)), i = H(), a = Ve(e);
|
|
452
452
|
return r.length === 0 ? null : /* @__PURE__ */ J("section", {
|
|
453
453
|
className: "mt-6",
|
|
454
454
|
"aria-label": n("docs"),
|
|
@@ -457,15 +457,15 @@ function Rt({ workspace: e, identifier: t }) {
|
|
|
457
457
|
children: n("docs")
|
|
458
458
|
}), /* @__PURE__ */ q("ul", {
|
|
459
459
|
className: "mt-1 flex flex-wrap gap-1.5",
|
|
460
|
-
children: r.map((t) => /* @__PURE__ */ q("li", { children: /* @__PURE__ */ J(
|
|
460
|
+
children: r.map((t) => /* @__PURE__ */ q("li", { children: /* @__PURE__ */ J(R, {
|
|
461
461
|
to: "/$workspace/docs/$doc",
|
|
462
462
|
params: {
|
|
463
463
|
workspace: e,
|
|
464
|
-
doc:
|
|
464
|
+
doc: Be(t)
|
|
465
465
|
},
|
|
466
|
-
onContextMenu: (e) =>
|
|
466
|
+
onContextMenu: (e) => i(e, a(t)),
|
|
467
467
|
className: `${St({ size: "sm" })} max-w-72`,
|
|
468
|
-
children: [/* @__PURE__ */ q(
|
|
468
|
+
children: [/* @__PURE__ */ q(de, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ q("span", {
|
|
469
469
|
className: "truncate",
|
|
470
470
|
children: t.title
|
|
471
471
|
})]
|
|
@@ -473,11 +473,11 @@ function Rt({ workspace: e, identifier: t }) {
|
|
|
473
473
|
})]
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
function zt({ workspace: n, issue: r, team: i, open:
|
|
477
|
-
let
|
|
478
|
-
...
|
|
479
|
-
enabled: !!
|
|
480
|
-
}), { data: _ = [] } = X(
|
|
476
|
+
function zt({ workspace: n, issue: r, team: i, open: a, setOpen: o, update: s }) {
|
|
477
|
+
let c = G("relations"), l = i?.key, d = G("issue.properties"), p = G("common"), m = _e(), { data: h = [] } = X({
|
|
478
|
+
...g(n, l ?? ""),
|
|
479
|
+
enabled: !!l
|
|
480
|
+
}), { data: _ = [] } = X(f(n)), { data: v = [] } = X(u(n, r.identifier)), { nameOf: y, actorName: b, avatarOf: x } = et(n), S = Z(), C = Y({
|
|
481
481
|
mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/labels", {
|
|
482
482
|
params: { path: { workspace: n } },
|
|
483
483
|
body: {
|
|
@@ -486,38 +486,38 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
486
486
|
}
|
|
487
487
|
})),
|
|
488
488
|
onSuccess: (e) => {
|
|
489
|
-
|
|
489
|
+
S.invalidateQueries({ queryKey: f(n).queryKey }), s({ addLabels: [e.id] });
|
|
490
490
|
}
|
|
491
|
-
}),
|
|
492
|
-
e.stopPropagation(),
|
|
491
|
+
}), w = r.assignees.map(Ae), T = Me(n, !0), E = (e) => (t) => o(t ? e : null), D = nt(a === "assignees", () => o(null)), O = nt(a === "labels", () => o(null)), k = "flex h-8 w-full items-center gap-2 rounded-md px-2 text-sm hover:bg-muted", A = H(), te = Ue(n), j = st(), M = (e, t) => {
|
|
492
|
+
e.stopPropagation(), A(e, t);
|
|
493
493
|
};
|
|
494
494
|
return /* @__PURE__ */ J("aside", {
|
|
495
495
|
className: "order-first grid shrink-0 grid-cols-2 gap-4 border-b border-border px-4 py-4 md:order-none md:block md:w-72 md:space-y-5 md:overflow-y-auto md:border-b-0 md:border-l md:py-6",
|
|
496
496
|
"aria-label": d("title"),
|
|
497
|
-
onContextMenu: (e) =>
|
|
497
|
+
onContextMenu: (e) => A(e, te([r])),
|
|
498
498
|
children: [
|
|
499
499
|
/* @__PURE__ */ q($, {
|
|
500
500
|
label: p("status"),
|
|
501
501
|
shortcut: "S",
|
|
502
502
|
children: /* @__PURE__ */ q(B, {
|
|
503
503
|
"aria-label": p("status"),
|
|
504
|
-
open:
|
|
505
|
-
onOpenChange:
|
|
506
|
-
items:
|
|
504
|
+
open: a === "status",
|
|
505
|
+
onOpenChange: E("status"),
|
|
506
|
+
items: h.map((e) => ({
|
|
507
507
|
value: e.id,
|
|
508
508
|
label: e.name,
|
|
509
|
-
icon: /* @__PURE__ */ q(
|
|
509
|
+
icon: /* @__PURE__ */ q(he, {
|
|
510
510
|
category: e.category,
|
|
511
511
|
step: e.step
|
|
512
512
|
})
|
|
513
513
|
})),
|
|
514
514
|
value: r.status.id,
|
|
515
|
-
onValueChange: (e) => e !== null && e !== r.status.id &&
|
|
515
|
+
onValueChange: (e) => e !== null && e !== r.status.id && s({ statusId: e }),
|
|
516
516
|
placeholder: d("changeStatus"),
|
|
517
517
|
trigger: /* @__PURE__ */ J("button", {
|
|
518
518
|
type: "button",
|
|
519
|
-
className:
|
|
520
|
-
children: [/* @__PURE__ */ q(
|
|
519
|
+
className: k,
|
|
520
|
+
children: [/* @__PURE__ */ q(he, {
|
|
521
521
|
category: r.status.category,
|
|
522
522
|
step: r.status.step
|
|
523
523
|
}), r.status.name]
|
|
@@ -527,16 +527,16 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
527
527
|
/* @__PURE__ */ q(Ut, {
|
|
528
528
|
workspace: n,
|
|
529
529
|
issue: r,
|
|
530
|
-
update:
|
|
531
|
-
row:
|
|
530
|
+
update: s,
|
|
531
|
+
row: k
|
|
532
532
|
}),
|
|
533
533
|
/* @__PURE__ */ q($, {
|
|
534
534
|
label: p("priority"),
|
|
535
535
|
shortcut: "P",
|
|
536
536
|
children: /* @__PURE__ */ q(B, {
|
|
537
537
|
"aria-label": p("priority"),
|
|
538
|
-
open:
|
|
539
|
-
onOpenChange:
|
|
538
|
+
open: a === "priority",
|
|
539
|
+
onOpenChange: E("priority"),
|
|
540
540
|
items: [
|
|
541
541
|
1,
|
|
542
542
|
2,
|
|
@@ -545,16 +545,16 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
545
545
|
0
|
|
546
546
|
].map((e) => ({
|
|
547
547
|
value: String(e),
|
|
548
|
-
label:
|
|
549
|
-
icon: /* @__PURE__ */ q(
|
|
548
|
+
label: m[e] ?? "",
|
|
549
|
+
icon: /* @__PURE__ */ q(pe, { priority: e })
|
|
550
550
|
})),
|
|
551
551
|
value: String(r.priority),
|
|
552
|
-
onValueChange: (e) => e !== null &&
|
|
552
|
+
onValueChange: (e) => e !== null && s({ priority: Number(e) }),
|
|
553
553
|
placeholder: d("setPriority"),
|
|
554
554
|
trigger: /* @__PURE__ */ J("button", {
|
|
555
555
|
type: "button",
|
|
556
|
-
className:
|
|
557
|
-
children: [/* @__PURE__ */ q(
|
|
556
|
+
className: k,
|
|
557
|
+
children: [/* @__PURE__ */ q(pe, { priority: r.priority }), m[r.priority]]
|
|
558
558
|
})
|
|
559
559
|
})
|
|
560
560
|
}),
|
|
@@ -564,36 +564,36 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
564
564
|
children: /* @__PURE__ */ q(B, {
|
|
565
565
|
"aria-label": d("assignees"),
|
|
566
566
|
multiple: !0,
|
|
567
|
-
open:
|
|
568
|
-
onOpenChange:
|
|
569
|
-
items:
|
|
570
|
-
value:
|
|
567
|
+
open: a === "assignees",
|
|
568
|
+
onOpenChange: E("assignees"),
|
|
569
|
+
items: T,
|
|
570
|
+
value: w,
|
|
571
571
|
onValueChange: (e) => {
|
|
572
|
-
let t = e.filter((e) => !
|
|
573
|
-
|
|
574
|
-
...t.length > 0 && { addAssignees: t.map(
|
|
575
|
-
...n.length > 0 && { removeAssignees: n.map(
|
|
576
|
-
}),
|
|
572
|
+
let t = e.filter((e) => !w.includes(e)), n = w.filter((t) => !e.includes(t));
|
|
573
|
+
s({
|
|
574
|
+
...t.length > 0 && { addAssignees: t.map(je) },
|
|
575
|
+
...n.length > 0 && { removeAssignees: n.map(je) }
|
|
576
|
+
}), D();
|
|
577
577
|
},
|
|
578
578
|
placeholder: d("assignTo"),
|
|
579
579
|
trigger: /* @__PURE__ */ J("button", {
|
|
580
580
|
type: "button",
|
|
581
|
-
className: `${
|
|
581
|
+
className: `${k} h-auto min-h-8 flex-wrap py-1`,
|
|
582
582
|
children: [r.assignees.length === 0 && /* @__PURE__ */ q("span", {
|
|
583
583
|
className: "text-muted-foreground",
|
|
584
584
|
children: d("unassigned")
|
|
585
585
|
}), r.assignees.map((e) => {
|
|
586
|
-
let t =
|
|
586
|
+
let t = y(e.kind, e.handle);
|
|
587
587
|
return /* @__PURE__ */ q("span", {
|
|
588
|
-
onContextMenu: (r) =>
|
|
588
|
+
onContextMenu: (r) => M(r, [{
|
|
589
589
|
label: d("unassign", { name: t }),
|
|
590
|
-
onClick: () =>
|
|
590
|
+
onClick: () => s({ removeAssignees: [{
|
|
591
591
|
kind: e.kind,
|
|
592
592
|
handle: e.handle
|
|
593
593
|
}] })
|
|
594
594
|
}, {
|
|
595
595
|
label: d("viewTheirIssues"),
|
|
596
|
-
onClick: () =>
|
|
596
|
+
onClick: () => j({
|
|
597
597
|
to: "/$workspace/issues",
|
|
598
598
|
params: { workspace: n },
|
|
599
599
|
search: {
|
|
@@ -603,15 +603,15 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
603
603
|
})
|
|
604
604
|
}]),
|
|
605
605
|
className: "flex items-center gap-1.5",
|
|
606
|
-
children: /* @__PURE__ */ J(
|
|
606
|
+
children: /* @__PURE__ */ J(ve, {
|
|
607
607
|
workspace: n,
|
|
608
608
|
kind: e.kind,
|
|
609
609
|
handle: e.handle,
|
|
610
610
|
className: "flex items-center gap-1.5",
|
|
611
611
|
children: [/* @__PURE__ */ q(dt, {
|
|
612
|
-
...
|
|
612
|
+
...Ne(e.kind),
|
|
613
613
|
name: t,
|
|
614
|
-
src:
|
|
614
|
+
src: x(e.kind, e.handle),
|
|
615
615
|
size: "xs",
|
|
616
616
|
decorative: !0
|
|
617
617
|
}), t]
|
|
@@ -627,14 +627,14 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
627
627
|
children: /* @__PURE__ */ q(B, {
|
|
628
628
|
"aria-label": p("labels"),
|
|
629
629
|
multiple: !0,
|
|
630
|
-
open:
|
|
631
|
-
onOpenChange:
|
|
630
|
+
open: a === "labels",
|
|
631
|
+
onOpenChange: E("labels"),
|
|
632
632
|
items: _.map((e) => ({
|
|
633
633
|
value: e.id,
|
|
634
634
|
label: e.name,
|
|
635
635
|
icon: /* @__PURE__ */ J("span", {
|
|
636
636
|
className: "flex items-center gap-2",
|
|
637
|
-
children: [/* @__PURE__ */ q(
|
|
637
|
+
children: [/* @__PURE__ */ q(tt, {}), /* @__PURE__ */ q("span", {
|
|
638
638
|
className: "size-2.5 rounded-full",
|
|
639
639
|
style: { background: e.color }
|
|
640
640
|
})]
|
|
@@ -642,28 +642,28 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
642
642
|
})),
|
|
643
643
|
value: r.labels.map((e) => e.id),
|
|
644
644
|
onValueChange: (e) => {
|
|
645
|
-
|
|
645
|
+
O();
|
|
646
646
|
let t = r.labels.map((e) => e.id), n = e.filter((e) => !t.includes(e)), i = t.filter((t) => !e.includes(t));
|
|
647
|
-
|
|
647
|
+
s({
|
|
648
648
|
...n.length > 0 && { addLabels: n },
|
|
649
649
|
...i.length > 0 && { removeLabels: i }
|
|
650
650
|
});
|
|
651
651
|
},
|
|
652
|
-
onCreate: (e) =>
|
|
652
|
+
onCreate: (e) => C.mutate(e),
|
|
653
653
|
placeholder: d("addLabels"),
|
|
654
654
|
trigger: /* @__PURE__ */ J("button", {
|
|
655
655
|
type: "button",
|
|
656
|
-
className: `${
|
|
656
|
+
className: `${k} h-auto min-h-8 flex-wrap py-1`,
|
|
657
657
|
children: [r.labels.length === 0 && /* @__PURE__ */ q("span", {
|
|
658
658
|
className: "text-muted-foreground",
|
|
659
659
|
children: d("noLabels")
|
|
660
660
|
}), r.labels.map((e) => /* @__PURE__ */ J("span", {
|
|
661
|
-
onContextMenu: (t) =>
|
|
661
|
+
onContextMenu: (t) => M(t, [{
|
|
662
662
|
label: d("removeLabel", { name: e.name }),
|
|
663
|
-
onClick: () =>
|
|
663
|
+
onClick: () => s({ removeLabels: [e.id] })
|
|
664
664
|
}, {
|
|
665
665
|
label: d("viewLabelIssues"),
|
|
666
|
-
onClick: () =>
|
|
666
|
+
onClick: () => j({
|
|
667
667
|
to: "/$workspace/issues",
|
|
668
668
|
params: { workspace: n },
|
|
669
669
|
search: { label: e.name }
|
|
@@ -683,32 +683,32 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
683
683
|
})
|
|
684
684
|
}),
|
|
685
685
|
/* @__PURE__ */ q($, {
|
|
686
|
-
label:
|
|
687
|
-
children: /* @__PURE__ */ q(
|
|
686
|
+
label: c("parent"),
|
|
687
|
+
children: /* @__PURE__ */ q(P, {
|
|
688
688
|
workspace: n,
|
|
689
689
|
issue: r,
|
|
690
|
-
row:
|
|
690
|
+
row: k
|
|
691
691
|
})
|
|
692
692
|
}),
|
|
693
693
|
/* @__PURE__ */ q(Ht, {
|
|
694
694
|
workspace: n,
|
|
695
695
|
issue: r,
|
|
696
696
|
team: i,
|
|
697
|
-
update:
|
|
698
|
-
row:
|
|
697
|
+
update: s,
|
|
698
|
+
row: k
|
|
699
699
|
}),
|
|
700
700
|
/* @__PURE__ */ q($, {
|
|
701
701
|
label: d("created"),
|
|
702
702
|
children: /* @__PURE__ */ J("p", {
|
|
703
703
|
className: "flex items-center gap-2 px-2 text-sm",
|
|
704
|
-
children: [/* @__PURE__ */ q(
|
|
704
|
+
children: [/* @__PURE__ */ q(ve, {
|
|
705
705
|
workspace: n,
|
|
706
706
|
kind: r.creator.kind,
|
|
707
707
|
handle: r.creator.handle,
|
|
708
708
|
children: /* @__PURE__ */ q(dt, {
|
|
709
|
-
...
|
|
710
|
-
name:
|
|
711
|
-
src:
|
|
709
|
+
...Ne(r.creator.kind),
|
|
710
|
+
name: b(r.creator),
|
|
711
|
+
src: x(r.creator.kind, r.creator.handle),
|
|
712
712
|
size: "xs",
|
|
713
713
|
tooltip: r.creator.kind !== "user"
|
|
714
714
|
})
|
|
@@ -720,12 +720,12 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
720
720
|
}),
|
|
721
721
|
/* @__PURE__ */ q($, {
|
|
722
722
|
label: d("timeInStatus"),
|
|
723
|
-
children: /* @__PURE__ */ q(
|
|
723
|
+
children: /* @__PURE__ */ q(De, {
|
|
724
724
|
workspace: n,
|
|
725
725
|
identifier: r.identifier
|
|
726
726
|
})
|
|
727
727
|
}),
|
|
728
|
-
/* @__PURE__ */ q(
|
|
728
|
+
/* @__PURE__ */ q(ee, {
|
|
729
729
|
workspace: n,
|
|
730
730
|
issue: r,
|
|
731
731
|
label: (e, t, n) => /* @__PURE__ */ q($, {
|
|
@@ -733,9 +733,9 @@ function zt({ workspace: n, issue: r, team: i, open: o, setOpen: s, update: c })
|
|
|
733
733
|
children: t
|
|
734
734
|
}, n)
|
|
735
735
|
}),
|
|
736
|
-
|
|
736
|
+
v.length > 0 && /* @__PURE__ */ q($, {
|
|
737
737
|
label: d("syncedWith"),
|
|
738
|
-
children: /* @__PURE__ */ q(
|
|
738
|
+
children: /* @__PURE__ */ q(ne, { links: v })
|
|
739
739
|
})
|
|
740
740
|
]
|
|
741
741
|
});
|
|
@@ -750,257 +750,257 @@ var Bt = [
|
|
|
750
750
|
"#1a7f37"
|
|
751
751
|
];
|
|
752
752
|
function Vt({ workspace: e, origin: t, className: n }) {
|
|
753
|
-
let r = "size-3.5 shrink-0 text-muted-foreground",
|
|
753
|
+
let r = "size-3.5 shrink-0 text-muted-foreground", i = t.title.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
754
754
|
switch (t.kind) {
|
|
755
|
-
case "decision": return /* @__PURE__ */ J(
|
|
755
|
+
case "decision": return /* @__PURE__ */ J(R, {
|
|
756
756
|
to: "/$workspace/issues/$identifier",
|
|
757
757
|
params: {
|
|
758
758
|
workspace: e,
|
|
759
759
|
identifier: t.key
|
|
760
760
|
},
|
|
761
761
|
className: n,
|
|
762
|
-
children: [/* @__PURE__ */ q(
|
|
763
|
-
content:
|
|
762
|
+
children: [/* @__PURE__ */ q(fe, { className: r }), /* @__PURE__ */ q(xt, {
|
|
763
|
+
content: i,
|
|
764
764
|
overflowOnly: !0,
|
|
765
765
|
children: /* @__PURE__ */ q("span", {
|
|
766
766
|
className: "truncate",
|
|
767
|
-
children:
|
|
767
|
+
children: i
|
|
768
768
|
})
|
|
769
769
|
})]
|
|
770
770
|
});
|
|
771
|
-
case "area": return /* @__PURE__ */ J(
|
|
771
|
+
case "area": return /* @__PURE__ */ J(x, {
|
|
772
772
|
workspace: e,
|
|
773
773
|
area: { key: t.key },
|
|
774
774
|
className: n,
|
|
775
|
-
children: [/* @__PURE__ */ q(
|
|
775
|
+
children: [/* @__PURE__ */ q(se, { className: r }), /* @__PURE__ */ q("span", {
|
|
776
776
|
className: "truncate",
|
|
777
|
-
children:
|
|
777
|
+
children: i
|
|
778
778
|
})]
|
|
779
779
|
});
|
|
780
|
-
default: return /* @__PURE__ */ J(
|
|
780
|
+
default: return /* @__PURE__ */ J(R, {
|
|
781
781
|
to: "/$workspace/docs/$doc",
|
|
782
782
|
params: {
|
|
783
783
|
workspace: e,
|
|
784
784
|
doc: t.key
|
|
785
785
|
},
|
|
786
786
|
className: n,
|
|
787
|
-
children: [/* @__PURE__ */ q(
|
|
787
|
+
children: [/* @__PURE__ */ q(de, { className: r }), /* @__PURE__ */ q("span", {
|
|
788
788
|
className: "truncate",
|
|
789
|
-
children:
|
|
789
|
+
children: i
|
|
790
790
|
})]
|
|
791
791
|
});
|
|
792
792
|
}
|
|
793
793
|
}
|
|
794
|
-
function Ht({ workspace: e, issue: t, team: n, update: r, row:
|
|
795
|
-
let
|
|
796
|
-
...
|
|
794
|
+
function Ht({ workspace: e, issue: t, team: n, update: r, row: a }) {
|
|
795
|
+
let o = G("planning"), c = G("flow"), l = lt(), u = Ce(), { data: d = [] } = X(m(e)), f = d.find((e) => e.id === t.project?.id), { data: p = [] } = X({
|
|
796
|
+
...s(e, n?.key ?? ""),
|
|
797
797
|
enabled: !!n?.cyclesEnabled
|
|
798
|
-
}),
|
|
798
|
+
}), h = n?.estimateScale ?? "none", g = t.status.category === "completed" || t.status.category === "canceled", _ = (e) => e.name ? o("cycleNamed", {
|
|
799
799
|
number: e.number,
|
|
800
800
|
name: e.name
|
|
801
|
-
}) :
|
|
801
|
+
}) : o("cycle", { number: e.number }), v = p.filter((e) => e.state !== "past" || e.id === t.cycle?.id), { data: y = [] } = X(i(e)), b = y.filter((e) => !e.teamId || e.teamId === t.teamId);
|
|
802
802
|
return /* @__PURE__ */ J(K, { children: [
|
|
803
803
|
n && n.flow.length > 0 && /* @__PURE__ */ q($, {
|
|
804
|
-
label:
|
|
804
|
+
label: c("stage"),
|
|
805
805
|
children: /* @__PURE__ */ q(V, {
|
|
806
|
-
"aria-label":
|
|
806
|
+
"aria-label": c("stage"),
|
|
807
807
|
value: t.stage ?? "",
|
|
808
808
|
onValueChange: (e) => r({ stage: e ?? "" }),
|
|
809
809
|
items: [{
|
|
810
810
|
value: "",
|
|
811
|
-
label:
|
|
811
|
+
label: c("notInFlow")
|
|
812
812
|
}, ...n.flow.map((e) => ({
|
|
813
813
|
value: e.stage,
|
|
814
|
-
label:
|
|
814
|
+
label: c(`stages.${e.stage}`)
|
|
815
815
|
}))],
|
|
816
816
|
trigger: /* @__PURE__ */ J("button", {
|
|
817
817
|
type: "button",
|
|
818
|
-
className:
|
|
819
|
-
children: [/* @__PURE__ */ q(
|
|
818
|
+
className: a,
|
|
819
|
+
children: [/* @__PURE__ */ q(L, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.stage ? /* @__PURE__ */ q("span", {
|
|
820
820
|
className: "truncate",
|
|
821
|
-
children:
|
|
821
|
+
children: c(`stages.${t.stage}`)
|
|
822
822
|
}) : /* @__PURE__ */ q("span", {
|
|
823
823
|
className: "text-muted-foreground",
|
|
824
|
-
children:
|
|
824
|
+
children: c("notInFlow")
|
|
825
825
|
})]
|
|
826
826
|
})
|
|
827
827
|
})
|
|
828
828
|
}),
|
|
829
829
|
/* @__PURE__ */ q($, {
|
|
830
|
-
label:
|
|
830
|
+
label: o("area"),
|
|
831
831
|
children: /* @__PURE__ */ q(V, {
|
|
832
|
-
"aria-label":
|
|
832
|
+
"aria-label": o("area"),
|
|
833
833
|
value: t.area?.key ?? "",
|
|
834
834
|
onValueChange: (e) => r({ area: e ?? "" }),
|
|
835
835
|
items: [{
|
|
836
836
|
value: "",
|
|
837
|
-
label:
|
|
837
|
+
label: o("noArea")
|
|
838
838
|
}, ...b.map((e) => ({
|
|
839
839
|
value: e.key,
|
|
840
840
|
label: e.title,
|
|
841
|
-
...e.status === "proposed" && { description:
|
|
841
|
+
...e.status === "proposed" && { description: o("proposedArea") }
|
|
842
842
|
}))],
|
|
843
843
|
trigger: /* @__PURE__ */ J("button", {
|
|
844
844
|
type: "button",
|
|
845
|
-
className:
|
|
846
|
-
children: [/* @__PURE__ */ q(
|
|
845
|
+
className: a,
|
|
846
|
+
children: [/* @__PURE__ */ q(se, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.area ? /* @__PURE__ */ q("span", {
|
|
847
847
|
className: "truncate",
|
|
848
848
|
children: t.area.title
|
|
849
849
|
}) : /* @__PURE__ */ q("span", {
|
|
850
850
|
className: "text-muted-foreground",
|
|
851
|
-
children:
|
|
851
|
+
children: o("noArea")
|
|
852
852
|
})]
|
|
853
853
|
})
|
|
854
854
|
})
|
|
855
855
|
}),
|
|
856
856
|
t.origin && /* @__PURE__ */ q($, {
|
|
857
|
-
label:
|
|
857
|
+
label: o("startedFrom"),
|
|
858
858
|
children: /* @__PURE__ */ q(Vt, {
|
|
859
859
|
workspace: e,
|
|
860
860
|
origin: t.origin,
|
|
861
|
-
className:
|
|
861
|
+
className: a
|
|
862
862
|
})
|
|
863
863
|
}),
|
|
864
864
|
/* @__PURE__ */ q($, {
|
|
865
|
-
label:
|
|
865
|
+
label: o("project"),
|
|
866
866
|
children: /* @__PURE__ */ q(V, {
|
|
867
|
-
"aria-label":
|
|
867
|
+
"aria-label": o("project"),
|
|
868
868
|
value: t.project?.id ?? "",
|
|
869
869
|
onValueChange: (e) => r({ projectId: e ?? "" }),
|
|
870
870
|
items: [{
|
|
871
871
|
value: "",
|
|
872
|
-
label:
|
|
872
|
+
label: o("noProject")
|
|
873
873
|
}, ...d.map((e) => ({
|
|
874
874
|
value: e.id,
|
|
875
875
|
label: e.name,
|
|
876
|
-
icon: /* @__PURE__ */ q(
|
|
876
|
+
icon: /* @__PURE__ */ q(be, { status: e.status })
|
|
877
877
|
}))],
|
|
878
878
|
trigger: /* @__PURE__ */ J("button", {
|
|
879
879
|
type: "button",
|
|
880
|
-
className:
|
|
881
|
-
children: [/* @__PURE__ */ q(
|
|
880
|
+
className: a,
|
|
881
|
+
children: [/* @__PURE__ */ q(me, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.project ? /* @__PURE__ */ q("span", {
|
|
882
882
|
className: "truncate",
|
|
883
883
|
children: t.project.name
|
|
884
884
|
}) : /* @__PURE__ */ q("span", {
|
|
885
885
|
className: "text-muted-foreground",
|
|
886
|
-
children:
|
|
886
|
+
children: o("noProject")
|
|
887
887
|
})]
|
|
888
888
|
})
|
|
889
889
|
})
|
|
890
890
|
}),
|
|
891
891
|
t.project && /* @__PURE__ */ q($, {
|
|
892
|
-
label:
|
|
892
|
+
label: o("milestone"),
|
|
893
893
|
children: /* @__PURE__ */ q(V, {
|
|
894
|
-
"aria-label":
|
|
894
|
+
"aria-label": o("milestone"),
|
|
895
895
|
value: t.milestone?.id ?? "",
|
|
896
896
|
onValueChange: (e) => r({ milestoneId: e ?? "" }),
|
|
897
897
|
items: [{
|
|
898
898
|
value: "",
|
|
899
|
-
label:
|
|
899
|
+
label: o("noMilestone")
|
|
900
900
|
}, ...(f?.milestones ?? []).map((e) => ({
|
|
901
901
|
value: e.id,
|
|
902
902
|
label: e.name,
|
|
903
|
-
...e.targetDate && { description:
|
|
903
|
+
...e.targetDate && { description: l.day(e.targetDate) }
|
|
904
904
|
}))],
|
|
905
905
|
trigger: /* @__PURE__ */ q("button", {
|
|
906
906
|
type: "button",
|
|
907
|
-
className:
|
|
907
|
+
className: a,
|
|
908
908
|
children: t.milestone ? /* @__PURE__ */ q("span", {
|
|
909
909
|
className: "truncate",
|
|
910
910
|
children: t.milestone.name
|
|
911
911
|
}) : /* @__PURE__ */ q("span", {
|
|
912
912
|
className: "text-muted-foreground",
|
|
913
|
-
children:
|
|
913
|
+
children: o("noMilestone")
|
|
914
914
|
})
|
|
915
915
|
})
|
|
916
916
|
})
|
|
917
917
|
}),
|
|
918
918
|
n?.cyclesEnabled && /* @__PURE__ */ q($, {
|
|
919
|
-
label:
|
|
919
|
+
label: o("cycleLabel"),
|
|
920
920
|
children: /* @__PURE__ */ q(V, {
|
|
921
|
-
"aria-label":
|
|
921
|
+
"aria-label": o("cycleLabel"),
|
|
922
922
|
value: t.cycle?.id ?? "",
|
|
923
923
|
onValueChange: (e) => r({ cycleId: e ?? "" }),
|
|
924
924
|
items: [{
|
|
925
925
|
value: "",
|
|
926
|
-
label:
|
|
926
|
+
label: o("noCycle")
|
|
927
927
|
}, ...v.map((e) => ({
|
|
928
928
|
value: e.id,
|
|
929
929
|
label: _(e),
|
|
930
|
-
description:
|
|
931
|
-
state:
|
|
932
|
-
dates:
|
|
930
|
+
description: o("stateAndDates", {
|
|
931
|
+
state: o(`states.${e.state}`),
|
|
932
|
+
dates: l.dayRange(e.startsOn, e.endsOn)
|
|
933
933
|
})
|
|
934
934
|
}))],
|
|
935
935
|
trigger: /* @__PURE__ */ J("button", {
|
|
936
936
|
type: "button",
|
|
937
|
-
className:
|
|
938
|
-
children: [/* @__PURE__ */ q(
|
|
937
|
+
className: a,
|
|
938
|
+
children: [/* @__PURE__ */ q(L, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.cycle ? /* @__PURE__ */ q("span", {
|
|
939
939
|
className: "truncate",
|
|
940
940
|
children: _(t.cycle)
|
|
941
941
|
}) : /* @__PURE__ */ q("span", {
|
|
942
942
|
className: "text-muted-foreground",
|
|
943
|
-
children:
|
|
943
|
+
children: o("noCycle")
|
|
944
944
|
})]
|
|
945
945
|
})
|
|
946
946
|
})
|
|
947
947
|
}),
|
|
948
|
-
(
|
|
949
|
-
label:
|
|
948
|
+
(h !== "none" || !!t.estimate) && /* @__PURE__ */ q($, {
|
|
949
|
+
label: o("estimate"),
|
|
950
950
|
children: /* @__PURE__ */ q(V, {
|
|
951
|
-
"aria-label":
|
|
951
|
+
"aria-label": o("estimate"),
|
|
952
952
|
value: t.estimate ?? 0,
|
|
953
953
|
onValueChange: (e) => r({ estimate: e ?? 0 }),
|
|
954
954
|
items: [{
|
|
955
955
|
value: 0,
|
|
956
|
-
label:
|
|
957
|
-
}, ...
|
|
956
|
+
label: o("noEstimate")
|
|
957
|
+
}, ...Se(h).map((e) => ({
|
|
958
958
|
value: e,
|
|
959
|
-
label: u(e,
|
|
959
|
+
label: u(e, h)
|
|
960
960
|
}))],
|
|
961
961
|
trigger: /* @__PURE__ */ J("button", {
|
|
962
962
|
type: "button",
|
|
963
|
-
className:
|
|
964
|
-
children: [/* @__PURE__ */ q(
|
|
963
|
+
className: a,
|
|
964
|
+
children: [/* @__PURE__ */ q(ue, { className: "size-3.5 shrink-0 text-muted-foreground" }), t.estimate ? u(t.estimate, h) : /* @__PURE__ */ q("span", {
|
|
965
965
|
className: "text-muted-foreground",
|
|
966
|
-
children:
|
|
966
|
+
children: o("noEstimate")
|
|
967
967
|
})]
|
|
968
968
|
})
|
|
969
969
|
})
|
|
970
970
|
}),
|
|
971
971
|
/* @__PURE__ */ q($, {
|
|
972
|
-
label:
|
|
972
|
+
label: o("dueDate"),
|
|
973
973
|
children: /* @__PURE__ */ J("div", {
|
|
974
974
|
className: "flex items-center",
|
|
975
975
|
children: [/* @__PURE__ */ q(ht, {
|
|
976
976
|
value: t.dueDate ?? "",
|
|
977
977
|
onValueChange: (e) => r({ dueDate: e }),
|
|
978
|
-
"aria-label":
|
|
978
|
+
"aria-label": o("dueDate"),
|
|
979
979
|
required: !0,
|
|
980
980
|
trigger: /* @__PURE__ */ q("button", {
|
|
981
981
|
type: "button",
|
|
982
|
-
className:
|
|
983
|
-
children: t.dueDate ? /* @__PURE__ */ q(
|
|
982
|
+
className: a,
|
|
983
|
+
children: t.dueDate ? /* @__PURE__ */ q(ye, {
|
|
984
984
|
date: t.dueDate,
|
|
985
|
-
closed:
|
|
986
|
-
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
985
|
+
closed: g
|
|
986
|
+
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(I, { className: "size-3.5 shrink-0 text-muted-foreground" }), /* @__PURE__ */ q("span", {
|
|
987
987
|
className: "text-muted-foreground",
|
|
988
|
-
children:
|
|
988
|
+
children: o("noDueDate")
|
|
989
989
|
})] })
|
|
990
990
|
})
|
|
991
991
|
}), t.dueDate && /* @__PURE__ */ q(_t, {
|
|
992
992
|
variant: "ghost",
|
|
993
|
-
icon: /* @__PURE__ */ q(
|
|
994
|
-
label:
|
|
993
|
+
icon: /* @__PURE__ */ q(le, { className: "size-3.5" }),
|
|
994
|
+
label: o("clearDueDate"),
|
|
995
995
|
onClick: () => r({ dueDate: "" })
|
|
996
996
|
})]
|
|
997
997
|
})
|
|
998
998
|
}),
|
|
999
|
-
t.slaDueAt && !
|
|
1000
|
-
label:
|
|
999
|
+
t.slaDueAt && !g && /* @__PURE__ */ q($, {
|
|
1000
|
+
label: o("sla.label"),
|
|
1001
1001
|
children: /* @__PURE__ */ q("span", {
|
|
1002
1002
|
className: "flex h-7 items-center px-2",
|
|
1003
|
-
children: /* @__PURE__ */ q(
|
|
1003
|
+
children: /* @__PURE__ */ q(xe, {
|
|
1004
1004
|
issue: t,
|
|
1005
1005
|
team: n
|
|
1006
1006
|
})
|
|
@@ -1009,10 +1009,10 @@ function Ht({ workspace: e, issue: t, team: n, update: r, row: i }) {
|
|
|
1009
1009
|
] });
|
|
1010
1010
|
}
|
|
1011
1011
|
function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
1012
|
-
let i = G("issueTypes"), a = jt(), { data: o } = X(
|
|
1012
|
+
let i = G("issueTypes"), a = jt(), { data: o } = X(We(e)), { data: s } = X(Re(e)), { confirm: c, dialog: l } = Le(), [u, d] = W(!1), f = Ke(o, t.teamId);
|
|
1013
1013
|
if (f.length === 0 && !t.type) return null;
|
|
1014
1014
|
let p = (e) => {
|
|
1015
|
-
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) =>
|
|
1015
|
+
let r = f.find((t) => t.id === e), o = (s ?? []).filter((e) => ze(t.fields[e.id]) && !Ge(r, e.id));
|
|
1016
1016
|
if (!r || o.length === 0) return n({ typeId: e });
|
|
1017
1017
|
c({
|
|
1018
1018
|
title: i("hiddenTitle"),
|
|
@@ -1037,7 +1037,7 @@ function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1037
1037
|
}, ...f.map((e) => ({
|
|
1038
1038
|
value: e.id,
|
|
1039
1039
|
label: e.name,
|
|
1040
|
-
icon: /* @__PURE__ */ q(
|
|
1040
|
+
icon: /* @__PURE__ */ q(F, { type: e })
|
|
1041
1041
|
}))],
|
|
1042
1042
|
value: t.type?.id ?? "",
|
|
1043
1043
|
onValueChange: (e) => e !== null && e !== (t.type?.id ?? "") && p(e),
|
|
@@ -1045,7 +1045,7 @@ function Ut({ workspace: e, issue: t, update: n, row: r }) {
|
|
|
1045
1045
|
trigger: /* @__PURE__ */ q("button", {
|
|
1046
1046
|
type: "button",
|
|
1047
1047
|
className: r,
|
|
1048
|
-
children: t.type ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(
|
|
1048
|
+
children: t.type ? /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(F, { type: t.type }), t.type.name] }) : /* @__PURE__ */ q("span", {
|
|
1049
1049
|
className: "text-muted-foreground",
|
|
1050
1050
|
children: i("noType")
|
|
1051
1051
|
})
|
|
@@ -1064,7 +1064,7 @@ function $({ label: e, shortcut: t, children: n }) {
|
|
|
1064
1064
|
}), n] });
|
|
1065
1065
|
}
|
|
1066
1066
|
function Wt({ workspace: e, identifier: t }) {
|
|
1067
|
-
let n = G("issue.activity"), { data: r } = Q(
|
|
1067
|
+
let n = G("issue.activity"), { data: r } = Q(c(e, t)), [i, a] = W(!1), o = kt(() => {
|
|
1068
1068
|
let e = [];
|
|
1069
1069
|
for (let t of r) {
|
|
1070
1070
|
if (t.type.startsWith("comment.") || t.type.startsWith("issue.reaction_")) continue;
|
|
@@ -1087,9 +1087,9 @@ function Wt({ workspace: e, identifier: t }) {
|
|
|
1087
1087
|
className: "mt-3 text-xs text-muted-foreground hover:text-foreground",
|
|
1088
1088
|
children: n("showEarlier", { count: s })
|
|
1089
1089
|
}),
|
|
1090
|
-
/* @__PURE__ */ q(
|
|
1090
|
+
/* @__PURE__ */ q(v, {
|
|
1091
1091
|
className: "mt-3",
|
|
1092
|
-
children: o.slice(s).map((t) => /* @__PURE__ */ q(
|
|
1092
|
+
children: o.slice(s).map((t) => /* @__PURE__ */ q(N, {
|
|
1093
1093
|
workspace: e,
|
|
1094
1094
|
event: t
|
|
1095
1095
|
}, t.id))
|
|
@@ -1098,13 +1098,13 @@ function Wt({ workspace: e, identifier: t }) {
|
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
1100
|
function Gt({ workspace: e, identifier: t, others: n }) {
|
|
1101
|
-
let r = G("issue.comments"), { data: i } = Q(
|
|
1101
|
+
let r = G("issue.comments"), { data: i } = Q(o(e, t)), { data: a = [] } = X(u(e, t)), s = kt(() => {
|
|
1102
1102
|
let e = i.filter((e) => !e.parentId);
|
|
1103
1103
|
return e.sort((e, t) => Number(Kt(t)) - Number(Kt(e))), e.map((e) => ({
|
|
1104
1104
|
root: e,
|
|
1105
1105
|
replies: i.filter((t) => t.parentId === e.id)
|
|
1106
1106
|
}));
|
|
1107
|
-
}, [i]), [
|
|
1107
|
+
}, [i]), [c, l] = W(null), d = i.filter((e) => !e.deletedAt && !Kt(e)).length;
|
|
1108
1108
|
return /* @__PURE__ */ J("section", {
|
|
1109
1109
|
className: "mt-12 border-t border-border pt-6",
|
|
1110
1110
|
"aria-label": r("title"),
|
|
@@ -1114,27 +1114,27 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1114
1114
|
children: [
|
|
1115
1115
|
r("title"),
|
|
1116
1116
|
" ",
|
|
1117
|
-
|
|
1117
|
+
d > 0 && /* @__PURE__ */ q("span", {
|
|
1118
1118
|
className: "font-normal text-muted-foreground",
|
|
1119
|
-
children:
|
|
1119
|
+
children: d
|
|
1120
1120
|
})
|
|
1121
1121
|
]
|
|
1122
1122
|
}),
|
|
1123
1123
|
/* @__PURE__ */ q("div", {
|
|
1124
1124
|
className: "mt-4 space-y-3",
|
|
1125
|
-
children:
|
|
1126
|
-
let o = Kt(n) ? n.sharedWith : void 0,
|
|
1125
|
+
children: s.map(({ root: n, replies: i }) => {
|
|
1126
|
+
let o = Kt(n) ? n.sharedWith : void 0, s = o ? $e(o).source : void 0;
|
|
1127
1127
|
return /* @__PURE__ */ J(pt, {
|
|
1128
1128
|
size: "fill",
|
|
1129
1129
|
padding: "none",
|
|
1130
1130
|
highlight: !!o,
|
|
1131
1131
|
render: /* @__PURE__ */ q("article", {
|
|
1132
1132
|
id: `comment-${n.id}`,
|
|
1133
|
-
"aria-label":
|
|
1133
|
+
"aria-label": s && r("sharedThreadLabel", { source: s })
|
|
1134
1134
|
}),
|
|
1135
1135
|
children: [
|
|
1136
|
-
o &&
|
|
1137
|
-
source:
|
|
1136
|
+
o && s ? /* @__PURE__ */ q(j, {
|
|
1137
|
+
source: s,
|
|
1138
1138
|
link: a.find((e) => e.connector === o)
|
|
1139
1139
|
}) : /* @__PURE__ */ q(Jt, {
|
|
1140
1140
|
workspace: e,
|
|
@@ -1157,18 +1157,18 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1157
1157
|
}),
|
|
1158
1158
|
/* @__PURE__ */ q("div", {
|
|
1159
1159
|
className: "border-t border-border/70 px-3 py-2",
|
|
1160
|
-
children:
|
|
1160
|
+
children: c === n.id ? /* @__PURE__ */ q(Xt, {
|
|
1161
1161
|
workspace: e,
|
|
1162
1162
|
identifier: t,
|
|
1163
1163
|
parentId: n.id,
|
|
1164
|
-
publicOn:
|
|
1164
|
+
publicOn: s,
|
|
1165
1165
|
autofocus: !0,
|
|
1166
1166
|
onDone: () => l(null)
|
|
1167
1167
|
}) : /* @__PURE__ */ q("button", {
|
|
1168
1168
|
type: "button",
|
|
1169
1169
|
onClick: () => l(n.id),
|
|
1170
1170
|
className: "w-full text-left text-xs text-muted-foreground hover:text-foreground",
|
|
1171
|
-
children:
|
|
1171
|
+
children: s ? r("replyPublic", { source: s }) : r("replyPlaceholder")
|
|
1172
1172
|
})
|
|
1173
1173
|
})
|
|
1174
1174
|
]
|
|
@@ -1187,7 +1187,7 @@ function Gt({ workspace: e, identifier: t, others: n }) {
|
|
|
1187
1187
|
}),
|
|
1188
1188
|
/* @__PURE__ */ q("div", {
|
|
1189
1189
|
className: "mt-2",
|
|
1190
|
-
children: /* @__PURE__ */ q(
|
|
1190
|
+
children: /* @__PURE__ */ q(we, {
|
|
1191
1191
|
workspace: e,
|
|
1192
1192
|
others: n,
|
|
1193
1193
|
field: "comment"
|
|
@@ -1201,122 +1201,122 @@ function qt({ comment: e }) {
|
|
|
1201
1201
|
let t = G("issue.comments");
|
|
1202
1202
|
return e.author.kind === "connector" ? /* @__PURE__ */ q("span", {
|
|
1203
1203
|
className: "rounded border border-border px-1.5 py-px text-[10px] text-muted-foreground",
|
|
1204
|
-
children: t("via", { source:
|
|
1204
|
+
children: t("via", { source: $e(e.author.handle).source })
|
|
1205
1205
|
}) : null;
|
|
1206
1206
|
}
|
|
1207
|
-
function Jt({ workspace:
|
|
1208
|
-
let
|
|
1209
|
-
workspace:
|
|
1210
|
-
identifier:
|
|
1211
|
-
commentId:
|
|
1212
|
-
} },
|
|
1207
|
+
function Jt({ workspace: r, identifier: i, comment: a, onReply: o }) {
|
|
1208
|
+
let s = G("issue.comments"), c = G("common"), { actorName: l, avatarOf: u } = et(r), { data: d } = Q(p), { data: f = [] } = X(h(r, i)), m = at(r, "comment", { team: i.slice(0, i.lastIndexOf("-")) }), g = Z(), _ = H(), [v, y] = W(!1), [b, x] = W(a.body), [S, C] = W(!1), E = U(null), D = T(r, i), ee = a.author.kind === "user" && a.author.handle === d?.user.username, k = { path: {
|
|
1209
|
+
workspace: r,
|
|
1210
|
+
identifier: i,
|
|
1211
|
+
commentId: a.id
|
|
1212
|
+
} }, A = () => n(g, r, i), te = Y({
|
|
1213
1213
|
mutationFn: async () => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", {
|
|
1214
|
-
params:
|
|
1215
|
-
body: { body:
|
|
1214
|
+
params: k,
|
|
1215
|
+
body: { body: b }
|
|
1216
1216
|
})),
|
|
1217
1217
|
onSuccess: () => {
|
|
1218
|
-
|
|
1218
|
+
y(!1), A();
|
|
1219
1219
|
}
|
|
1220
|
-
}),
|
|
1221
|
-
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params:
|
|
1222
|
-
onSuccess:
|
|
1220
|
+
}), ne = Y({
|
|
1221
|
+
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/comments/{commentId}", { params: k })),
|
|
1222
|
+
onSuccess: A
|
|
1223
1223
|
});
|
|
1224
|
-
if (
|
|
1224
|
+
if (a.deletedAt) return /* @__PURE__ */ q("p", {
|
|
1225
1225
|
className: "px-3 py-2.5 text-xs text-muted-foreground italic",
|
|
1226
|
-
children:
|
|
1226
|
+
children: s("deleted")
|
|
1227
1227
|
});
|
|
1228
|
-
let
|
|
1228
|
+
let j = `${He(r, i)}#comment-${a.id}`, M = [
|
|
1229
1229
|
{
|
|
1230
|
-
label:
|
|
1231
|
-
onClick:
|
|
1230
|
+
label: s("reply"),
|
|
1231
|
+
onClick: o
|
|
1232
1232
|
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
...
|
|
1233
|
+
Xe(c("copyLink"), j),
|
|
1234
|
+
Xe(s("copyText"), a.body),
|
|
1235
|
+
...ee ? [
|
|
1236
1236
|
Ct,
|
|
1237
1237
|
{
|
|
1238
|
-
label:
|
|
1238
|
+
label: s("edit"),
|
|
1239
1239
|
onClick: () => {
|
|
1240
|
-
x(
|
|
1240
|
+
x(a.body), y(!0);
|
|
1241
1241
|
}
|
|
1242
1242
|
},
|
|
1243
1243
|
{
|
|
1244
|
-
label:
|
|
1244
|
+
label: c("delete"),
|
|
1245
1245
|
destructive: !0,
|
|
1246
|
-
onClick: () =>
|
|
1246
|
+
onClick: () => C(!0)
|
|
1247
1247
|
}
|
|
1248
1248
|
] : []
|
|
1249
1249
|
];
|
|
1250
1250
|
return /* @__PURE__ */ J("div", {
|
|
1251
1251
|
className: "group px-3 py-2.5",
|
|
1252
|
-
onContextMenu: (e) => !
|
|
1252
|
+
onContextMenu: (e) => !v && _(e, M),
|
|
1253
1253
|
children: [/* @__PURE__ */ J("div", {
|
|
1254
1254
|
className: "flex items-center gap-2 text-xs",
|
|
1255
1255
|
children: [
|
|
1256
|
-
/* @__PURE__ */ J(
|
|
1257
|
-
workspace:
|
|
1258
|
-
kind:
|
|
1259
|
-
handle:
|
|
1256
|
+
/* @__PURE__ */ J(ve, {
|
|
1257
|
+
workspace: r,
|
|
1258
|
+
kind: a.author.kind,
|
|
1259
|
+
handle: a.author.handle,
|
|
1260
1260
|
className: "flex items-center gap-2",
|
|
1261
1261
|
children: [/* @__PURE__ */ q(dt, {
|
|
1262
|
-
...
|
|
1263
|
-
name:
|
|
1264
|
-
src:
|
|
1262
|
+
...Ne(a.author.kind),
|
|
1263
|
+
name: l(a.author),
|
|
1264
|
+
src: u(a.author.kind, a.author.handle),
|
|
1265
1265
|
size: "xs",
|
|
1266
1266
|
decorative: !0
|
|
1267
1267
|
}), /* @__PURE__ */ q("span", {
|
|
1268
1268
|
className: "font-medium",
|
|
1269
|
-
children:
|
|
1269
|
+
children: l(a.author)
|
|
1270
1270
|
})]
|
|
1271
1271
|
}),
|
|
1272
|
-
/* @__PURE__ */ q(qt, { comment:
|
|
1272
|
+
/* @__PURE__ */ q(qt, { comment: a }),
|
|
1273
1273
|
/* @__PURE__ */ J("span", {
|
|
1274
1274
|
className: "text-muted-foreground",
|
|
1275
1275
|
children: [/* @__PURE__ */ q(yt, {
|
|
1276
|
-
value:
|
|
1276
|
+
value: a.createdAt,
|
|
1277
1277
|
exact: "medium"
|
|
1278
|
-
}),
|
|
1278
|
+
}), a.updatedAt !== a.createdAt && /* @__PURE__ */ J(K, { children: [" ", s("edited")] })]
|
|
1279
1279
|
}),
|
|
1280
|
-
!
|
|
1281
|
-
items:
|
|
1280
|
+
!S && !v && /* @__PURE__ */ q(Mt, {
|
|
1281
|
+
items: M,
|
|
1282
1282
|
className: "ml-auto"
|
|
1283
1283
|
}),
|
|
1284
|
-
|
|
1284
|
+
S && /* @__PURE__ */ J("span", {
|
|
1285
1285
|
className: "ml-auto flex gap-2 text-muted-foreground",
|
|
1286
1286
|
children: [
|
|
1287
|
-
/* @__PURE__ */ q("span", { children:
|
|
1287
|
+
/* @__PURE__ */ q("span", { children: s("confirmDelete") }),
|
|
1288
1288
|
/* @__PURE__ */ q("button", {
|
|
1289
1289
|
type: "button",
|
|
1290
1290
|
className: "text-danger hover:underline",
|
|
1291
|
-
onClick: () =>
|
|
1292
|
-
children:
|
|
1291
|
+
onClick: () => ne.mutate(),
|
|
1292
|
+
children: c("delete")
|
|
1293
1293
|
}),
|
|
1294
1294
|
/* @__PURE__ */ q("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
1296
|
className: "hover:underline",
|
|
1297
|
-
onClick: () =>
|
|
1298
|
-
children:
|
|
1297
|
+
onClick: () => C(!1),
|
|
1298
|
+
children: s("keep")
|
|
1299
1299
|
})
|
|
1300
1300
|
]
|
|
1301
1301
|
})
|
|
1302
1302
|
]
|
|
1303
1303
|
}), /* @__PURE__ */ q("div", {
|
|
1304
1304
|
className: "mt-1",
|
|
1305
|
-
children:
|
|
1306
|
-
/* @__PURE__ */ q(
|
|
1307
|
-
value:
|
|
1305
|
+
children: v ? /* @__PURE__ */ J(K, { children: [
|
|
1306
|
+
/* @__PURE__ */ q(O, {
|
|
1307
|
+
value: b,
|
|
1308
1308
|
onChange: x,
|
|
1309
|
-
onSubmit: () =>
|
|
1309
|
+
onSubmit: () => te.mutate(),
|
|
1310
1310
|
autofocus: !0,
|
|
1311
|
-
label:
|
|
1311
|
+
label: s("editLabel"),
|
|
1312
1312
|
onEditor: (e) => {
|
|
1313
|
-
|
|
1313
|
+
E.current = e;
|
|
1314
1314
|
},
|
|
1315
|
-
onFiles: (e, t) =>
|
|
1315
|
+
onFiles: (e, t) => D.upload(E.current, e, t)
|
|
1316
1316
|
}),
|
|
1317
|
-
/* @__PURE__ */ q(
|
|
1318
|
-
pending:
|
|
1319
|
-
error:
|
|
1317
|
+
/* @__PURE__ */ q(w, {
|
|
1318
|
+
pending: D.pending,
|
|
1319
|
+
error: D.error
|
|
1320
1320
|
}),
|
|
1321
1321
|
/* @__PURE__ */ J("div", {
|
|
1322
1322
|
className: "mt-2 flex justify-end gap-2",
|
|
@@ -1324,114 +1324,114 @@ function Jt({ workspace: n, identifier: r, comment: i, onReply: a }) {
|
|
|
1324
1324
|
type: "button",
|
|
1325
1325
|
variant: "ghost",
|
|
1326
1326
|
size: "sm",
|
|
1327
|
-
onClick: () =>
|
|
1328
|
-
children:
|
|
1327
|
+
onClick: () => y(!1),
|
|
1328
|
+
children: c("cancel")
|
|
1329
1329
|
}), /* @__PURE__ */ q(z, {
|
|
1330
1330
|
type: "button",
|
|
1331
1331
|
variant: "primary",
|
|
1332
1332
|
size: "sm",
|
|
1333
|
-
onClick: () =>
|
|
1334
|
-
disabled: !
|
|
1335
|
-
children:
|
|
1333
|
+
onClick: () => te.mutate(),
|
|
1334
|
+
disabled: !b.trim() || D.pending > 0,
|
|
1335
|
+
children: c("save")
|
|
1336
1336
|
})]
|
|
1337
1337
|
})
|
|
1338
1338
|
] }) : /* @__PURE__ */ J(K, { children: [
|
|
1339
|
-
/* @__PURE__ */ q(
|
|
1340
|
-
value:
|
|
1339
|
+
/* @__PURE__ */ q(O, {
|
|
1340
|
+
value: a.body,
|
|
1341
1341
|
editable: !1
|
|
1342
1342
|
}),
|
|
1343
|
-
/* @__PURE__ */ q(
|
|
1344
|
-
workspace:
|
|
1345
|
-
widgets:
|
|
1343
|
+
/* @__PURE__ */ q(ke, {
|
|
1344
|
+
workspace: r,
|
|
1345
|
+
widgets: a.widgets
|
|
1346
1346
|
}),
|
|
1347
1347
|
/* @__PURE__ */ q(Yt, {
|
|
1348
|
-
workspace:
|
|
1349
|
-
identifier:
|
|
1350
|
-
comment:
|
|
1348
|
+
workspace: r,
|
|
1349
|
+
identifier: i,
|
|
1350
|
+
comment: a
|
|
1351
1351
|
}),
|
|
1352
|
-
/* @__PURE__ */ q(
|
|
1353
|
-
workspace:
|
|
1354
|
-
identifier:
|
|
1355
|
-
commentId:
|
|
1356
|
-
reactions:
|
|
1357
|
-
me:
|
|
1358
|
-
disabled: !
|
|
1352
|
+
/* @__PURE__ */ q(Ee, {
|
|
1353
|
+
workspace: r,
|
|
1354
|
+
identifier: i,
|
|
1355
|
+
commentId: a.id,
|
|
1356
|
+
reactions: f,
|
|
1357
|
+
me: d?.user.username,
|
|
1358
|
+
disabled: !m
|
|
1359
1359
|
})
|
|
1360
1360
|
] })
|
|
1361
1361
|
})]
|
|
1362
1362
|
});
|
|
1363
1363
|
}
|
|
1364
1364
|
function Yt({ workspace: e, identifier: t, comment: n }) {
|
|
1365
|
-
let { data: r = [] } = X(
|
|
1366
|
-
return
|
|
1365
|
+
let { data: r = [] } = X(a(e, t)), { actorName: i } = et(e), o = r.filter((e) => e.page && e.commentId === n.id);
|
|
1366
|
+
return o.length === 0 ? null : /* @__PURE__ */ q("div", {
|
|
1367
1367
|
className: "mt-2 space-y-2",
|
|
1368
|
-
children:
|
|
1368
|
+
children: o.map((e) => /* @__PURE__ */ q(y, {
|
|
1369
1369
|
attachmentId: e.id,
|
|
1370
1370
|
name: e.name,
|
|
1371
1371
|
agent: i(n.author)
|
|
1372
1372
|
}, e.id))
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
|
-
function Xt({ workspace:
|
|
1376
|
-
let
|
|
1375
|
+
function Xt({ workspace: r, identifier: i, parentId: a, publicOn: o, autofocus: s = !1, onDone: c }) {
|
|
1376
|
+
let l = G("issue.comments"), u = At(), d = G("common"), f = Dt(Zt), p = Z(), [m, h] = W(""), [g, _] = W(0), v = U(null), y = T(r, i), b = Y({
|
|
1377
1377
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/comments", {
|
|
1378
1378
|
params: { path: {
|
|
1379
|
-
workspace:
|
|
1380
|
-
identifier:
|
|
1379
|
+
workspace: r,
|
|
1380
|
+
identifier: i
|
|
1381
1381
|
} },
|
|
1382
1382
|
body: {
|
|
1383
|
-
body:
|
|
1384
|
-
...
|
|
1383
|
+
body: m,
|
|
1384
|
+
...a && { parentId: a }
|
|
1385
1385
|
}
|
|
1386
1386
|
})),
|
|
1387
1387
|
onSuccess: () => {
|
|
1388
|
-
|
|
1388
|
+
h(""), _((e) => e + 1), n(p, r, i), c?.();
|
|
1389
1389
|
}
|
|
1390
|
-
}), x = () =>
|
|
1391
|
-
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(
|
|
1390
|
+
}), x = () => m.trim() && !b.isPending && y.pending === 0 && b.mutate();
|
|
1391
|
+
return /* @__PURE__ */ J("div", { children: [/* @__PURE__ */ q(O, {
|
|
1392
1392
|
value: "",
|
|
1393
|
-
onChange:
|
|
1393
|
+
onChange: h,
|
|
1394
1394
|
onSubmit: x,
|
|
1395
|
-
onFocus: () =>
|
|
1396
|
-
onBlur: () =>
|
|
1397
|
-
autofocus:
|
|
1395
|
+
onFocus: () => f("comment"),
|
|
1396
|
+
onBlur: () => f(void 0),
|
|
1397
|
+
autofocus: s,
|
|
1398
1398
|
onEditor: (e) => {
|
|
1399
|
-
|
|
1399
|
+
v.current = e;
|
|
1400
1400
|
},
|
|
1401
|
-
onFiles: (e, t) =>
|
|
1402
|
-
placeholder:
|
|
1403
|
-
label:
|
|
1404
|
-
className:
|
|
1405
|
-
},
|
|
1401
|
+
onFiles: (e, t) => y.upload(v.current, e, t),
|
|
1402
|
+
placeholder: o ? l("replyPublic", { source: o }) : l(a ? "replyPlaceholder" : "placeholder"),
|
|
1403
|
+
label: o ? l("replyPublicButton", { source: o }) : l(a ? "reply" : "newComment"),
|
|
1404
|
+
className: a ? "min-h-8" : "min-h-12"
|
|
1405
|
+
}, g), /* @__PURE__ */ J("div", {
|
|
1406
1406
|
className: "mt-1 flex items-center justify-end gap-3",
|
|
1407
1407
|
children: [
|
|
1408
1408
|
/* @__PURE__ */ J("span", {
|
|
1409
1409
|
className: "mr-auto flex min-w-0 items-center gap-2",
|
|
1410
|
-
children: [/* @__PURE__ */ q(
|
|
1411
|
-
pending:
|
|
1412
|
-
error:
|
|
1410
|
+
children: [/* @__PURE__ */ q(S, { onFiles: (e) => y.upload(v.current, e) }), /* @__PURE__ */ q(w, {
|
|
1411
|
+
pending: y.pending,
|
|
1412
|
+
error: y.error
|
|
1413
1413
|
})]
|
|
1414
1414
|
}),
|
|
1415
|
-
|
|
1415
|
+
b.isError && /* @__PURE__ */ q(gt, {
|
|
1416
1416
|
inline: !0,
|
|
1417
1417
|
className: "text-xs",
|
|
1418
|
-
children:
|
|
1418
|
+
children: u(b.error)
|
|
1419
1419
|
}),
|
|
1420
|
-
|
|
1420
|
+
c && /* @__PURE__ */ q(z, {
|
|
1421
1421
|
type: "button",
|
|
1422
1422
|
variant: "ghost",
|
|
1423
1423
|
size: "sm",
|
|
1424
|
-
onClick:
|
|
1425
|
-
children:
|
|
1424
|
+
onClick: c,
|
|
1425
|
+
children: d("cancel")
|
|
1426
1426
|
}),
|
|
1427
1427
|
/* @__PURE__ */ q(z, {
|
|
1428
1428
|
type: "button",
|
|
1429
1429
|
variant: "primary",
|
|
1430
1430
|
size: "sm",
|
|
1431
1431
|
onClick: x,
|
|
1432
|
-
disabled: !
|
|
1433
|
-
loading:
|
|
1434
|
-
children:
|
|
1432
|
+
disabled: !m.trim() || y.pending > 0,
|
|
1433
|
+
loading: b.isPending,
|
|
1434
|
+
children: o ? l("replyPublicButton", { source: o }) : l(a ? "reply" : "submit")
|
|
1435
1435
|
})
|
|
1436
1436
|
]
|
|
1437
1437
|
})] });
|