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