@parallelworks/tandem-web 0.150.3 → 0.152.0
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 +36 -4
- package/_virtual/_virtual_i18n/es/common.js +36 -4
- package/_virtual/_virtual_i18n/ja/common.js +36 -4
- package/_virtual/_virtual_i18n/ko/common.js +36 -4
- package/_virtual/_virtual_i18n/zh/common.js +36 -4
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +1 -1
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +414 -151
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { Link as n } from "../lib/router.js";
|
|
3
|
-
import { availableRepositoriesQuery as r, codeHostQuery as
|
|
4
|
-
import {
|
|
3
|
+
import { availableRepositoriesQuery as r, codeHostQuery as ee, githubSettingsQuery as i, repositoriesQuery as a, teamsQuery as o } from "../api/queries.js";
|
|
4
|
+
import { copyItem as s } from "../lib/menus.js";
|
|
5
|
+
import { externalUrl as c } from "../lib/externalUrl.js";
|
|
5
6
|
import { AddIcon as l, RepositoryIcon as u } from "./icons.js";
|
|
6
|
-
import {
|
|
7
|
-
import { useFormError as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useMutation as D, useQuery as O, useQueryClient as ne, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
7
|
+
import { useConfirm as te } from "../lib/confirm.js";
|
|
8
|
+
import { useFormError as d } from "./settings.js";
|
|
9
|
+
import { RepositoryIssueSync as f } from "./GitHub.js";
|
|
10
|
+
import { Button as p, Card as m, Checkbox as h, Combobox as g, ErrorText as ne, InfoTip as _, Section as v, Tooltip as y, menuDivider as b, useOpenMenu as x } from "@parallelworks/ui";
|
|
11
|
+
import { useState as S } from "react";
|
|
12
|
+
import { useTranslations as C } from "use-intl";
|
|
13
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { useMutation as E, useQuery as D, useQueryClient as O, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
15
15
|
// src/components/TeamRepositories.tsx
|
|
16
16
|
var A = "cursor-help underline decoration-dotted underline-offset-2";
|
|
17
17
|
function j({ workspace: j, team: M, isAdmin: N }) {
|
|
18
|
-
let P =
|
|
19
|
-
...
|
|
18
|
+
let P = C("code"), F = C("common"), { data: I } = k(ee(j)), { data: L } = k(a(j, M.key)), { data: R } = D({
|
|
19
|
+
...i(j),
|
|
20
20
|
enabled: N
|
|
21
|
-
}), z =
|
|
21
|
+
}), z = C("github"), [B, V] = S(!1), H = I.connections.some((e) => !e.removed), U = D({
|
|
22
22
|
...r(j, M.key),
|
|
23
23
|
enabled: B && N && H
|
|
24
|
-
}), W =
|
|
24
|
+
}), W = O(), G = x(), K = d(), { confirm: q, dialog: J } = te(), Y = () => W.invalidateQueries({ queryKey: a(j, M.key).queryKey }), X = (e) => {
|
|
25
25
|
let [t = "", n = ""] = e.split("/");
|
|
26
26
|
return { path: {
|
|
27
27
|
workspace: j,
|
|
@@ -29,7 +29,7 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
29
29
|
owner: t,
|
|
30
30
|
name: n
|
|
31
31
|
} };
|
|
32
|
-
}, Z =
|
|
32
|
+
}, Z = E({
|
|
33
33
|
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/repositories/{owner}/{name}", {
|
|
34
34
|
params: X(n.repository),
|
|
35
35
|
body: { default: n.makeDefault }
|
|
@@ -37,11 +37,11 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
37
37
|
onMutate: K.clear,
|
|
38
38
|
onError: K.set,
|
|
39
39
|
onSettled: Y
|
|
40
|
-
}), re =
|
|
40
|
+
}), re = E({
|
|
41
41
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/repositories/{owner}/{name}", { params: X(n) })),
|
|
42
42
|
onMutate: K.clear,
|
|
43
43
|
onSettled: Y
|
|
44
|
-
}), Q =
|
|
44
|
+
}), Q = E({
|
|
45
45
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
46
46
|
params: { path: {
|
|
47
47
|
workspace: j,
|
|
@@ -51,40 +51,40 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
51
51
|
})),
|
|
52
52
|
onMutate: K.clear,
|
|
53
53
|
onError: K.set,
|
|
54
|
-
onSettled: () => W.invalidateQueries({ queryKey:
|
|
54
|
+
onSettled: () => W.invalidateQueries({ queryKey: o(j).queryKey })
|
|
55
55
|
}), $ = (e) => q({
|
|
56
56
|
title: P("unlinkConfirm", { repository: e }),
|
|
57
57
|
description: P("unlinkDetail"),
|
|
58
58
|
confirmLabel: P("unlink"),
|
|
59
59
|
onConfirm: () => re.mutateAsync(e)
|
|
60
60
|
});
|
|
61
|
-
if (I.provider === "") return /* @__PURE__ */
|
|
61
|
+
if (I.provider === "") return /* @__PURE__ */ w(v, {
|
|
62
62
|
variant: "bare",
|
|
63
63
|
headingLevel: 2,
|
|
64
64
|
collapsible: !1,
|
|
65
65
|
title: P("repositories"),
|
|
66
|
-
children: /* @__PURE__ */
|
|
66
|
+
children: /* @__PURE__ */ w("p", {
|
|
67
67
|
className: "text-sm text-muted-foreground",
|
|
68
68
|
children: P("notConfigured")
|
|
69
69
|
})
|
|
70
70
|
});
|
|
71
71
|
let ie = new Set(L.map((e) => `${e.owner}/${e.name}`.toLowerCase()));
|
|
72
|
-
return /* @__PURE__ */
|
|
72
|
+
return /* @__PURE__ */ T(v, {
|
|
73
73
|
variant: "bare",
|
|
74
74
|
headingLevel: 2,
|
|
75
75
|
collapsible: !1,
|
|
76
76
|
title: P("repositories"),
|
|
77
77
|
description: P("repositoriesDescription"),
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ T(m, {
|
|
80
80
|
size: "fill",
|
|
81
81
|
padding: "none",
|
|
82
82
|
divided: !0,
|
|
83
83
|
interactive: !1,
|
|
84
|
-
render: /* @__PURE__ */
|
|
84
|
+
render: /* @__PURE__ */ w("ul", {}),
|
|
85
85
|
children: [L.map((e) => {
|
|
86
|
-
let t = `${e.owner}/${e.name}`, n =
|
|
87
|
-
return /* @__PURE__ */
|
|
86
|
+
let t = `${e.owner}/${e.name}`, n = c(e.url), r = R?.enabled && R.repositories.find((e) => e.team === M.key && e.fullName.toLowerCase() === t.toLowerCase());
|
|
87
|
+
return /* @__PURE__ */ T("li", {
|
|
88
88
|
onContextMenu: (r) => G(r, [
|
|
89
89
|
n ? {
|
|
90
90
|
label: P("openOnHost"),
|
|
@@ -95,9 +95,9 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
95
95
|
disabled: !0,
|
|
96
96
|
onClick: () => {}
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
s(F("copyName"), t),
|
|
99
99
|
...N ? [
|
|
100
|
-
|
|
100
|
+
b,
|
|
101
101
|
{
|
|
102
102
|
label: P("makeDefault"),
|
|
103
103
|
disabled: e.default,
|
|
@@ -114,29 +114,29 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
114
114
|
] : []
|
|
115
115
|
]),
|
|
116
116
|
className: "px-3 py-2 text-sm",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ T("div", {
|
|
118
118
|
className: "flex items-center gap-3",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ w(u, { className: "size-4 text-muted-foreground" }),
|
|
121
|
+
/* @__PURE__ */ w("a", {
|
|
122
122
|
href: n,
|
|
123
123
|
target: "_blank",
|
|
124
124
|
rel: "noopener noreferrer",
|
|
125
125
|
className: "min-w-0 truncate hover:underline",
|
|
126
126
|
children: t
|
|
127
127
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ w("span", {
|
|
129
129
|
className: "flex-1 text-xs text-muted-foreground",
|
|
130
|
-
children: e.default ? /* @__PURE__ */
|
|
130
|
+
children: e.default ? /* @__PURE__ */ w(_, {
|
|
131
131
|
text: P("defaultHint"),
|
|
132
132
|
className: A,
|
|
133
133
|
children: P("defaultRepository")
|
|
134
134
|
}) : e.private && P("private")
|
|
135
135
|
}),
|
|
136
|
-
N && !e.default && /* @__PURE__ */
|
|
136
|
+
N && !e.default && /* @__PURE__ */ w(y, {
|
|
137
137
|
content: P("makeDefaultHint"),
|
|
138
138
|
describesAnchor: !0,
|
|
139
|
-
children: /* @__PURE__ */
|
|
139
|
+
children: /* @__PURE__ */ w("button", {
|
|
140
140
|
type: "button",
|
|
141
141
|
onClick: () => Z.mutate({
|
|
142
142
|
repository: t,
|
|
@@ -146,22 +146,22 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
146
146
|
children: P("makeDefault")
|
|
147
147
|
})
|
|
148
148
|
}),
|
|
149
|
-
N && /* @__PURE__ */
|
|
149
|
+
N && /* @__PURE__ */ w("button", {
|
|
150
150
|
type: "button",
|
|
151
151
|
onClick: () => $(t),
|
|
152
152
|
className: "text-xs text-muted-foreground hover:text-danger",
|
|
153
153
|
children: P("unlink")
|
|
154
154
|
})
|
|
155
155
|
]
|
|
156
|
-
}), r && /* @__PURE__ */
|
|
156
|
+
}), r && /* @__PURE__ */ w("div", {
|
|
157
157
|
className: "mt-2 pl-7",
|
|
158
|
-
children: /* @__PURE__ */
|
|
158
|
+
children: /* @__PURE__ */ w(f, {
|
|
159
159
|
workspace: j,
|
|
160
160
|
repository: r,
|
|
161
161
|
teamName: M.name,
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ w("span", {
|
|
163
163
|
className: "flex-1 text-xs text-muted-foreground",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ w(_, {
|
|
165
165
|
text: z("issueSyncHint"),
|
|
166
166
|
className: A,
|
|
167
167
|
children: z("issueSync")
|
|
@@ -170,30 +170,30 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
170
170
|
})
|
|
171
171
|
})]
|
|
172
172
|
}, t);
|
|
173
|
-
}), L.length === 0 && /* @__PURE__ */
|
|
173
|
+
}), L.length === 0 && /* @__PURE__ */ w("li", {
|
|
174
174
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
175
175
|
children: P("noRepositories")
|
|
176
176
|
})]
|
|
177
177
|
}),
|
|
178
|
-
N && !H && /* @__PURE__ */
|
|
178
|
+
N && !H && /* @__PURE__ */ w("p", {
|
|
179
179
|
className: "mt-3 text-sm text-muted-foreground",
|
|
180
|
-
children: P.rich("connectFirst", { settings: (e) => /* @__PURE__ */
|
|
180
|
+
children: P.rich("connectFirst", { settings: (e) => /* @__PURE__ */ w(n, {
|
|
181
181
|
to: "/$workspace/settings/github",
|
|
182
182
|
params: { workspace: j },
|
|
183
183
|
className: "underline",
|
|
184
184
|
children: e
|
|
185
185
|
}) })
|
|
186
186
|
}),
|
|
187
|
-
N && H && /* @__PURE__ */
|
|
187
|
+
N && H && /* @__PURE__ */ w("div", {
|
|
188
188
|
className: "mt-3",
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ w(g, {
|
|
190
190
|
open: B,
|
|
191
191
|
onOpenChange: V,
|
|
192
192
|
items: (U.data ?? []).filter((e) => !ie.has(`${e.owner}/${e.name}`.toLowerCase())).map((e) => ({
|
|
193
193
|
value: `${e.owner}/${e.name}`,
|
|
194
194
|
label: `${e.owner}/${e.name}`,
|
|
195
195
|
...e.private && { hint: P("private") },
|
|
196
|
-
icon: /* @__PURE__ */
|
|
196
|
+
icon: /* @__PURE__ */ w(u, { className: "size-3.5 text-muted-foreground" })
|
|
197
197
|
})),
|
|
198
198
|
value: null,
|
|
199
199
|
onValueChange: (e) => e !== null && Z.mutate({
|
|
@@ -203,25 +203,25 @@ function j({ workspace: j, team: M, isAdmin: N }) {
|
|
|
203
203
|
placeholder: P("linkPlaceholder"),
|
|
204
204
|
"aria-label": P("linkRepository"),
|
|
205
205
|
loading: U.isPending,
|
|
206
|
-
trigger: /* @__PURE__ */
|
|
206
|
+
trigger: /* @__PURE__ */ T(p, {
|
|
207
207
|
type: "button",
|
|
208
208
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ w(l, { className: "size-3.5" }),
|
|
210
210
|
" ",
|
|
211
211
|
P("linkRepository")
|
|
212
212
|
]
|
|
213
213
|
})
|
|
214
214
|
})
|
|
215
215
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ T("label", {
|
|
217
217
|
className: "mt-4 flex w-fit items-center gap-2 text-sm",
|
|
218
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ w(h, {
|
|
219
219
|
checked: M.closeIssuesOnMerge,
|
|
220
220
|
disabled: !N || Q.isPending,
|
|
221
221
|
onCheckedChange: (e) => Q.mutate(e)
|
|
222
222
|
}), P("closeOnMerge")]
|
|
223
223
|
}),
|
|
224
|
-
(K.error || U.isError) && /* @__PURE__ */
|
|
224
|
+
(K.error || U.isError) && /* @__PURE__ */ w(ne, {
|
|
225
225
|
size: "md",
|
|
226
226
|
className: "mt-2",
|
|
227
227
|
children: K.error ?? P("unavailable")
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { statusesQuery as n } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ChevronDownIcon as r, StatusIcon as i } from "./icons.js";
|
|
4
|
+
import { useConfirm as a } from "../lib/confirm.js";
|
|
5
5
|
import { useFormError as o } from "./settings.js";
|
|
6
6
|
import { Button as s, Card as c, ErrorText as l, IconButton as u, Input as d, Section as f, Select as p } from "@parallelworks/ui";
|
|
7
7
|
import { useState as m } from "react";
|
|
@@ -58,7 +58,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
58
58
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/statuses/{statusId}", { params: B(n) })),
|
|
59
59
|
onMutate: j.clear,
|
|
60
60
|
onSettled: V
|
|
61
|
-
}), { confirm: G, dialog: K } =
|
|
61
|
+
}), { confirm: G, dialog: K } = a(), q = (e) => {
|
|
62
62
|
let t = E.filter((t) => t.id !== e.id);
|
|
63
63
|
return t.find((t) => t.category === e.category) ?? t.find((t) => S(t.category) === S(e.category));
|
|
64
64
|
}, J = (e) => G({
|
|
@@ -90,7 +90,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
90
90
|
children: t.map((e, n) => /* @__PURE__ */ _("li", {
|
|
91
91
|
className: "flex items-center gap-3 px-3 py-2 text-sm",
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */ g(
|
|
93
|
+
/* @__PURE__ */ g(i, { category: e.category }),
|
|
94
94
|
M === e.id ? /* @__PURE__ */ _("form", {
|
|
95
95
|
className: "flex min-w-0 flex-1 gap-2",
|
|
96
96
|
onSubmit: (t) => {
|
|
@@ -132,7 +132,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
132
132
|
/* @__PURE__ */ g(u, {
|
|
133
133
|
variant: "ghost",
|
|
134
134
|
size: "sm",
|
|
135
|
-
icon: /* @__PURE__ */ g(
|
|
135
|
+
icon: /* @__PURE__ */ g(r, { className: "rotate-180" }),
|
|
136
136
|
label: D("moveUp", { name: e.name }),
|
|
137
137
|
disabled: n === 0 || U.isPending,
|
|
138
138
|
onClick: () => U.mutate({
|
|
@@ -143,7 +143,7 @@ function C({ workspace: C, teamKey: w, isAdmin: T }) {
|
|
|
143
143
|
/* @__PURE__ */ g(u, {
|
|
144
144
|
variant: "ghost",
|
|
145
145
|
size: "sm",
|
|
146
|
-
icon: /* @__PURE__ */ g(
|
|
146
|
+
icon: /* @__PURE__ */ g(r, {}),
|
|
147
147
|
label: D("moveDown", { name: e.name }),
|
|
148
148
|
disabled: n === t.length - 1 || U.isPending,
|
|
149
149
|
onClick: () => U.mutate({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appURL as e } from "../lib/base.js";
|
|
2
2
|
import { docsQuery as t, knowledgeQuery as n } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { docKey as r, docURL as i } from "../lib/docs.js";
|
|
4
|
+
import { FileTextIcon as a, LibraryIcon as o } from "./icons.js";
|
|
5
|
+
import { docForms as s, formsOf as c } from "../lib/glossary.js";
|
|
6
|
+
import { entryPath as l, termRef as u } from "../lib/knowledgeKinds.js";
|
|
7
7
|
import { linksIn as d, unlinkedMentions as f } from "./editorPlugins.js";
|
|
8
8
|
import { Button as p } from "@parallelworks/ui";
|
|
9
9
|
import { useEffect as m, useMemo as h, useState as g } from "react";
|
|
@@ -11,8 +11,8 @@ import { useTranslations as _ } from "use-intl";
|
|
|
11
11
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
12
|
import { useQuery as b } from "@tanstack/react-query";
|
|
13
13
|
// src/components/UnlinkedMentions.tsx
|
|
14
|
-
function x(
|
|
15
|
-
let { data: _ = [] } = b(n(
|
|
14
|
+
function x(a, o, p) {
|
|
15
|
+
let { data: _ = [] } = b(n(a)), { data: v = [] } = b(t(a)), [y, x] = g(0);
|
|
16
16
|
m(() => {
|
|
17
17
|
if (!p) return;
|
|
18
18
|
let e = () => x((e) => e + 1);
|
|
@@ -20,19 +20,19 @@ function x(r, i, p) {
|
|
|
20
20
|
p.off("update", e);
|
|
21
21
|
};
|
|
22
22
|
}, [p]);
|
|
23
|
-
let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...
|
|
23
|
+
let S = h(() => _.filter((e) => e.status !== "superseded"), [_]), C = h(() => [...c(S), ...s(v, o.key)].sort((e, t) => t.text.length - e.text.length), [
|
|
24
24
|
S,
|
|
25
25
|
v,
|
|
26
|
-
|
|
26
|
+
o.key
|
|
27
27
|
]);
|
|
28
28
|
return h(() => {
|
|
29
29
|
if (!p || p.isDestroyed) return [];
|
|
30
|
-
let t = [...d(p.state.doc)], n = new Map(v.map((e) => [e.key, e])),
|
|
30
|
+
let t = [...d(p.state.doc)], n = new Map(v.map((e) => [e.key, e])), o = new Map(S.map((e) => [e.id, e]));
|
|
31
31
|
return f(p.state.doc, C, (e) => e.startsWith("doc:") ? t.some((t) => {
|
|
32
32
|
let n = t.split(/[?#]/)[0] ?? "";
|
|
33
|
-
return n.includes("/docs/") &&
|
|
33
|
+
return n.includes("/docs/") && r(n.split("/").pop() ?? "") === e.slice(4);
|
|
34
34
|
}) : t.some((t) => {
|
|
35
|
-
let n =
|
|
35
|
+
let n = o.get(e), r = (t.split(/[?#]/)[0] ?? "").split("/knowledge/")[1];
|
|
36
36
|
return t.includes(`entry=${e}`) || !!r && (r === e || r === n?.slug);
|
|
37
37
|
})).flatMap((t) => {
|
|
38
38
|
if (t.id.startsWith("doc:")) {
|
|
@@ -41,15 +41,15 @@ function x(r, i, p) {
|
|
|
41
41
|
...t,
|
|
42
42
|
target: e.title,
|
|
43
43
|
kind: "doc",
|
|
44
|
-
href:
|
|
44
|
+
href: i(a, e)
|
|
45
45
|
}] : [];
|
|
46
46
|
}
|
|
47
|
-
let
|
|
48
|
-
return
|
|
47
|
+
let r = o.get(t.id);
|
|
48
|
+
return r ? [{
|
|
49
49
|
...t,
|
|
50
|
-
target:
|
|
50
|
+
target: r.name,
|
|
51
51
|
kind: "term",
|
|
52
|
-
href: e(a
|
|
52
|
+
href: e(l(a, u(r)))
|
|
53
53
|
}] : [];
|
|
54
54
|
});
|
|
55
55
|
}, [
|
|
@@ -57,7 +57,7 @@ function x(r, i, p) {
|
|
|
57
57
|
C,
|
|
58
58
|
v,
|
|
59
59
|
S,
|
|
60
|
-
|
|
60
|
+
a,
|
|
61
61
|
y
|
|
62
62
|
]);
|
|
63
63
|
}
|
|
@@ -69,7 +69,7 @@ function S(e, t) {
|
|
|
69
69
|
e.view.dispatch(r);
|
|
70
70
|
}
|
|
71
71
|
function C({ editor: e, suggestions: t }) {
|
|
72
|
-
let n = _("docs"),
|
|
72
|
+
let n = _("docs"), r = (t) => {
|
|
73
73
|
e && e.chain().setTextSelection({
|
|
74
74
|
from: t.from,
|
|
75
75
|
to: t.to
|
|
@@ -99,11 +99,11 @@ function C({ editor: e, suggestions: t }) {
|
|
|
99
99
|
children: [
|
|
100
100
|
/* @__PURE__ */ v("span", {
|
|
101
101
|
className: "mt-0.5 text-muted-foreground",
|
|
102
|
-
children: t.kind === "doc" ? /* @__PURE__ */ v(
|
|
102
|
+
children: t.kind === "doc" ? /* @__PURE__ */ v(a, { className: "size-3.5" }) : /* @__PURE__ */ v(o, { className: "size-3.5" })
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ y("button", {
|
|
105
105
|
type: "button",
|
|
106
|
-
onClick: () =>
|
|
106
|
+
onClick: () => r(t),
|
|
107
107
|
className: "min-w-0 flex-1 text-left",
|
|
108
108
|
children: [/* @__PURE__ */ v("span", {
|
|
109
109
|
className: "block truncate text-sm",
|
package/components/Updates.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { meQuery as e } from "../api/queries.js";
|
|
2
|
-
import {
|
|
2
|
+
import { usePeople as t } from "../lib/people.js";
|
|
3
3
|
import { HealthIcon as n } from "./Planning.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useConfirm as r } from "../lib/confirm.js";
|
|
5
5
|
import { ActionMenu as i, Avatar as a, Button as o, Card as s, ErrorText as c, RelativeTime as l, Select as u, Textarea as d, buttonClasses as f, cx as p, fieldBox as m } from "@parallelworks/ui";
|
|
6
6
|
import { useState as h } from "react";
|
|
7
7
|
import { useErrorMessage as g } from "@parallelworks/problem/react";
|
|
@@ -16,7 +16,7 @@ var S = [
|
|
|
16
16
|
"off_track"
|
|
17
17
|
];
|
|
18
18
|
function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeholder: O, post: k, remove: A }) {
|
|
19
|
-
let j = _("planning"), M = _("common"), { data: N } = b(e), { confirm: P, dialog: F } =
|
|
19
|
+
let j = _("planning"), M = _("common"), { data: N } = b(e), { confirm: P, dialog: F } = r(), I = g(), { actorName: L, avatarOf: R } = t(C), [z, B] = h(T ?? "on_track"), [V, H] = h("");
|
|
20
20
|
return /* @__PURE__ */ y("section", { children: [
|
|
21
21
|
/* @__PURE__ */ y("h2", {
|
|
22
22
|
className: "flex items-center gap-2 text-base font-semibold",
|
package/components/Widgets.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Link as e } from "../lib/router.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { externalUrl as t } from "../lib/externalUrl.js";
|
|
3
|
+
import { CheckIcon as n, FileTextIcon as r, PullRequestIcon as i } from "./icons.js";
|
|
4
4
|
import { ProgressBar as a, Table as o } from "@parallelworks/ui";
|
|
5
5
|
import { useFormatter as s, useLocale as c, useTranslations as l } from "use-intl";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -126,15 +126,15 @@ function _({ kind: e, labels: t, series: n }) {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
function v({ path: e, patch: t }) {
|
|
129
|
-
let
|
|
129
|
+
let n = t.replace(/\n$/, "").split("\n");
|
|
130
130
|
return /* @__PURE__ */ d("div", {
|
|
131
131
|
className: "overflow-hidden rounded-md border border-border",
|
|
132
132
|
children: [e && /* @__PURE__ */ d("div", {
|
|
133
133
|
className: "flex items-center gap-1.5 border-b border-border bg-muted px-3 py-1.5 font-mono text-xs",
|
|
134
|
-
children: [/* @__PURE__ */ u(
|
|
134
|
+
children: [/* @__PURE__ */ u(r, { className: "size-3.5 text-muted-foreground" }), e]
|
|
135
135
|
}), /* @__PURE__ */ u("pre", {
|
|
136
136
|
className: "max-h-96 overflow-auto py-1 font-mono text-xs leading-5",
|
|
137
|
-
children:
|
|
137
|
+
children: n.map((e, t) => /* @__PURE__ */ u("div", {
|
|
138
138
|
className: f("px-3 whitespace-pre", e.startsWith("+") && "bg-success/10 text-success", e.startsWith("-") && "bg-danger/10 text-danger", e.startsWith("@@") && "text-muted-foreground"),
|
|
139
139
|
children: e || " "
|
|
140
140
|
}, t))
|
|
@@ -210,12 +210,12 @@ function b({ widget: e }) {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
function x({ checks: e }) {
|
|
213
|
-
let
|
|
213
|
+
let t = l("widgets"), r = e.filter((e) => e.done).length;
|
|
214
214
|
return /* @__PURE__ */ d("div", {
|
|
215
215
|
className: "rounded-md border border-border px-3 py-2",
|
|
216
216
|
children: [/* @__PURE__ */ u("p", {
|
|
217
217
|
className: "mb-1 text-xs text-muted-foreground",
|
|
218
|
-
children:
|
|
218
|
+
children: t("checked", {
|
|
219
219
|
done: r,
|
|
220
220
|
count: e.length
|
|
221
221
|
})
|
|
@@ -227,7 +227,7 @@ function x({ checks: e }) {
|
|
|
227
227
|
/* @__PURE__ */ u("span", {
|
|
228
228
|
className: f("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded border", e.done ? "border-success bg-success text-background" : "border-border"),
|
|
229
229
|
"aria-hidden": "true",
|
|
230
|
-
children: e.done && /* @__PURE__ */ u(
|
|
230
|
+
children: e.done && /* @__PURE__ */ u(n, { className: "size-3" })
|
|
231
231
|
}),
|
|
232
232
|
/* @__PURE__ */ u("span", {
|
|
233
233
|
className: f(e.done && "text-muted-foreground line-through"),
|
|
@@ -235,7 +235,7 @@ function x({ checks: e }) {
|
|
|
235
235
|
}),
|
|
236
236
|
/* @__PURE__ */ u("span", {
|
|
237
237
|
className: "sr-only",
|
|
238
|
-
children: e.done ?
|
|
238
|
+
children: e.done ? t("done") : t("notDone")
|
|
239
239
|
})
|
|
240
240
|
]
|
|
241
241
|
}, r))
|
|
@@ -253,31 +253,31 @@ function S({ value: e, max: t, title: n }) {
|
|
|
253
253
|
"aria-label": n || r("progress")
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function C({ workspace:
|
|
256
|
+
function C({ workspace: n, links: r }) {
|
|
257
257
|
let a = l("widgets"), o = "inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-muted";
|
|
258
258
|
return /* @__PURE__ */ u("ul", {
|
|
259
259
|
className: "flex flex-wrap gap-1.5",
|
|
260
|
-
children:
|
|
260
|
+
children: r.map((r) => /* @__PURE__ */ u("li", { children: r.kind === "issue" ? /* @__PURE__ */ d(e, {
|
|
261
261
|
to: "/$workspace/issues/$identifier",
|
|
262
262
|
params: {
|
|
263
|
-
workspace:
|
|
264
|
-
identifier:
|
|
263
|
+
workspace: n,
|
|
264
|
+
identifier: r.ref
|
|
265
265
|
},
|
|
266
266
|
className: o,
|
|
267
267
|
children: [/* @__PURE__ */ u("span", {
|
|
268
268
|
className: "text-muted-foreground",
|
|
269
|
-
children:
|
|
270
|
-
}),
|
|
271
|
-
}) :
|
|
272
|
-
href:
|
|
269
|
+
children: r.ref
|
|
270
|
+
}), r.label]
|
|
271
|
+
}) : r.kind === "pullRequest" ? /* @__PURE__ */ d("a", {
|
|
272
|
+
href: t(r.ref),
|
|
273
273
|
target: "_blank",
|
|
274
274
|
rel: "noopener noreferrer",
|
|
275
275
|
className: o,
|
|
276
|
-
children: [/* @__PURE__ */ u(
|
|
276
|
+
children: [/* @__PURE__ */ u(i, { className: "size-3.5 text-muted-foreground" }), r.label || a("pullRequest")]
|
|
277
277
|
}) : /* @__PURE__ */ u("span", {
|
|
278
278
|
className: o,
|
|
279
|
-
children:
|
|
280
|
-
}) }, `${
|
|
279
|
+
children: r.label || a("run")
|
|
280
|
+
}) }, `${r.kind}:${r.ref}`))
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
export { p as Widgets };
|
package/components/columns.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { closingFence as e } from "./toggle.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Extension as t, Node as n } from "@tiptap/react";
|
|
3
|
+
import { Plugin as r, PluginKey as i, TextSelection as a } from "@tiptap/pm/state";
|
|
4
|
+
import { Decoration as o, DecorationSet as s } from "@tiptap/pm/view";
|
|
5
5
|
// src/components/columns.ts
|
|
6
6
|
var c = 4, l = .15, u = /^:::columns[ \t]*([^\n]*)\n/, d = /^:::column[ \t]*\n/, f = (e, t) => e.insertContent({
|
|
7
7
|
type: "columns",
|
|
@@ -12,7 +12,7 @@ var c = 4, l = .15, u = /^:::columns[ \t]*([^\n]*)\n/, d = /^:::column[ \t]*\n/,
|
|
|
12
12
|
}).command(({ tr: e }) => {
|
|
13
13
|
let t = e.selection.$from;
|
|
14
14
|
for (let n = t.depth; n > 0; n--) if (t.node(n).type.name === "columns") {
|
|
15
|
-
e.setSelection(
|
|
15
|
+
e.setSelection(a.near(e.doc.resolve(t.before(n) + 3)));
|
|
16
16
|
break;
|
|
17
17
|
}
|
|
18
18
|
return !0;
|
|
@@ -23,7 +23,7 @@ function m(e) {
|
|
|
23
23
|
let r = t.reduce((e, t) => e + t, 0);
|
|
24
24
|
return t.map((e) => e / r);
|
|
25
25
|
}
|
|
26
|
-
var h = (e) => e.map((e) => `minmax(0, ${e.toFixed(4)}fr)`).join(" "), g =
|
|
26
|
+
var h = (e) => e.map((e) => `minmax(0, ${e.toFixed(4)}fr)`).join(" "), g = n.create({
|
|
27
27
|
name: "column",
|
|
28
28
|
content: "block+",
|
|
29
29
|
isolating: !0,
|
|
@@ -60,7 +60,7 @@ var h = (e) => e.map((e) => `minmax(0, ${e.toFixed(4)}fr)`).join(" "), g = s.cre
|
|
|
60
60
|
return t.createNode("column", void 0, n.length > 0 ? n : [t.createNode("paragraph", void 0, [])]);
|
|
61
61
|
},
|
|
62
62
|
renderMarkdown: (e, t) => `:::column\n\n${t.renderChildren(e.content ?? [], "\n\n").trim()}\n\n:::`
|
|
63
|
-
}), _ =
|
|
63
|
+
}), _ = n.create({
|
|
64
64
|
name: "columns",
|
|
65
65
|
group: "block",
|
|
66
66
|
content: "column{2,4}",
|
|
@@ -91,15 +91,15 @@ var h = (e) => e.map((e) => `minmax(0, ${e.toFixed(4)}fr)`).join(" "), g = s.cre
|
|
|
91
91
|
if (!t.empty) return !1;
|
|
92
92
|
let n = t.$from;
|
|
93
93
|
for (let t = n.depth; t > 0; t--) {
|
|
94
|
-
let
|
|
95
|
-
if (
|
|
96
|
-
if (!(
|
|
97
|
-
let
|
|
94
|
+
let r = n.node(t);
|
|
95
|
+
if (r.type.name !== "column") continue;
|
|
96
|
+
if (!(r.childCount === 1 && r.firstChild?.isTextblock && r.firstChild.content.size === 0)) return !1;
|
|
97
|
+
let i = n.node(t - 1), o = n.before(t - 1), s = n.before(t);
|
|
98
98
|
return e.commands.command(({ tr: e }) => {
|
|
99
|
-
if (
|
|
99
|
+
if (i.childCount > 2) e.delete(s, s + r.nodeSize), i.attrs.widths && e.setNodeAttribute(o, "widths", null);
|
|
100
100
|
else {
|
|
101
|
-
let t =
|
|
102
|
-
e.replaceWith(o, o +
|
|
101
|
+
let t = i.child(+(i.firstChild === r));
|
|
102
|
+
e.replaceWith(o, o + i.nodeSize, t.content), e.setSelection(a.near(e.doc.resolve(o)));
|
|
103
103
|
}
|
|
104
104
|
return !0;
|
|
105
105
|
});
|
|
@@ -181,7 +181,7 @@ var h = (e) => e.map((e) => `minmax(0, ${e.toFixed(4)}fr)`).join(" "), g = s.cre
|
|
|
181
181
|
stopEvent(e) {
|
|
182
182
|
return e.target instanceof globalThis.Node && this.handles.contains(e.target);
|
|
183
183
|
}
|
|
184
|
-
}, y = new
|
|
184
|
+
}, y = new i("columnDrop");
|
|
185
185
|
function b(e, t, n) {
|
|
186
186
|
let r = e.posAtCoords({
|
|
187
187
|
left: t,
|
|
@@ -203,10 +203,10 @@ function b(e, t, n) {
|
|
|
203
203
|
side: "left"
|
|
204
204
|
} : null;
|
|
205
205
|
}
|
|
206
|
-
var x =
|
|
206
|
+
var x = t.create({
|
|
207
207
|
name: "columnDrop",
|
|
208
208
|
addProseMirrorPlugins() {
|
|
209
|
-
return [new
|
|
209
|
+
return [new r({
|
|
210
210
|
key: y,
|
|
211
211
|
state: {
|
|
212
212
|
init: () => null,
|
|
@@ -218,7 +218,7 @@ var x = o.create({
|
|
|
218
218
|
props: {
|
|
219
219
|
decorations: (e) => {
|
|
220
220
|
let t = y.getState(e), n = t && e.doc.nodeAt(t.pos);
|
|
221
|
-
return !t || !n ? null :
|
|
221
|
+
return !t || !n ? null : s.create(e.doc, [o.node(t.pos, t.pos + n.nodeSize, { class: `column-drop-${t.side}` })]);
|
|
222
222
|
},
|
|
223
223
|
handleDOMEvents: {
|
|
224
224
|
dragover: (e, t) => {
|