@parallelworks/tandem-web 0.171.0 → 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/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- 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 +103 -99
- 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/assigneeOrder.js +6 -0
- package/lib/assignees.js +24 -20
- 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,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { appLink as e } from "../lib/appLink.js";
|
|
2
|
+
import { GridIcon as t } from "./icons.js";
|
|
3
3
|
import { IconButton as n, Popover as r, useClosePopover as i } from "@parallelworks/ui";
|
|
4
4
|
import { useTranslations as a } from "use-intl";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
6
|
// src/components/AppLauncher.tsx
|
|
7
7
|
function c({ apps: i, className: s = "" }) {
|
|
8
|
-
let c = a("workspace"), u = i.flatMap((
|
|
9
|
-
let n = t
|
|
8
|
+
let c = a("workspace"), u = i.flatMap((t) => {
|
|
9
|
+
let n = e(t.url);
|
|
10
10
|
return n ? [{
|
|
11
|
-
...
|
|
11
|
+
...t,
|
|
12
12
|
href: n,
|
|
13
|
-
icon:
|
|
13
|
+
icon: t.iconUrl ? e(t.iconUrl) : void 0
|
|
14
14
|
}] : [];
|
|
15
15
|
});
|
|
16
16
|
return u.length === 0 ? null : /* @__PURE__ */ o("div", {
|
|
17
17
|
className: s,
|
|
18
18
|
children: /* @__PURE__ */ o(r, {
|
|
19
19
|
trigger: /* @__PURE__ */ o(n, {
|
|
20
|
-
icon: /* @__PURE__ */ o(
|
|
20
|
+
icon: /* @__PURE__ */ o(t, { className: "size-4" }),
|
|
21
21
|
label: c("apps"),
|
|
22
22
|
size: "md"
|
|
23
23
|
}),
|
package/components/AreaLink.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { areasQuery as e, teamsQuery as t } from "../api/queries.js";
|
|
2
|
+
import { Link as n } from "../lib/router.js";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useQuery as i } from "@tanstack/react-query";
|
|
5
5
|
// src/components/AreaLink.tsx
|
|
6
|
-
function a(
|
|
7
|
-
let { data: a = [] } = i(n
|
|
8
|
-
...
|
|
6
|
+
function a(n, r) {
|
|
7
|
+
let { data: a = [] } = i(t(n)), { data: o = [] } = i({
|
|
8
|
+
...e(n),
|
|
9
9
|
enabled: r.teamId === void 0
|
|
10
10
|
}), s = r.teamId === void 0 ? o.find((e) => e.key === r.key)?.teamId : r.teamId;
|
|
11
11
|
return s ? a.find((e) => e.id === s)?.key : void 0;
|
|
12
12
|
}
|
|
13
|
-
function o({ workspace:
|
|
14
|
-
let o = a(
|
|
15
|
-
return o ? /* @__PURE__ */ r(
|
|
13
|
+
function o({ workspace: e, area: t, ...i }) {
|
|
14
|
+
let o = a(e, t);
|
|
15
|
+
return o ? /* @__PURE__ */ r(n, {
|
|
16
16
|
to: "/$workspace/teams/$key/areas/$area",
|
|
17
17
|
params: {
|
|
18
|
-
workspace:
|
|
18
|
+
workspace: e,
|
|
19
19
|
key: o,
|
|
20
|
-
area:
|
|
20
|
+
area: t.key
|
|
21
21
|
},
|
|
22
22
|
...i
|
|
23
|
-
}) : /* @__PURE__ */ r(
|
|
23
|
+
}) : /* @__PURE__ */ r(n, {
|
|
24
24
|
to: "/$workspace/areas/$area",
|
|
25
25
|
params: {
|
|
26
|
-
workspace:
|
|
27
|
-
area:
|
|
26
|
+
workspace: e,
|
|
27
|
+
area: t.key
|
|
28
28
|
},
|
|
29
29
|
...i
|
|
30
30
|
});
|
package/components/AreaTiles.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useAreaActions as e } from "../lib/areas.js";
|
|
2
|
+
import { AreaLink as t } from "./AreaLink.js";
|
|
2
3
|
import { DocIcon as n } from "./DocIcon.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useIconUpload as s } from "./DocLook.js";
|
|
4
|
+
import { DocIconPicker as r } from "./DocIconPicker.js";
|
|
5
|
+
import { useIconUpload as i } from "./DocLook.js";
|
|
6
|
+
import { CropDialog as a } from "./ImageUpload.js";
|
|
7
|
+
import { AreaIcon as o, EditIcon as s } from "./icons.js";
|
|
8
8
|
import { IconButton as c, Tooltip as l, cx as u, useOpenMenu as d } from "@parallelworks/ui";
|
|
9
9
|
import { useTranslations as f } from "use-intl";
|
|
10
10
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -46,17 +46,17 @@ function y({ children: e, hint: t }) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S }) {
|
|
49
|
-
let C = f("areas"), w = d(), T =
|
|
49
|
+
let C = f("areas"), w = d(), T = e(l), E = u.icon ?? "", D = (e) => T.update.mutate({
|
|
50
50
|
area: u.key,
|
|
51
51
|
body: { icon: e }
|
|
52
|
-
}), O =
|
|
52
|
+
}), O = i(l, D), k = /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(v, {
|
|
53
53
|
decisions: b,
|
|
54
54
|
dashed: u.status === "proposed",
|
|
55
55
|
children: E ? /* @__PURE__ */ m(n, {
|
|
56
56
|
icon: E,
|
|
57
57
|
className: "size-8",
|
|
58
58
|
emojiClassName: "text-3xl"
|
|
59
|
-
}) : /* @__PURE__ */ m(
|
|
59
|
+
}) : /* @__PURE__ */ m(o, { className: "size-7" })
|
|
60
60
|
}), /* @__PURE__ */ m(y, {
|
|
61
61
|
hint: g > 0 ? C("count", { count: g }) : void 0,
|
|
62
62
|
children: u.title
|
|
@@ -70,25 +70,25 @@ function b({ workspace: l, area: u, inside: g, decisions: b, menu: x, onOpen: S
|
|
|
70
70
|
className: _,
|
|
71
71
|
onClick: () => S(u),
|
|
72
72
|
children: k
|
|
73
|
-
}) : /* @__PURE__ */ m(
|
|
73
|
+
}) : /* @__PURE__ */ m(t, {
|
|
74
74
|
workspace: l,
|
|
75
75
|
area: u,
|
|
76
76
|
className: _,
|
|
77
77
|
children: k
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */ m(
|
|
79
|
+
/* @__PURE__ */ m(r, {
|
|
80
80
|
icon: E,
|
|
81
81
|
onPick: D,
|
|
82
82
|
onUploadFile: O.pick,
|
|
83
83
|
trigger: /* @__PURE__ */ m(c, {
|
|
84
84
|
variant: "ghost",
|
|
85
85
|
size: "xs",
|
|
86
|
-
icon: /* @__PURE__ */ m(
|
|
86
|
+
icon: /* @__PURE__ */ m(s, {}),
|
|
87
87
|
label: C(E ? "changeIcon" : "addIcon", { area: u.title }),
|
|
88
88
|
className: "absolute top-1 right-1 opacity-0 group-hover/tile:opacity-100 focus-visible:opacity-100 aria-expanded:opacity-100 max-md:hidden"
|
|
89
89
|
})
|
|
90
90
|
}),
|
|
91
|
-
O.picked && /* @__PURE__ */ m(
|
|
91
|
+
O.picked && /* @__PURE__ */ m(a, {
|
|
92
92
|
image: O.picked,
|
|
93
93
|
name: u.title,
|
|
94
94
|
onSave: O.save,
|
package/components/AreaWork.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { termRef as e } from "../lib/knowledgeKinds.js";
|
|
2
|
+
import { Link as t } from "../lib/router.js";
|
|
3
|
+
import { AnsweredDecision as n } from "./AgentWork.js";
|
|
4
|
+
import { KnowledgeStatus as r } from "./HoverCards.js";
|
|
5
|
+
import { ChevronRightIcon as i } from "./icons.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
7
|
import { useTranslations as o } from "use-intl";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
9
9
|
// src/components/AreaWork.tsx
|
|
10
10
|
var l = (...e) => e.filter(Boolean).join(" ");
|
|
11
|
-
function u({ workspace:
|
|
11
|
+
function u({ workspace: n, entry: i, isNew: a }) {
|
|
12
12
|
let l = o("knowledge"), u = o("areaPage");
|
|
13
|
-
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(
|
|
13
|
+
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(t, {
|
|
14
14
|
to: "/$workspace/knowledge/$term",
|
|
15
15
|
params: {
|
|
16
|
-
workspace:
|
|
17
|
-
term:
|
|
16
|
+
workspace: n,
|
|
17
|
+
term: e(i)
|
|
18
18
|
},
|
|
19
19
|
className: "flex min-w-0 items-baseline gap-2 px-3 py-2 text-sm hover:bg-muted",
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ s("span", {
|
|
22
22
|
className: "shrink-0 font-medium",
|
|
23
|
-
children:
|
|
23
|
+
children: i.name
|
|
24
24
|
}),
|
|
25
25
|
/* @__PURE__ */ s("span", {
|
|
26
26
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
27
|
-
children: l(`kind.${
|
|
27
|
+
children: l(`kind.${i.kind}`)
|
|
28
28
|
}),
|
|
29
|
-
|
|
29
|
+
i.definition !== i.name && /* @__PURE__ */ s("span", {
|
|
30
30
|
className: "min-w-0 truncate text-muted-foreground",
|
|
31
|
-
children:
|
|
31
|
+
children: i.definition
|
|
32
32
|
}),
|
|
33
|
-
|
|
33
|
+
i.status === "added" && /* @__PURE__ */ s("span", {
|
|
34
34
|
className: "ml-auto shrink-0",
|
|
35
|
-
children: /* @__PURE__ */ s(
|
|
35
|
+
children: /* @__PURE__ */ s(r, { status: i.status })
|
|
36
36
|
}),
|
|
37
37
|
a && /* @__PURE__ */ s("span", {
|
|
38
38
|
className: "ml-auto shrink-0 text-[11px] font-medium text-primary",
|
|
@@ -42,18 +42,18 @@ function u({ workspace: t, entry: r, isNew: a }) {
|
|
|
42
42
|
}) });
|
|
43
43
|
}
|
|
44
44
|
var d = (e) => e.replace(/[*_`#>[\]]/g, "").replace(/\s+/g, " ").trim();
|
|
45
|
-
function f({ workspace: e, decision:
|
|
46
|
-
let f = o("areaPage"), [p, m] = a(!1), h = [
|
|
45
|
+
function f({ workspace: e, decision: t, isNew: r, notInDocs: u }) {
|
|
46
|
+
let f = o("areaPage"), [p, m] = a(!1), h = [t.options.find((e) => e.id === t.answer?.optionId)?.label, t.answer?.text && d(t.answer.text)].filter(Boolean).join(". ");
|
|
47
47
|
return /* @__PURE__ */ c("li", { children: [/* @__PURE__ */ c("button", {
|
|
48
48
|
type: "button",
|
|
49
49
|
"aria-expanded": p,
|
|
50
50
|
onClick: () => m((e) => !e),
|
|
51
51
|
className: "flex w-full min-w-0 items-baseline gap-2 px-3 py-2 text-left text-sm hover:bg-muted",
|
|
52
52
|
children: [
|
|
53
|
-
/* @__PURE__ */ s(
|
|
53
|
+
/* @__PURE__ */ s(i, { className: l("size-3 shrink-0 self-center text-muted-foreground", p && "rotate-90") }),
|
|
54
54
|
/* @__PURE__ */ s("span", {
|
|
55
55
|
className: "min-w-0 truncate text-muted-foreground",
|
|
56
|
-
children: d(
|
|
56
|
+
children: d(t.prompt)
|
|
57
57
|
}),
|
|
58
58
|
/* @__PURE__ */ s("span", {
|
|
59
59
|
className: "min-w-0 shrink-0 truncate font-medium max-sm:hidden",
|
|
@@ -64,7 +64,7 @@ function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
|
|
|
64
64
|
children: [u && /* @__PURE__ */ s("span", {
|
|
65
65
|
className: "rounded border border-border px-1.5 text-[11px] text-muted-foreground",
|
|
66
66
|
children: f("notInDocs")
|
|
67
|
-
}),
|
|
67
|
+
}), r && /* @__PURE__ */ s("span", {
|
|
68
68
|
className: "text-[11px] font-medium text-primary",
|
|
69
69
|
children: f("new")
|
|
70
70
|
})]
|
|
@@ -72,9 +72,9 @@ function f({ workspace: e, decision: n, isNew: i, notInDocs: u }) {
|
|
|
72
72
|
]
|
|
73
73
|
}), p && /* @__PURE__ */ s("div", {
|
|
74
74
|
className: "px-3 pb-3",
|
|
75
|
-
children: /* @__PURE__ */ s(
|
|
75
|
+
children: /* @__PURE__ */ s(n, {
|
|
76
76
|
workspace: e,
|
|
77
|
-
decision:
|
|
77
|
+
decision: t,
|
|
78
78
|
showIssue: !0
|
|
79
79
|
})
|
|
80
80
|
})] });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { attachmentsQuery as e, meQuery as t } from "../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { attachmentSizes as n, attachmentURL as r, insertAttachments as i, uploadAttachment as a } from "../lib/attachments.js";
|
|
3
|
+
import { openImageEvent as o } from "./editorPlugins.js";
|
|
4
|
+
import { AttachmentIcon as s, CloseIcon as c, DownloadIcon as l } from "./icons.js";
|
|
5
5
|
import { ErrorText as u, IconButton as d, Modal as f, ModalTitle as p, buttonClasses as m } from "@parallelworks/ui";
|
|
6
6
|
import { useEffect as h, useRef as g, useState as _ } from "react";
|
|
7
7
|
import { useErrorMessage as v } from "@parallelworks/problem/react";
|
|
@@ -16,20 +16,20 @@ function D() {
|
|
|
16
16
|
}
|
|
17
17
|
function O(t, n) {
|
|
18
18
|
let r = E();
|
|
19
|
-
return k((e) =>
|
|
19
|
+
return k((e) => a(t, n, e), () => r.invalidateQueries({ queryKey: e(t, n).queryKey }));
|
|
20
20
|
}
|
|
21
21
|
function k(e, t) {
|
|
22
|
-
let n = b("issue.attachments"), r = v(), [
|
|
22
|
+
let n = b("issue.attachments"), r = v(), [a, o] = _(0), [s, c] = _(null), l = D();
|
|
23
23
|
return {
|
|
24
|
-
upload: async (
|
|
25
|
-
if (!
|
|
24
|
+
upload: async (a, s, u) => {
|
|
25
|
+
if (!a || s.length === 0) return;
|
|
26
26
|
if (!l) {
|
|
27
|
-
c(n("off", { name:
|
|
27
|
+
c(n("off", { name: s[0]?.name ?? "" }));
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
|
-
c(null),
|
|
30
|
+
c(null), o((e) => e + s.length);
|
|
31
31
|
let d = [];
|
|
32
|
-
for (let t of
|
|
32
|
+
for (let t of s) try {
|
|
33
33
|
d.push(await e(t));
|
|
34
34
|
} catch (e) {
|
|
35
35
|
let i = e instanceof x ? e.status : 0;
|
|
@@ -38,24 +38,24 @@ function k(e, t) {
|
|
|
38
38
|
reason: r(e)
|
|
39
39
|
}));
|
|
40
40
|
} finally {
|
|
41
|
-
|
|
41
|
+
o((e) => e - 1);
|
|
42
42
|
}
|
|
43
|
-
d.length > 0 && !
|
|
43
|
+
d.length > 0 && !a.isDestroyed && i(a, d, u), t?.();
|
|
44
44
|
},
|
|
45
|
-
pending:
|
|
46
|
-
error:
|
|
45
|
+
pending: a,
|
|
46
|
+
error: s
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function A({ onFiles: e }) {
|
|
50
|
-
let t = b("issue.attachments"),
|
|
50
|
+
let t = b("issue.attachments"), n = g(null);
|
|
51
51
|
return D() ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(d, {
|
|
52
|
-
icon: /* @__PURE__ */ C(
|
|
52
|
+
icon: /* @__PURE__ */ C(s, {}),
|
|
53
53
|
label: t("attach"),
|
|
54
54
|
variant: "ghost",
|
|
55
55
|
size: "sm",
|
|
56
|
-
onClick: () =>
|
|
56
|
+
onClick: () => n.current?.click()
|
|
57
57
|
}), /* @__PURE__ */ C("input", {
|
|
58
|
-
ref:
|
|
58
|
+
ref: n,
|
|
59
59
|
type: "file",
|
|
60
60
|
multiple: !0,
|
|
61
61
|
hidden: !0,
|
|
@@ -88,15 +88,15 @@ function M() {
|
|
|
88
88
|
maximumFractionDigits: 1
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function N({ workspace: t, identifier:
|
|
92
|
-
let
|
|
91
|
+
function N({ workspace: t, identifier: i }) {
|
|
92
|
+
let a = b("issue.attachments"), s = b("common"), u = M(), { data: g } = T(e(t, i)), [v, y] = _(null);
|
|
93
93
|
h(() => {
|
|
94
|
-
|
|
95
|
-
}, [g]), h(() => () =>
|
|
94
|
+
n.set(new Map((g ?? []).map((e) => [e.id, u(e.size)])), new Set((g ?? []).filter((e) => e.video).map((e) => e.id)));
|
|
95
|
+
}, [g]), h(() => () => n.set(/* @__PURE__ */ new Map()), []), h(() => {
|
|
96
96
|
let e = (e) => y(e.detail);
|
|
97
|
-
return document.addEventListener(
|
|
97
|
+
return document.addEventListener(o, e), () => document.removeEventListener(o, e);
|
|
98
98
|
}, []);
|
|
99
|
-
let x = v ?
|
|
99
|
+
let x = v ? r(v.src) : "";
|
|
100
100
|
return /* @__PURE__ */ w(f, {
|
|
101
101
|
open: v !== null,
|
|
102
102
|
onClose: () => y(null),
|
|
@@ -107,17 +107,17 @@ function N({ workspace: t, identifier: n }) {
|
|
|
107
107
|
children: [
|
|
108
108
|
/* @__PURE__ */ C(p, {
|
|
109
109
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
110
|
-
children: v?.name ||
|
|
110
|
+
children: v?.name || a("image")
|
|
111
111
|
}),
|
|
112
112
|
/* @__PURE__ */ w("a", {
|
|
113
113
|
href: x,
|
|
114
114
|
download: v?.name ?? "",
|
|
115
115
|
className: m({ size: "sm" }),
|
|
116
|
-
children: [/* @__PURE__ */ C(
|
|
116
|
+
children: [/* @__PURE__ */ C(l, { className: "size-3.5" }), a("download")]
|
|
117
117
|
}),
|
|
118
118
|
/* @__PURE__ */ C(d, {
|
|
119
|
-
icon: /* @__PURE__ */ C(
|
|
120
|
-
label:
|
|
119
|
+
icon: /* @__PURE__ */ C(c, {}),
|
|
120
|
+
label: s("close"),
|
|
121
121
|
variant: "ghost",
|
|
122
122
|
size: "sm",
|
|
123
123
|
onClick: () => y(null)
|
|
@@ -127,7 +127,7 @@ function N({ workspace: t, identifier: n }) {
|
|
|
127
127
|
className: "flex min-h-0 flex-1 items-center justify-center overflow-auto bg-muted p-4",
|
|
128
128
|
children: v && /* @__PURE__ */ C("img", {
|
|
129
129
|
src: x,
|
|
130
|
-
alt: v.name ||
|
|
130
|
+
alt: v.name || a("image"),
|
|
131
131
|
className: "max-h-[calc(90vh-5rem)] max-w-full object-contain"
|
|
132
132
|
})
|
|
133
133
|
})]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { headingAnchor as e } from "../lib/glossary.js";
|
|
2
|
+
import { copyItem as t } from "../lib/menus.js";
|
|
3
3
|
import { commands as n } from "./SlashMenu.js";
|
|
4
4
|
import { menuDivider as r, useOpenMenu as i } from "@parallelworks/ui";
|
|
5
5
|
import { useState as a } from "react";
|
|
@@ -76,7 +76,7 @@ function m({ editor: m }) {
|
|
|
76
76
|
label: h("duplicate"),
|
|
77
77
|
onClick: () => m.chain().focus().insertContentAt(_.pos + _.node.nodeSize, _.node.toJSON()).run()
|
|
78
78
|
},
|
|
79
|
-
..._.node.type.name === "heading" ? [
|
|
79
|
+
..._.node.type.name === "heading" ? [t(h("copyLink"), `${window.location.href.split("#")[0]}#${e(_.node.textContent)}`)] : [],
|
|
80
80
|
r,
|
|
81
81
|
{
|
|
82
82
|
label: h("delete"),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { labelsQuery as n, teamMembersQuery as r, teamRotationQuery as i } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { usePeople as a } from "../lib/people.js";
|
|
4
|
+
import { useTime as o } from "../lib/time.js";
|
|
5
|
+
import { AddIcon as s, ChevronDownIcon as c, CloseIcon as l } from "./icons.js";
|
|
6
6
|
import { PersonHoverCard as u } from "./PersonHoverCard.js";
|
|
7
7
|
import { Avatar as d, Button as f, Card as p, Combobox as m, IconButton as h, Select as g, SettingRow as _, SettingsCard as v, StatusBadge as y, Switch as b } from "@parallelworks/ui";
|
|
8
8
|
import { useErrorMessage as x } from "@parallelworks/problem/react";
|
|
@@ -11,7 +11,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
|
11
11
|
import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
|
|
12
12
|
// src/components/BugRotation.tsx
|
|
13
13
|
function O({ workspace: O, teamKey: k, isAdmin: A }) {
|
|
14
|
-
let j = S("rotation"), M = x(), N =
|
|
14
|
+
let j = S("rotation"), M = x(), N = o(), P = E(), F = i(O, k), { data: I } = D(F), { data: L } = D(n(O)), { data: R } = D(r(O, k)), { person: z } = a(O), B = { params: { path: {
|
|
15
15
|
workspace: O,
|
|
16
16
|
key: k
|
|
17
17
|
} } }, V = T({
|
|
@@ -139,7 +139,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
|
|
|
139
139
|
size: "sm",
|
|
140
140
|
disabled: V.isPending,
|
|
141
141
|
children: [
|
|
142
|
-
/* @__PURE__ */ C(
|
|
142
|
+
/* @__PURE__ */ C(s, { className: "size-3.5" }),
|
|
143
143
|
" ",
|
|
144
144
|
j("add")
|
|
145
145
|
]
|
|
@@ -186,7 +186,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
|
|
|
186
186
|
variant: "ghost",
|
|
187
187
|
size: "xs",
|
|
188
188
|
label: j("moveUp", { name: z(e).name }),
|
|
189
|
-
icon: /* @__PURE__ */ C(
|
|
189
|
+
icon: /* @__PURE__ */ C(c, { className: "rotate-180" }),
|
|
190
190
|
disabled: V.isPending || t === 0,
|
|
191
191
|
onClick: () => q(t, -1)
|
|
192
192
|
}),
|
|
@@ -194,7 +194,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
|
|
|
194
194
|
variant: "ghost",
|
|
195
195
|
size: "xs",
|
|
196
196
|
label: j("moveDown", { name: z(e).name }),
|
|
197
|
-
icon: /* @__PURE__ */ C(
|
|
197
|
+
icon: /* @__PURE__ */ C(c, {}),
|
|
198
198
|
disabled: V.isPending || t === G.length - 1,
|
|
199
199
|
onClick: () => q(t, 1)
|
|
200
200
|
}),
|
|
@@ -202,7 +202,7 @@ function O({ workspace: O, teamKey: k, isAdmin: A }) {
|
|
|
202
202
|
variant: "ghost",
|
|
203
203
|
size: "xs",
|
|
204
204
|
label: j("remove", { name: z(e).name }),
|
|
205
|
-
icon: /* @__PURE__ */ C(
|
|
205
|
+
icon: /* @__PURE__ */ C(l, {}),
|
|
206
206
|
disabled: V.isPending,
|
|
207
207
|
onClick: () => V.mutate({ members: G.filter((t) => t !== e) })
|
|
208
208
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { codeHostAccountsQuery as n, codeHostQuery as r, meQuery as i } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useConfirm as a } from "../lib/confirm.js";
|
|
4
|
+
import { externalUrl as o } from "../lib/externalUrl.js";
|
|
5
5
|
import { usePeople as s } from "../lib/people.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { ConnectionCard as c, ConnectionPanel as l } from "./ConnectionCard.js";
|
|
7
|
+
import { CodeHostIcon as u } from "./icons.js";
|
|
8
|
+
import { useFormError as d } from "./settings.js";
|
|
9
9
|
import { Avatar as f, Button as p, Card as m, ErrorText as h, Section as g, Select as _, SettingsCard as v, StatusLabel as y } from "@parallelworks/ui";
|
|
10
10
|
import { useState as b } from "react";
|
|
11
11
|
import { useTranslations as x } from "use-intl";
|
|
@@ -13,25 +13,25 @@ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
|
13
13
|
import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@tanstack/react-query";
|
|
14
14
|
// src/components/CodeHostSettings.tsx
|
|
15
15
|
function O({ workspace: n }) {
|
|
16
|
-
let
|
|
16
|
+
let o = x("code"), { data: s } = D(i), { data: c } = D(r(n)), l = E(), u = d(), { confirm: f, dialog: m } = a(), v = T({
|
|
17
17
|
mutationFn: async (r) => t(await e.DELETE("/api/v1/workspaces/{workspace}/code-host/connections/{account}", { params: { path: {
|
|
18
18
|
workspace: n,
|
|
19
19
|
account: r
|
|
20
20
|
} } })),
|
|
21
|
-
onMutate:
|
|
21
|
+
onMutate: u.clear,
|
|
22
22
|
onSettled: () => {
|
|
23
|
-
|
|
23
|
+
l.invalidateQueries({ queryKey: r(n).queryKey }), l.invalidateQueries({ queryKey: [
|
|
24
24
|
"workspace",
|
|
25
25
|
n,
|
|
26
26
|
"teams"
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
29
|
}), y = (e) => f({
|
|
30
|
-
title:
|
|
31
|
-
description:
|
|
32
|
-
confirmLabel:
|
|
30
|
+
title: o("disconnectConfirm", { account: e }),
|
|
31
|
+
description: o("disconnectDetail"),
|
|
32
|
+
confirmLabel: o("disconnect"),
|
|
33
33
|
onConfirm: () => v.mutateAsync(e)
|
|
34
|
-
}), [S, O] = b(""), k =
|
|
34
|
+
}), [S, O] = b(""), k = c.connections.filter((e) => e.connectedBy === s?.user.username), A = k[0];
|
|
35
35
|
if (!A) return null;
|
|
36
36
|
let j = k.some((e) => e.account === S) ? S : A.account;
|
|
37
37
|
return /* @__PURE__ */ w(g, {
|
|
@@ -39,8 +39,8 @@ function O({ workspace: n }) {
|
|
|
39
39
|
tone: "error",
|
|
40
40
|
collapsible: !1,
|
|
41
41
|
headingLevel: 2,
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
42
|
+
title: o("dangerZone"),
|
|
43
|
+
description: o("disconnectDetail"),
|
|
44
44
|
className: "mt-10",
|
|
45
45
|
children: [
|
|
46
46
|
/* @__PURE__ */ w("div", {
|
|
@@ -48,7 +48,7 @@ function O({ workspace: n }) {
|
|
|
48
48
|
children: [/* @__PURE__ */ C("div", {
|
|
49
49
|
className: "w-56 max-w-full",
|
|
50
50
|
children: /* @__PURE__ */ C(_, {
|
|
51
|
-
"aria-label":
|
|
51
|
+
"aria-label": o("disconnectWhich"),
|
|
52
52
|
value: j,
|
|
53
53
|
onValueChange: (e) => e && O(e),
|
|
54
54
|
items: k.map((e) => ({
|
|
@@ -60,24 +60,24 @@ function O({ workspace: n }) {
|
|
|
60
60
|
variant: "danger",
|
|
61
61
|
onClick: () => y(j),
|
|
62
62
|
loading: v.isPending,
|
|
63
|
-
children:
|
|
63
|
+
children: o("disconnectAccount", { account: j })
|
|
64
64
|
})]
|
|
65
65
|
}),
|
|
66
66
|
/* @__PURE__ */ C(h, {
|
|
67
67
|
size: "md",
|
|
68
68
|
className: "mt-3",
|
|
69
|
-
children:
|
|
69
|
+
children: u.error
|
|
70
70
|
}),
|
|
71
71
|
m
|
|
72
72
|
]
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function k({ workspace: n, isAdmin: i, result:
|
|
76
|
-
let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ =
|
|
75
|
+
function k({ workspace: n, isAdmin: i, result: a }) {
|
|
76
|
+
let m = x("code"), { data: h } = D(r(n)), { person: g } = s(n), _ = d(), b = T({
|
|
77
77
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connect", { params: { path: { workspace: n } } })),
|
|
78
78
|
onMutate: _.clear,
|
|
79
79
|
onSuccess: ({ url: e }) => {
|
|
80
|
-
let t =
|
|
80
|
+
let t = o(e);
|
|
81
81
|
t && window.location.assign(t);
|
|
82
82
|
},
|
|
83
83
|
onError: _.set
|
|
@@ -86,13 +86,13 @@ function k({ workspace: n, isAdmin: i, result: c }) {
|
|
|
86
86
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
87
87
|
children: m("notConfigured")
|
|
88
88
|
}) }) : /* @__PURE__ */ w(S, { children: [
|
|
89
|
-
|
|
89
|
+
a && a !== "choose" && /* @__PURE__ */ C("p", {
|
|
90
90
|
role: "status",
|
|
91
|
-
className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${
|
|
92
|
-
children: m(`result.${
|
|
91
|
+
className: `mb-3 rounded-md bg-muted px-3 py-2 text-sm ${a === "failed" ? "text-danger" : ""}`,
|
|
92
|
+
children: m(`result.${a}`)
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */ C(
|
|
95
|
-
icon: /* @__PURE__ */ C(
|
|
94
|
+
/* @__PURE__ */ C(c, {
|
|
95
|
+
icon: /* @__PURE__ */ C(u, {
|
|
96
96
|
provider: h.provider,
|
|
97
97
|
className: "size-7"
|
|
98
98
|
}),
|
|
@@ -109,7 +109,7 @@ function k({ workspace: n, isAdmin: i, result: c }) {
|
|
|
109
109
|
loading: b.isPending,
|
|
110
110
|
children: m("connect")
|
|
111
111
|
})] }),
|
|
112
|
-
children: h.connections.length > 0 && /* @__PURE__ */ C(
|
|
112
|
+
children: h.connections.length > 0 && /* @__PURE__ */ C(l, {
|
|
113
113
|
title: m("connections"),
|
|
114
114
|
children: h.connections.map((e) => /* @__PURE__ */ w("li", {
|
|
115
115
|
className: "flex items-center gap-3 px-4 py-3 text-sm",
|
|
@@ -132,20 +132,20 @@ function k({ workspace: n, isAdmin: i, result: c }) {
|
|
|
132
132
|
}),
|
|
133
133
|
i && /* @__PURE__ */ C(A, {
|
|
134
134
|
workspace: n,
|
|
135
|
-
chosen:
|
|
135
|
+
chosen: a === "choose"
|
|
136
136
|
})
|
|
137
137
|
] });
|
|
138
138
|
}
|
|
139
|
-
function A({ workspace: i, chosen:
|
|
140
|
-
let s = x("code"), { data: c } = D(n(i)),
|
|
139
|
+
function A({ workspace: i, chosen: a }) {
|
|
140
|
+
let s = x("code"), { data: c } = D(n(i)), l = E(), u = d(), f = T({
|
|
141
141
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/code-host/connections", {
|
|
142
142
|
params: { path: { workspace: i } },
|
|
143
143
|
body: { id: n }
|
|
144
144
|
})),
|
|
145
|
-
onMutate:
|
|
146
|
-
onError:
|
|
145
|
+
onMutate: u.clear,
|
|
146
|
+
onError: u.set,
|
|
147
147
|
onSettled: () => {
|
|
148
|
-
|
|
148
|
+
l.invalidateQueries({ queryKey: r(i).queryKey }), l.invalidateQueries({ queryKey: [
|
|
149
149
|
"workspace",
|
|
150
150
|
i,
|
|
151
151
|
"teams"
|
|
@@ -156,10 +156,10 @@ function A({ workspace: i, chosen: o }) {
|
|
|
156
156
|
params: { path: { workspace: i } },
|
|
157
157
|
body: { install: !0 }
|
|
158
158
|
})),
|
|
159
|
-
onMutate:
|
|
160
|
-
onError:
|
|
159
|
+
onMutate: u.clear,
|
|
160
|
+
onError: u.set
|
|
161
161
|
});
|
|
162
|
-
return !
|
|
162
|
+
return !a && c.length === 0 ? null : /* @__PURE__ */ w(m, {
|
|
163
163
|
size: "fill",
|
|
164
164
|
padding: "sm",
|
|
165
165
|
className: "mt-4",
|
|
@@ -192,7 +192,7 @@ function A({ workspace: i, chosen: o }) {
|
|
|
192
192
|
}), /* @__PURE__ */ C(h, {
|
|
193
193
|
size: "md",
|
|
194
194
|
className: "mt-2",
|
|
195
|
-
children: f.isError && f.variables === e.id ?
|
|
195
|
+
children: f.isError && f.variables === e.id ? u.error : null
|
|
196
196
|
})]
|
|
197
197
|
}, e.id))
|
|
198
198
|
}),
|
|
@@ -205,7 +205,7 @@ function A({ workspace: i, chosen: o }) {
|
|
|
205
205
|
let e = window.open("about:blank", "_blank");
|
|
206
206
|
g.mutate(void 0, {
|
|
207
207
|
onSuccess: ({ url: t }) => {
|
|
208
|
-
let n =
|
|
208
|
+
let n = o(t);
|
|
209
209
|
if (!n) return e?.close();
|
|
210
210
|
if (!e) return window.location.assign(n);
|
|
211
211
|
e.opener = null, e.location.href = n;
|
|
@@ -223,7 +223,7 @@ function A({ workspace: i, chosen: o }) {
|
|
|
223
223
|
/* @__PURE__ */ C(h, {
|
|
224
224
|
size: "md",
|
|
225
225
|
className: "mt-2",
|
|
226
|
-
children: g.isError ?
|
|
226
|
+
children: g.isError ? u.error : null
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
229
|
});
|