@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,15 +1,15 @@
|
|
|
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 { EntityIcon as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { myTeamsQuery as n, projectsQuery as r, workspaceQuery as ee } from "../api/queries.js";
|
|
3
|
+
import { usePeople as te } from "../lib/people.js";
|
|
4
|
+
import { projectStatuses as ne } from "../lib/projectStates.js";
|
|
5
|
+
import { projectRef as re } from "../lib/projects.js";
|
|
6
|
+
import { useNavigate as ie } from "../lib/router.js";
|
|
7
|
+
import { useTime as ae } from "../lib/time.js";
|
|
8
|
+
import { Editor as oe } from "./Editor.js";
|
|
9
|
+
import { EntityIcon as i } from "./EntityIcon.js";
|
|
10
|
+
import { IconUpload as a } from "./IconUpload.js";
|
|
11
|
+
import { AddIcon as se, CalendarIcon as ce, ChevronRightIcon as le, CloseIcon as o, PriorityIcon as s, ProjectIcon as ue, UserIcon as de, UsersIcon as c, usePriorityNames as fe } from "./icons.js";
|
|
12
|
+
import { ProjectStatusIcon as l } from "./Planning.js";
|
|
13
13
|
import { Avatar as u, Button as d, Card as pe, Combobox as f, DatePicker as me, ErrorText as he, IconButton as p, Modal as ge, ModalTitle as _e, Select as m, buttonClasses as h } from "@parallelworks/ui";
|
|
14
14
|
import { useState as g } from "react";
|
|
15
15
|
import { useErrorMessage as ve } from "@parallelworks/problem/react";
|
|
@@ -19,37 +19,37 @@ import { useQuery as x, useQueryClient as ye } from "@tanstack/react-query";
|
|
|
19
19
|
// src/components/NewProjectDialog.tsx
|
|
20
20
|
var S = h({ size: "sm" });
|
|
21
21
|
function C({ workspace: h, teamId: C, onClose: w }) {
|
|
22
|
-
let T = _("planning"), E = _("common"), be = ve(), xe =
|
|
22
|
+
let T = _("planning"), E = _("common"), be = ve(), xe = ae(), D = fe(), Se = ye(), O = ie(), { members: k, person: Ce } = te(h), { data: A } = x(ee(h)), { data: we = [] } = x(n(h)), { data: Te = [] } = x(r(h)), j = Te.filter((e) => e.template), [M, Ee] = g(""), [N, De] = g(""), [P, Oe] = g(""), [F, ke] = g(""), [I, Ae] = g(""), [L, je] = g("planned"), [R, Me] = g(0), [z, Ne] = g(""), [B, Pe] = g([]), [V, Fe] = g(C ? [C] : []), [H, Ie] = g(""), [U, Le] = g(""), [W, G] = g([]), [K, q] = g(null), [J, Y] = g(!1), [Re, X] = g(null), Z = we.filter((e) => !e.archivedAt), Q = (e, t, n) => /* @__PURE__ */ y(me, {
|
|
23
23
|
value: t,
|
|
24
24
|
onValueChange: n,
|
|
25
25
|
"aria-label": e,
|
|
26
26
|
trigger: /* @__PURE__ */ b("button", {
|
|
27
27
|
type: "button",
|
|
28
28
|
className: S,
|
|
29
|
-
children: [/* @__PURE__ */ y(
|
|
29
|
+
children: [/* @__PURE__ */ y(ce, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
30
30
|
className: t ? "" : "text-muted-foreground",
|
|
31
31
|
children: t ? xe.day(t) : e
|
|
32
32
|
})]
|
|
33
33
|
})
|
|
34
34
|
}), ze = async (n) => {
|
|
35
|
-
if (n.preventDefault(),
|
|
35
|
+
if (n.preventDefault(), P.trim()) {
|
|
36
36
|
Y(!0), X(null);
|
|
37
37
|
try {
|
|
38
38
|
let n = t(await e.POST("/api/v1/workspaces/{workspace}/projects", {
|
|
39
39
|
params: { path: { workspace: h } },
|
|
40
40
|
body: {
|
|
41
|
-
name:
|
|
42
|
-
status:
|
|
43
|
-
...
|
|
44
|
-
...
|
|
45
|
-
...
|
|
46
|
-
...
|
|
47
|
-
...
|
|
48
|
-
...
|
|
49
|
-
...
|
|
50
|
-
...
|
|
51
|
-
...
|
|
52
|
-
...
|
|
41
|
+
name: P.trim(),
|
|
42
|
+
status: L,
|
|
43
|
+
...M && { from: M },
|
|
44
|
+
...F.trim() && { summary: F.trim() },
|
|
45
|
+
...I && { description: I },
|
|
46
|
+
...R && { priority: R },
|
|
47
|
+
...N && { icon: N },
|
|
48
|
+
...z && { lead: z },
|
|
49
|
+
...B.length > 0 && { members: B },
|
|
50
|
+
...V.length > 0 && { teamIds: V },
|
|
51
|
+
...H && { startDate: H },
|
|
52
|
+
...U && { targetDate: U }
|
|
53
53
|
}
|
|
54
54
|
}));
|
|
55
55
|
for (let r of W.filter((e) => e.name.trim())) t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
|
|
@@ -62,11 +62,11 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
62
62
|
...r.targetDate && { targetDate: r.targetDate }
|
|
63
63
|
}
|
|
64
64
|
}));
|
|
65
|
-
Se.invalidateQueries({ queryKey:
|
|
65
|
+
Se.invalidateQueries({ queryKey: r(h).queryKey }), w(), O({
|
|
66
66
|
to: "/$workspace/projects/$projectId",
|
|
67
67
|
params: {
|
|
68
68
|
workspace: h,
|
|
69
|
-
projectId:
|
|
69
|
+
projectId: re(n)
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
} catch (e) {
|
|
@@ -75,7 +75,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
75
75
|
Y(!1);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
}, $ =
|
|
78
|
+
}, $ = z ? Ce(z) : void 0;
|
|
79
79
|
return /* @__PURE__ */ y(ge, {
|
|
80
80
|
open: !0,
|
|
81
81
|
onClose: w,
|
|
@@ -87,15 +87,15 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
87
87
|
/* @__PURE__ */ b("div", {
|
|
88
88
|
className: "flex items-center gap-2 px-5 pt-4 text-sm",
|
|
89
89
|
children: [
|
|
90
|
-
|
|
90
|
+
A && /* @__PURE__ */ b("span", {
|
|
91
91
|
className: "flex items-center gap-1.5 rounded-md border border-border px-2 py-0.5",
|
|
92
|
-
children: [/* @__PURE__ */ y(
|
|
93
|
-
icon:
|
|
94
|
-
color:
|
|
95
|
-
name:
|
|
96
|
-
}),
|
|
92
|
+
children: [/* @__PURE__ */ y(i, {
|
|
93
|
+
icon: A.icon,
|
|
94
|
+
color: A.color,
|
|
95
|
+
name: A.name
|
|
96
|
+
}), A.name]
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */ y(
|
|
98
|
+
/* @__PURE__ */ y(le, { className: "size-3.5 text-muted-foreground" }),
|
|
99
99
|
/* @__PURE__ */ y(_e, {
|
|
100
100
|
className: "text-sm",
|
|
101
101
|
children: T("newProject")
|
|
@@ -103,7 +103,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
103
103
|
/* @__PURE__ */ y(p, {
|
|
104
104
|
variant: "ghost",
|
|
105
105
|
size: "sm",
|
|
106
|
-
icon: /* @__PURE__ */ y(
|
|
106
|
+
icon: /* @__PURE__ */ y(o, {}),
|
|
107
107
|
label: E("close"),
|
|
108
108
|
onClick: w,
|
|
109
109
|
className: "ml-auto"
|
|
@@ -113,16 +113,16 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
113
113
|
/* @__PURE__ */ b("div", {
|
|
114
114
|
className: "min-h-0 flex-1 overflow-y-auto px-5 pt-4 pb-2",
|
|
115
115
|
children: [
|
|
116
|
-
/* @__PURE__ */ y(
|
|
116
|
+
/* @__PURE__ */ y(a, {
|
|
117
117
|
workspace: h,
|
|
118
|
-
icon:
|
|
119
|
-
name:
|
|
120
|
-
onChange:
|
|
118
|
+
icon: N,
|
|
119
|
+
name: P || T("project"),
|
|
120
|
+
onChange: De,
|
|
121
121
|
size: 40
|
|
122
122
|
}),
|
|
123
123
|
/* @__PURE__ */ y("input", {
|
|
124
|
-
value:
|
|
125
|
-
onChange: (e) =>
|
|
124
|
+
value: P,
|
|
125
|
+
onChange: (e) => Oe(e.target.value),
|
|
126
126
|
autoFocus: !0,
|
|
127
127
|
required: !0,
|
|
128
128
|
maxLength: 200,
|
|
@@ -131,8 +131,8 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
131
131
|
className: "mt-3 w-full bg-transparent text-2xl font-semibold tracking-tight outline-none placeholder:text-muted-foreground/60"
|
|
132
132
|
}),
|
|
133
133
|
/* @__PURE__ */ y("input", {
|
|
134
|
-
value:
|
|
135
|
-
onChange: (e) =>
|
|
134
|
+
value: F,
|
|
135
|
+
onChange: (e) => ke(e.target.value),
|
|
136
136
|
maxLength: 200,
|
|
137
137
|
"aria-label": T("summary"),
|
|
138
138
|
placeholder: T("summaryPlaceholder"),
|
|
@@ -140,9 +140,9 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ y("div", {
|
|
142
142
|
className: "mt-4",
|
|
143
|
-
children: /* @__PURE__ */ y(
|
|
143
|
+
children: /* @__PURE__ */ y(oe, {
|
|
144
144
|
value: "",
|
|
145
|
-
onChange:
|
|
145
|
+
onChange: Ae,
|
|
146
146
|
placeholder: T("projectBrief"),
|
|
147
147
|
label: E("description"),
|
|
148
148
|
className: "min-h-32"
|
|
@@ -159,7 +159,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
159
159
|
className: "text-sm font-medium",
|
|
160
160
|
children: T("milestones")
|
|
161
161
|
}), /* @__PURE__ */ y(p, {
|
|
162
|
-
icon: /* @__PURE__ */ y(
|
|
162
|
+
icon: /* @__PURE__ */ y(se, { className: "size-3.5" }),
|
|
163
163
|
label: T("addMilestone"),
|
|
164
164
|
size: "xs",
|
|
165
165
|
onClick: () => G((e) => [...e, {
|
|
@@ -190,7 +190,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
190
190
|
/* @__PURE__ */ y(p, {
|
|
191
191
|
variant: "ghost",
|
|
192
192
|
size: "sm",
|
|
193
|
-
icon: /* @__PURE__ */ y(
|
|
193
|
+
icon: /* @__PURE__ */ y(o, {}),
|
|
194
194
|
label: T("removeMilestone"),
|
|
195
195
|
onClick: () => G((t) => t.filter((t) => t.key !== e.key))
|
|
196
196
|
})
|
|
@@ -202,61 +202,61 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
202
202
|
/* @__PURE__ */ b("div", {
|
|
203
203
|
className: "flex flex-wrap items-center gap-1.5 border-t border-border px-5 pt-3",
|
|
204
204
|
children: [
|
|
205
|
-
|
|
205
|
+
j.length > 0 && /* @__PURE__ */ y(m, {
|
|
206
206
|
"aria-label": T("startFrom"),
|
|
207
|
-
value:
|
|
208
|
-
onValueChange: (e) =>
|
|
207
|
+
value: M,
|
|
208
|
+
onValueChange: (e) => Ee(e ?? ""),
|
|
209
209
|
items: [{
|
|
210
210
|
value: "",
|
|
211
211
|
label: T("blankProject")
|
|
212
|
-
}, ...
|
|
212
|
+
}, ...j.map((e) => ({
|
|
213
213
|
value: e.id,
|
|
214
214
|
label: e.name
|
|
215
215
|
}))],
|
|
216
216
|
trigger: /* @__PURE__ */ b("button", {
|
|
217
217
|
type: "button",
|
|
218
218
|
className: S,
|
|
219
|
-
children: [/* @__PURE__ */ y(
|
|
219
|
+
children: [/* @__PURE__ */ y(ue, { className: "size-3.5 text-muted-foreground" }), M ? T("fromTemplate", { name: j.find((e) => e.id === M)?.name ?? "" }) : T("blankProject")]
|
|
220
220
|
})
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ y(m, {
|
|
223
223
|
"aria-label": T("statusLabel"),
|
|
224
|
-
value:
|
|
225
|
-
onValueChange: (e) => e &&
|
|
226
|
-
items:
|
|
224
|
+
value: L,
|
|
225
|
+
onValueChange: (e) => e && je(e),
|
|
226
|
+
items: ne.map((e) => ({
|
|
227
227
|
value: e,
|
|
228
228
|
label: T(`status.${e}`),
|
|
229
|
-
icon: /* @__PURE__ */ y(
|
|
229
|
+
icon: /* @__PURE__ */ y(l, { status: e })
|
|
230
230
|
})),
|
|
231
231
|
trigger: /* @__PURE__ */ b("button", {
|
|
232
232
|
type: "button",
|
|
233
233
|
className: S,
|
|
234
|
-
children: [/* @__PURE__ */ y(
|
|
234
|
+
children: [/* @__PURE__ */ y(l, { status: L }), T(`status.${L}`)]
|
|
235
235
|
})
|
|
236
236
|
}),
|
|
237
237
|
/* @__PURE__ */ y(m, {
|
|
238
238
|
"aria-label": T("priority"),
|
|
239
|
-
value: String(
|
|
240
|
-
onValueChange: (e) => e &&
|
|
239
|
+
value: String(R),
|
|
240
|
+
onValueChange: (e) => e && Me(Number(e)),
|
|
241
241
|
items: D.map((e, t) => ({
|
|
242
242
|
value: String(t),
|
|
243
243
|
label: e,
|
|
244
|
-
icon: /* @__PURE__ */ y(
|
|
244
|
+
icon: /* @__PURE__ */ y(s, { priority: t })
|
|
245
245
|
})),
|
|
246
246
|
trigger: /* @__PURE__ */ b("button", {
|
|
247
247
|
type: "button",
|
|
248
248
|
className: S,
|
|
249
|
-
children: [/* @__PURE__ */ y(
|
|
249
|
+
children: [/* @__PURE__ */ y(s, { priority: R }), R ? D[R] : T("noPriority")]
|
|
250
250
|
})
|
|
251
251
|
}),
|
|
252
252
|
/* @__PURE__ */ y(f, {
|
|
253
253
|
"aria-label": T("lead"),
|
|
254
|
-
value:
|
|
255
|
-
onValueChange: (e) =>
|
|
254
|
+
value: z,
|
|
255
|
+
onValueChange: (e) => Ne(e ?? ""),
|
|
256
256
|
items: [{
|
|
257
257
|
value: "",
|
|
258
258
|
label: T("noLead")
|
|
259
|
-
}, ...
|
|
259
|
+
}, ...k.map((e) => ({
|
|
260
260
|
value: e.user.username,
|
|
261
261
|
label: e.user.name,
|
|
262
262
|
icon: /* @__PURE__ */ y(u, {
|
|
@@ -274,7 +274,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
274
274
|
src: $.avatarUrl,
|
|
275
275
|
size: "xs",
|
|
276
276
|
decorative: !0
|
|
277
|
-
}), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(
|
|
277
|
+
}), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(de, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
278
278
|
className: "text-muted-foreground",
|
|
279
279
|
children: T("lead")
|
|
280
280
|
})] })
|
|
@@ -284,7 +284,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
284
284
|
open: K === "members",
|
|
285
285
|
onOpenChange: (e) => q(e ? "members" : null),
|
|
286
286
|
multiple: !0,
|
|
287
|
-
items:
|
|
287
|
+
items: k.map((e) => ({
|
|
288
288
|
value: e.user.username,
|
|
289
289
|
label: e.user.name,
|
|
290
290
|
icon: /* @__PURE__ */ y(u, {
|
|
@@ -294,20 +294,20 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
294
294
|
decorative: !0
|
|
295
295
|
})
|
|
296
296
|
})),
|
|
297
|
-
value:
|
|
298
|
-
onValueChange:
|
|
297
|
+
value: B,
|
|
298
|
+
onValueChange: Pe,
|
|
299
299
|
placeholder: T("members"),
|
|
300
300
|
trigger: /* @__PURE__ */ b("button", {
|
|
301
301
|
type: "button",
|
|
302
302
|
className: S,
|
|
303
|
-
children: [/* @__PURE__ */ y(
|
|
304
|
-
className:
|
|
305
|
-
children:
|
|
303
|
+
children: [/* @__PURE__ */ y(c, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
304
|
+
className: B.length ? "" : "text-muted-foreground",
|
|
305
|
+
children: B.length ? T("memberCount", { count: B.length }) : T("members")
|
|
306
306
|
})]
|
|
307
307
|
})
|
|
308
308
|
}),
|
|
309
|
-
Q(T("startDate"),
|
|
310
|
-
Q(T("targetDate"),
|
|
309
|
+
Q(T("startDate"), H, Ie),
|
|
310
|
+
Q(T("targetDate"), U, Le),
|
|
311
311
|
/* @__PURE__ */ y(f, {
|
|
312
312
|
open: K === "teams",
|
|
313
313
|
onOpenChange: (e) => q(e ? "teams" : null),
|
|
@@ -316,21 +316,21 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
316
316
|
value: e.id,
|
|
317
317
|
label: e.name,
|
|
318
318
|
hint: e.key,
|
|
319
|
-
icon: /* @__PURE__ */ y(
|
|
319
|
+
icon: /* @__PURE__ */ y(i, {
|
|
320
320
|
icon: e.icon,
|
|
321
321
|
color: e.color,
|
|
322
322
|
name: e.name
|
|
323
323
|
})
|
|
324
324
|
})),
|
|
325
|
-
value:
|
|
326
|
-
onValueChange:
|
|
325
|
+
value: V,
|
|
326
|
+
onValueChange: Fe,
|
|
327
327
|
placeholder: T("teams"),
|
|
328
328
|
trigger: /* @__PURE__ */ b("button", {
|
|
329
329
|
type: "button",
|
|
330
330
|
className: S,
|
|
331
|
-
children: [/* @__PURE__ */ y(
|
|
332
|
-
className:
|
|
333
|
-
children:
|
|
331
|
+
children: [/* @__PURE__ */ y(c, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
332
|
+
className: V.length ? "" : "text-muted-foreground",
|
|
333
|
+
children: V.length ? Z.filter((e) => V.includes(e.id)).map((e) => e.key).join(", ") : T("teams")
|
|
334
334
|
})]
|
|
335
335
|
})
|
|
336
336
|
})
|
|
@@ -353,7 +353,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
353
353
|
/* @__PURE__ */ y(d, {
|
|
354
354
|
type: "submit",
|
|
355
355
|
variant: "primary",
|
|
356
|
-
disabled: J || !
|
|
356
|
+
disabled: J || !P.trim(),
|
|
357
357
|
children: T(J ? "creating" : "createProject")
|
|
358
358
|
})
|
|
359
359
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { personActivityQuery as e } from "../api/queries.js";
|
|
2
|
+
import { usePeople as t } from "../lib/people.js";
|
|
3
|
+
import { Link as n } from "../lib/router.js";
|
|
4
|
+
import { addDays as r, today as i, useTime as a } from "../lib/time.js";
|
|
5
|
+
import { Timeline as o, TimelineItem as s, activityIcon as c } from "./ActivityTimeline.js";
|
|
6
|
+
import { ErrorMessage as l } from "./status.js";
|
|
7
7
|
import { Button as u, EmptyState as d } from "@parallelworks/ui";
|
|
8
8
|
import { useLocale as f, useTranslations as p } from "use-intl";
|
|
9
9
|
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -25,9 +25,9 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
25
25
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
|
26
26
|
};
|
|
27
27
|
function y({ workspace: y, username: b }) {
|
|
28
|
-
let x = p("person.activity"), S = f(), C =
|
|
28
|
+
let x = p("person.activity"), S = f(), C = a(), { nameOf: w, actorName: T } = t(y), { data: E, error: D, fetchNextPage: O, hasNextPage: k, isFetchingNextPage: A, isPending: j } = g(e(y, b)), M = (E?.pages.flatMap((e) => e.items) ?? []).filter((e) => e.issue || e.doc || _.has(e.type) || e.data.name);
|
|
29
29
|
if (j) return null;
|
|
30
|
-
if (D && !E) return /* @__PURE__ */ m(
|
|
30
|
+
if (D && !E) return /* @__PURE__ */ m(l, { error: D });
|
|
31
31
|
if (M.length === 0) return /* @__PURE__ */ m(d, {
|
|
32
32
|
title: x("none"),
|
|
33
33
|
description: x("noneDetail")
|
|
@@ -46,7 +46,7 @@ function y({ workspace: y, username: b }) {
|
|
|
46
46
|
className: "font-medium text-foreground",
|
|
47
47
|
children: e
|
|
48
48
|
})
|
|
49
|
-
}), I = (e) => e.issue ? /* @__PURE__ */ h(
|
|
49
|
+
}), I = (e) => e.issue ? /* @__PURE__ */ h(n, {
|
|
50
50
|
to: "/$workspace/issues/$identifier",
|
|
51
51
|
params: {
|
|
52
52
|
workspace: y,
|
|
@@ -64,7 +64,7 @@ function y({ workspace: y, username: b }) {
|
|
|
64
64
|
children: e.issue.title
|
|
65
65
|
})
|
|
66
66
|
]
|
|
67
|
-
}) : e.doc ? /* @__PURE__ */ m(
|
|
67
|
+
}) : e.doc ? /* @__PURE__ */ m(n, {
|
|
68
68
|
to: "/$workspace/docs/$doc",
|
|
69
69
|
params: {
|
|
70
70
|
workspace: y,
|
|
@@ -89,7 +89,7 @@ function y({ workspace: y, username: b }) {
|
|
|
89
89
|
rows: [e]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B =
|
|
92
|
+
let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B = i(), V = (e) => e === B ? z.format(0, "day") : e === r(B, -1) ? z.format(-1, "day") : C.day(e);
|
|
93
93
|
return /* @__PURE__ */ h("div", {
|
|
94
94
|
className: "w-full max-w-3xl px-4 py-4 md:px-6",
|
|
95
95
|
children: [R.map(({ day: e, rows: t }) => /* @__PURE__ */ h("section", {
|
|
@@ -97,9 +97,9 @@ function y({ workspace: y, username: b }) {
|
|
|
97
97
|
children: [/* @__PURE__ */ m("h3", {
|
|
98
98
|
className: "mb-2 text-xs font-medium text-muted-foreground first-letter:uppercase",
|
|
99
99
|
children: V(e)
|
|
100
|
-
}), /* @__PURE__ */ m(
|
|
100
|
+
}), /* @__PURE__ */ m(o, { children: t.map(({ it: e, count: t }) => /* @__PURE__ */ h(s, {
|
|
101
101
|
workspace: y,
|
|
102
|
-
icon:
|
|
102
|
+
icon: c(e.type, e.data),
|
|
103
103
|
actor: e.actor,
|
|
104
104
|
at: e.createdAt,
|
|
105
105
|
children: [
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { personCardQuery as e } from "../api/queries.js";
|
|
2
|
+
import { usePeople as t } from "../lib/people.js";
|
|
3
|
+
import { useRoleName as n } from "../lib/roles.js";
|
|
4
|
+
import { useNavigate as r } from "../lib/router.js";
|
|
5
|
+
import { CalendarIcon as i, CheckIcon as a, ClockIcon as o, MailIcon as s, ShieldIcon as c, UserIcon as l, UsersIcon as u } from "./icons.js";
|
|
6
6
|
import { HoverCard as d, useCopy as f } from "@parallelworks/ui";
|
|
7
7
|
import { useFormatter as p, useTranslations as m } from "use-intl";
|
|
8
8
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
@@ -22,89 +22,89 @@ function x({ workspace: e, kind: t = "user", handle: n, className: r = "inline-f
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
var S = (e) => e.stopPropagation();
|
|
25
|
-
function C({ workspace: e, handle:
|
|
26
|
-
let { person:
|
|
27
|
-
return
|
|
25
|
+
function C({ workspace: e, handle: r }) {
|
|
26
|
+
let { person: i } = t(e), a = n(e), o = i(r);
|
|
27
|
+
return o.role ? /* @__PURE__ */ g("span", {
|
|
28
28
|
className: "contents",
|
|
29
29
|
onClick: S,
|
|
30
30
|
onContextMenu: S,
|
|
31
31
|
onPointerDown: S,
|
|
32
32
|
onMouseDown: S,
|
|
33
33
|
children: /* @__PURE__ */ _(b, {
|
|
34
|
-
username:
|
|
35
|
-
name:
|
|
36
|
-
avatarSrc:
|
|
37
|
-
badge:
|
|
34
|
+
username: o.username,
|
|
35
|
+
name: o.name,
|
|
36
|
+
avatarSrc: o.avatarUrl,
|
|
37
|
+
badge: o.role && a(o.role),
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ g(D, {
|
|
40
40
|
workspace: e,
|
|
41
|
-
username:
|
|
41
|
+
username: o.username
|
|
42
42
|
}),
|
|
43
|
-
|
|
43
|
+
o.email && /* @__PURE__ */ g(w, { email: o.email }),
|
|
44
44
|
/* @__PURE__ */ g(T, {
|
|
45
45
|
workspace: e,
|
|
46
|
-
username:
|
|
46
|
+
username: o.username
|
|
47
47
|
})
|
|
48
48
|
]
|
|
49
49
|
})
|
|
50
50
|
}) : null;
|
|
51
51
|
}
|
|
52
52
|
function w({ email: e }) {
|
|
53
|
-
let t = m("personCard"), n = m("common"), { copy:
|
|
53
|
+
let t = m("personCard"), n = m("common"), { copy: r, copied: i } = f();
|
|
54
54
|
return /* @__PURE__ */ g(y, {
|
|
55
|
-
icon: g(
|
|
55
|
+
icon: g(i ? a : s, {}),
|
|
56
56
|
title: n("copyEmail"),
|
|
57
57
|
truncate: !0,
|
|
58
|
-
onClick: () =>
|
|
59
|
-
children:
|
|
58
|
+
onClick: () => r(e, { success: t("emailCopied") }),
|
|
59
|
+
children: i ? t("emailCopied") : e
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function T({ workspace:
|
|
63
|
-
let
|
|
62
|
+
function T({ workspace: e, username: t }) {
|
|
63
|
+
let n = m("personCard"), i = r();
|
|
64
64
|
return /* @__PURE__ */ g(y, {
|
|
65
|
-
icon: /* @__PURE__ */ g(
|
|
65
|
+
icon: /* @__PURE__ */ g(l, {}),
|
|
66
66
|
onClick: () => i({
|
|
67
67
|
to: "/$workspace/people/$username",
|
|
68
68
|
params: {
|
|
69
|
-
workspace:
|
|
70
|
-
username:
|
|
69
|
+
workspace: e,
|
|
70
|
+
username: t
|
|
71
71
|
}
|
|
72
72
|
}),
|
|
73
|
-
children:
|
|
73
|
+
children: n("viewProfile")
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
var E = 3e5;
|
|
77
|
-
function D({ workspace:
|
|
78
|
-
let
|
|
79
|
-
if (!
|
|
80
|
-
let
|
|
77
|
+
function D({ workspace: t, username: n }) {
|
|
78
|
+
let r = m("personCard"), a = p(), { data: s } = v(e(t, n));
|
|
79
|
+
if (!s) return null;
|
|
80
|
+
let l = s.lastActiveAt ? new Date(s.lastActiveAt) : void 0, d = !!l && Date.now() - l.getTime() < E, f = "";
|
|
81
81
|
try {
|
|
82
|
-
|
|
82
|
+
s.timeZone && (f = a.dateTime(/* @__PURE__ */ new Date(), {
|
|
83
83
|
timeStyle: "short",
|
|
84
|
-
timeZone:
|
|
84
|
+
timeZone: s.timeZone
|
|
85
85
|
}));
|
|
86
86
|
} catch {}
|
|
87
87
|
return /* @__PURE__ */ _(h, { children: [
|
|
88
|
-
|
|
88
|
+
l && /* @__PURE__ */ g(y, {
|
|
89
89
|
icon: /* @__PURE__ */ g("span", { className: `size-2 rounded-full ${d ? "bg-success" : "bg-muted-foreground/50"}` }),
|
|
90
|
-
children: d ?
|
|
90
|
+
children: d ? r("online") : r("lastActive", { when: a.relativeTime(l) })
|
|
91
91
|
}),
|
|
92
|
-
|
|
93
|
-
icon: /* @__PURE__ */ g(o, {}),
|
|
94
|
-
children: a(l.status === "active" ? "active" : "notActive", { status: l.status })
|
|
95
|
-
}),
|
|
96
|
-
l.groups.length > 0 && /* @__PURE__ */ g(y, {
|
|
92
|
+
s.status && /* @__PURE__ */ g(y, {
|
|
97
93
|
icon: /* @__PURE__ */ g(c, {}),
|
|
94
|
+
children: r(s.status === "active" ? "active" : "notActive", { status: s.status })
|
|
95
|
+
}),
|
|
96
|
+
s.groups.length > 0 && /* @__PURE__ */ g(y, {
|
|
97
|
+
icon: /* @__PURE__ */ g(u, {}),
|
|
98
98
|
align: "start",
|
|
99
|
-
children:
|
|
99
|
+
children: s.groups.join(", ")
|
|
100
100
|
}),
|
|
101
101
|
f && /* @__PURE__ */ g(y, {
|
|
102
|
-
icon: /* @__PURE__ */ g(
|
|
103
|
-
children:
|
|
102
|
+
icon: /* @__PURE__ */ g(o, {}),
|
|
103
|
+
children: r("localTime", { time: f })
|
|
104
104
|
}),
|
|
105
|
-
|
|
106
|
-
icon: /* @__PURE__ */ g(
|
|
107
|
-
children:
|
|
105
|
+
s.joinedAt && /* @__PURE__ */ g(y, {
|
|
106
|
+
icon: /* @__PURE__ */ g(i, {}),
|
|
107
|
+
children: r("joined", { date: a.dateTime(new Date(s.joinedAt), { dateStyle: "medium" }) })
|
|
108
108
|
})
|
|
109
109
|
] });
|
|
110
110
|
}
|
package/components/Planning.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { addDays as e, today as t, useTime as n } from "../lib/time.js";
|
|
2
|
+
import { CalendarIcon as r, ClockIcon as i, StatusIcon as a } from "./icons.js";
|
|
3
3
|
import { ProgressBar as o, Tooltip as s } from "@parallelworks/ui";
|
|
4
4
|
import { useLocale as c, useTranslations as l } from "use-intl";
|
|
5
5
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -12,7 +12,7 @@ var f = {
|
|
|
12
12
|
canceled: "canceled"
|
|
13
13
|
};
|
|
14
14
|
function p({ status: e }) {
|
|
15
|
-
return /* @__PURE__ */ u(
|
|
15
|
+
return /* @__PURE__ */ u(a, { category: f[e] });
|
|
16
16
|
}
|
|
17
17
|
function m({ progress: e, compact: t = !1 }) {
|
|
18
18
|
let n = l("planning"), r = c(), i = e.total;
|
|
@@ -83,24 +83,24 @@ function _() {
|
|
|
83
83
|
function v(e, t) {
|
|
84
84
|
return t === "tshirt" && h[e] ? h[e] : String(e);
|
|
85
85
|
}
|
|
86
|
-
function y(
|
|
87
|
-
if (
|
|
88
|
-
let
|
|
89
|
-
return
|
|
86
|
+
function y(n, r) {
|
|
87
|
+
if (r) return "later";
|
|
88
|
+
let i = t();
|
|
89
|
+
return n < i ? "overdue" : n <= e(i, 3) ? "soon" : "later";
|
|
90
90
|
}
|
|
91
91
|
var b = {
|
|
92
92
|
overdue: "text-danger",
|
|
93
93
|
soon: "text-warning",
|
|
94
94
|
later: "text-muted-foreground"
|
|
95
95
|
};
|
|
96
|
-
function x({ date:
|
|
97
|
-
let
|
|
96
|
+
function x({ date: e, closed: t }) {
|
|
97
|
+
let i = l("planning"), a = n(), o = y(e, t);
|
|
98
98
|
return /* @__PURE__ */ u(s, {
|
|
99
|
-
content:
|
|
99
|
+
content: i(`due.${o}`, { date: a.day(e) }),
|
|
100
100
|
describesAnchor: !0,
|
|
101
101
|
children: /* @__PURE__ */ d("span", {
|
|
102
102
|
className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${b[o]}`,
|
|
103
|
-
children: [/* @__PURE__ */ u(
|
|
103
|
+
children: [/* @__PURE__ */ u(r, { className: "size-3" }), o === "later" ? a.day(e) : i(`dueShort.${o}`, { date: a.day(e) })]
|
|
104
104
|
})
|
|
105
105
|
});
|
|
106
106
|
}
|
|
@@ -123,16 +123,16 @@ function E(e, t) {
|
|
|
123
123
|
let n = T[t - 1];
|
|
124
124
|
return n && e ? e.slaHours[n] : 0;
|
|
125
125
|
}
|
|
126
|
-
function D({ issue: e, team:
|
|
127
|
-
let r = l("planning.sla"),
|
|
126
|
+
function D({ issue: e, team: t }) {
|
|
127
|
+
let r = l("planning.sla"), a = n();
|
|
128
128
|
if (!e.slaDueAt || e.status.category === "completed" || e.status.category === "canceled") return null;
|
|
129
|
-
let o = C(e.slaDueAt, E(
|
|
129
|
+
let o = C(e.slaDueAt, E(t, e.priority)), c = (Date.parse(e.slaDueAt) - Date.now()) / 1e3;
|
|
130
130
|
return /* @__PURE__ */ u(s, {
|
|
131
|
-
content: r(o === "breached" ? "breachedTip" : "dueTip", { when:
|
|
131
|
+
content: r(o === "breached" ? "breachedTip" : "dueTip", { when: a.full(e.slaDueAt) }),
|
|
132
132
|
describesAnchor: !0,
|
|
133
133
|
children: /* @__PURE__ */ d("span", {
|
|
134
134
|
className: `inline-flex shrink-0 items-center gap-1 text-xs tabular-nums ${w[o]}`,
|
|
135
|
-
children: [/* @__PURE__ */ u(
|
|
135
|
+
children: [/* @__PURE__ */ u(i, { className: "size-3" }), o === "breached" ? r("breached", { time: a.duration(-c) }) : r("left", { time: a.duration(c) })]
|
|
136
136
|
})
|
|
137
137
|
});
|
|
138
138
|
}
|