@parallelworks/tandem-web 0.171.1 → 0.171.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +201 -164
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +97 -92
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +36 -34
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +99 -97
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/triageSeen.js +2 -2
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +202 -212
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { docsQuery as e, knowledgeQuery as t } from "../api/queries.js";
|
|
2
|
+
import { appURL as n } from "../lib/base.js";
|
|
3
3
|
import { docKey as r, docURL as i } from "../lib/docs.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { docForms as a, formsOf as o } from "../lib/glossary.js";
|
|
5
|
+
import { entryPath as s, termRef as c } from "../lib/knowledgeKinds.js";
|
|
6
|
+
import { linksIn as l, unlinkedMentions as u } from "./editorPlugins.js";
|
|
7
|
+
import { FileTextIcon as d, LibraryIcon as f } from "./icons.js";
|
|
8
8
|
import { Button as p } from "@parallelworks/ui";
|
|
9
9
|
import { useEffect as m, useMemo as h, useState as g } from "react";
|
|
10
10
|
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(
|
|
14
|
+
function x(d, f, p) {
|
|
15
|
+
let { data: _ = [] } = b(t(d)), { data: v = [] } = b(e(d)), [y, x] = g(0);
|
|
16
16
|
m(() => {
|
|
17
17
|
if (!p) return;
|
|
18
18
|
let e = () => x((e) => e + 1);
|
|
@@ -20,36 +20,36 @@ function x(a, o, 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(() => [...o(S), ...a(v, f.key)].sort((e, t) => t.text.length - e.text.length), [
|
|
24
24
|
S,
|
|
25
25
|
v,
|
|
26
|
-
|
|
26
|
+
f.key
|
|
27
27
|
]);
|
|
28
28
|
return h(() => {
|
|
29
29
|
if (!p || p.isDestroyed) return [];
|
|
30
|
-
let
|
|
31
|
-
return
|
|
32
|
-
let n =
|
|
33
|
-
return n.includes("/docs/") && r(n.split("/").pop() ?? "") ===
|
|
34
|
-
}) :
|
|
35
|
-
let n =
|
|
36
|
-
return
|
|
37
|
-
})).flatMap((
|
|
38
|
-
if (
|
|
39
|
-
let
|
|
40
|
-
return
|
|
41
|
-
...
|
|
42
|
-
target:
|
|
30
|
+
let e = [...l(p.state.doc)], t = new Map(v.map((e) => [e.key, e])), a = new Map(S.map((e) => [e.id, e]));
|
|
31
|
+
return u(p.state.doc, C, (t) => t.startsWith("doc:") ? e.some((e) => {
|
|
32
|
+
let n = e.split(/[?#]/)[0] ?? "";
|
|
33
|
+
return n.includes("/docs/") && r(n.split("/").pop() ?? "") === t.slice(4);
|
|
34
|
+
}) : e.some((e) => {
|
|
35
|
+
let n = a.get(t), r = (e.split(/[?#]/)[0] ?? "").split("/knowledge/")[1];
|
|
36
|
+
return e.includes(`entry=${t}`) || !!r && (r === t || r === n?.slug);
|
|
37
|
+
})).flatMap((e) => {
|
|
38
|
+
if (e.id.startsWith("doc:")) {
|
|
39
|
+
let n = t.get(e.id.slice(4));
|
|
40
|
+
return n ? [{
|
|
41
|
+
...e,
|
|
42
|
+
target: n.title,
|
|
43
43
|
kind: "doc",
|
|
44
|
-
href: i(
|
|
44
|
+
href: i(d, n)
|
|
45
45
|
}] : [];
|
|
46
46
|
}
|
|
47
|
-
let r =
|
|
47
|
+
let r = a.get(e.id);
|
|
48
48
|
return r ? [{
|
|
49
|
-
...
|
|
49
|
+
...e,
|
|
50
50
|
target: r.name,
|
|
51
51
|
kind: "term",
|
|
52
|
-
href:
|
|
52
|
+
href: n(s(d, c(r)))
|
|
53
53
|
}] : [];
|
|
54
54
|
});
|
|
55
55
|
}, [
|
|
@@ -57,7 +57,7 @@ function x(a, o, p) {
|
|
|
57
57
|
C,
|
|
58
58
|
v,
|
|
59
59
|
S,
|
|
60
|
-
|
|
60
|
+
d,
|
|
61
61
|
y
|
|
62
62
|
]);
|
|
63
63
|
}
|
|
@@ -99,7 +99,7 @@ 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(d, { className: "size-3.5" }) : /* @__PURE__ */ v(f, { className: "size-3.5" })
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ y("button", {
|
|
105
105
|
type: "button",
|
package/components/Updates.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { meQuery as e } from "../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useConfirm as t } from "../lib/confirm.js";
|
|
3
|
+
import { usePeople as n } from "../lib/people.js";
|
|
4
|
+
import { HealthIcon as r } from "./Planning.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,13 +16,13 @@ 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 } = t(), I = g(), { actorName: L, avatarOf: R } = n(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",
|
|
23
23
|
children: [j("updates"), /* @__PURE__ */ y("span", {
|
|
24
24
|
className: "flex items-center gap-1 text-xs font-normal text-muted-foreground",
|
|
25
|
-
children: [/* @__PURE__ */ v(
|
|
25
|
+
children: [/* @__PURE__ */ v(r, { state: w }), j(`health.${w}`)]
|
|
26
26
|
})]
|
|
27
27
|
}),
|
|
28
28
|
D && /* @__PURE__ */ y("form", {
|
|
@@ -54,12 +54,12 @@ function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeho
|
|
|
54
54
|
items: S.map((e) => ({
|
|
55
55
|
value: e,
|
|
56
56
|
label: j(`health.${e}`),
|
|
57
|
-
icon: /* @__PURE__ */ v(
|
|
57
|
+
icon: /* @__PURE__ */ v(r, { state: e })
|
|
58
58
|
})),
|
|
59
59
|
trigger: /* @__PURE__ */ y("button", {
|
|
60
60
|
type: "button",
|
|
61
61
|
className: f({ size: "sm" }),
|
|
62
|
-
children: [/* @__PURE__ */ v(
|
|
62
|
+
children: [/* @__PURE__ */ v(r, { state: z }), j(`health.${z}`)]
|
|
63
63
|
})
|
|
64
64
|
}),
|
|
65
65
|
k.isError && /* @__PURE__ */ v(c, {
|
|
@@ -90,7 +90,7 @@ function C({ workspace: C, state: w, health: T, updates: E, canWrite: D, placeho
|
|
|
90
90
|
children: [/* @__PURE__ */ y("div", {
|
|
91
91
|
className: "flex items-center gap-2 text-xs",
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */ v(
|
|
93
|
+
/* @__PURE__ */ v(r, { state: e.health }),
|
|
94
94
|
/* @__PURE__ */ v("span", {
|
|
95
95
|
className: "font-medium",
|
|
96
96
|
children: j(`health.${e.health}`)
|
package/components/Widgets.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { externalUrl as e } from "../lib/externalUrl.js";
|
|
2
|
+
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { CheckIcon as n, FileTextIcon as r, PullRequestIcon as i } from "./icons.js";
|
|
4
|
-
import { ProgressBar as a, Table as o } from "@parallelworks/ui";
|
|
5
|
-
import { useFormatter as
|
|
6
|
-
import { jsx as
|
|
4
|
+
import { ProgressBar as a, Table as o, Tooltip as s } from "@parallelworks/ui";
|
|
5
|
+
import { useFormatter as c, useLocale as l, useTranslations as u } from "use-intl";
|
|
6
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
7
|
// src/components/Widgets.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
10
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
8
|
+
var p = (...e) => e.filter(Boolean).join(" ");
|
|
9
|
+
function m({ workspace: e, widgets: t }) {
|
|
10
|
+
return t.length === 0 ? null : /* @__PURE__ */ d("div", {
|
|
11
11
|
className: "mt-2 space-y-3",
|
|
12
|
-
children: t.map((t, n) => /* @__PURE__ */
|
|
12
|
+
children: t.map((t, n) => /* @__PURE__ */ f("figure", {
|
|
13
13
|
className: "min-w-0",
|
|
14
|
-
children: [t.title && /* @__PURE__ */
|
|
14
|
+
children: [t.title && /* @__PURE__ */ d("figcaption", {
|
|
15
15
|
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
16
16
|
children: t.title
|
|
17
|
-
}), /* @__PURE__ */
|
|
17
|
+
}), /* @__PURE__ */ d(h, {
|
|
18
18
|
workspace: e,
|
|
19
19
|
widget: t
|
|
20
20
|
})]
|
|
21
21
|
}, n))
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function h({ workspace: e, widget: t }) {
|
|
25
25
|
switch (t.type) {
|
|
26
|
-
case "table": return /* @__PURE__ */
|
|
26
|
+
case "table": return /* @__PURE__ */ d(g, {
|
|
27
27
|
columns: t.columns ?? [],
|
|
28
28
|
rows: (t.rows ?? []).map((e) => e ?? [])
|
|
29
29
|
});
|
|
30
|
-
case "chart": return /* @__PURE__ */
|
|
30
|
+
case "chart": return /* @__PURE__ */ d(v, {
|
|
31
31
|
kind: t.chart === "line" ? "line" : "bar",
|
|
32
32
|
labels: t.labels ?? [],
|
|
33
33
|
series: t.series ?? []
|
|
34
34
|
});
|
|
35
|
-
case "diff": return /* @__PURE__ */
|
|
35
|
+
case "diff": return /* @__PURE__ */ d(y, {
|
|
36
36
|
path: t.path ?? "",
|
|
37
37
|
patch: t.patch ?? ""
|
|
38
38
|
});
|
|
39
|
-
case "files": return /* @__PURE__ */
|
|
40
|
-
case "tests": return /* @__PURE__ */
|
|
41
|
-
case "checklist": return /* @__PURE__ */
|
|
42
|
-
case "progress": return /* @__PURE__ */
|
|
39
|
+
case "files": return /* @__PURE__ */ d(b, { files: t.files ?? [] });
|
|
40
|
+
case "tests": return /* @__PURE__ */ d(x, { widget: t });
|
|
41
|
+
case "checklist": return /* @__PURE__ */ d(S, { checks: t.checks ?? [] });
|
|
42
|
+
case "progress": return /* @__PURE__ */ d(C, {
|
|
43
43
|
value: t.value ?? 0,
|
|
44
44
|
max: t.max ?? 1,
|
|
45
45
|
title: t.title
|
|
46
46
|
});
|
|
47
|
-
case "links": return /* @__PURE__ */
|
|
47
|
+
case "links": return /* @__PURE__ */ d(w, {
|
|
48
48
|
workspace: e,
|
|
49
49
|
links: t.links ?? []
|
|
50
50
|
});
|
|
51
51
|
default: return null;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return /* @__PURE__ */
|
|
54
|
+
function g({ columns: e, rows: t }) {
|
|
55
|
+
return /* @__PURE__ */ f(o, {
|
|
56
56
|
density: "compact",
|
|
57
57
|
borderless: !0,
|
|
58
58
|
panel: !1,
|
|
59
59
|
tbodyClassName: "divide-y divide-border",
|
|
60
60
|
wrapperClassName: "rounded-md border border-border",
|
|
61
|
-
children: [e.map((e, t) => /* @__PURE__ */
|
|
61
|
+
children: [e.map((e, t) => /* @__PURE__ */ d(o.Header, {
|
|
62
62
|
caps: !1,
|
|
63
63
|
children: e
|
|
64
|
-
}, t)), t.map((e, t) => /* @__PURE__ */
|
|
64
|
+
}, t)), t.map((e, t) => /* @__PURE__ */ d("tr", { children: e.map((e, t) => /* @__PURE__ */ d(o.Item, { children: e }, t)) }, t))]
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
var
|
|
67
|
+
var _ = [
|
|
68
68
|
"text-primary",
|
|
69
69
|
"text-agent",
|
|
70
70
|
"text-success",
|
|
@@ -72,107 +72,109 @@ var g = [
|
|
|
72
72
|
"text-danger",
|
|
73
73
|
"text-muted-foreground"
|
|
74
74
|
];
|
|
75
|
-
function
|
|
76
|
-
let r =
|
|
77
|
-
return /* @__PURE__ */
|
|
75
|
+
function v({ kind: e, labels: t, series: n }) {
|
|
76
|
+
let r = c(), i = u("widgets"), a = n.flatMap((e) => e.values ?? []), o = Math.max(0, ...a), l = Math.min(0, ...a), m = o - l || 1, h = 600 / t.length, g = (e) => 160 - (e - l) / m * 160, v = h * .7 / n.length;
|
|
77
|
+
return /* @__PURE__ */ f("div", {
|
|
78
78
|
className: "rounded-md border border-border p-3",
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ f("svg", {
|
|
81
81
|
viewBox: "0 0 600 160",
|
|
82
82
|
className: "h-40 w-full",
|
|
83
83
|
preserveAspectRatio: "none",
|
|
84
84
|
role: "img",
|
|
85
85
|
"aria-label": i("chart", { series: n.map((e) => e.name).join(", ") }),
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ d("line", {
|
|
87
87
|
x1: 0,
|
|
88
88
|
x2: 600,
|
|
89
|
-
y1:
|
|
90
|
-
y2:
|
|
89
|
+
y1: g(0),
|
|
90
|
+
y2: g(0),
|
|
91
91
|
className: "stroke-border",
|
|
92
92
|
strokeWidth: 1
|
|
93
|
-
}), n.map((n, i) => /* @__PURE__ */
|
|
94
|
-
className:
|
|
95
|
-
children: e === "bar" ? (n.values ?? []).map((e, a) => /* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
}), n.map((n, i) => /* @__PURE__ */ d("g", {
|
|
94
|
+
className: _[i % _.length],
|
|
95
|
+
children: e === "bar" ? (n.values ?? []).map((e, a) => /* @__PURE__ */ d(s, {
|
|
96
|
+
content: `${n.name}, ${t[a]}: ${r.number(e)}`,
|
|
97
|
+
children: /* @__PURE__ */ d("rect", {
|
|
98
|
+
x: a * h + h * .15 + i * v,
|
|
99
|
+
y: Math.min(g(e), g(0)),
|
|
100
|
+
width: v,
|
|
101
|
+
height: Math.abs(g(e) - g(0)),
|
|
102
|
+
fill: "currentColor"
|
|
103
|
+
})
|
|
104
|
+
}, a)) : /* @__PURE__ */ d("polyline", {
|
|
103
105
|
fill: "none",
|
|
104
106
|
stroke: "currentColor",
|
|
105
107
|
strokeWidth: 2,
|
|
106
108
|
vectorEffect: "non-scaling-stroke",
|
|
107
|
-
points: (n.values ?? []).map((e, t) => `${t *
|
|
109
|
+
points: (n.values ?? []).map((e, t) => `${t * h + h / 2},${g(e)}`).join(" ")
|
|
108
110
|
})
|
|
109
111
|
}, n.name))]
|
|
110
112
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ d("div", {
|
|
112
114
|
className: "mt-1 flex justify-between gap-1 text-[11px] text-muted-foreground",
|
|
113
|
-
children: t.map((e, t) => /* @__PURE__ */
|
|
115
|
+
children: t.map((e, t) => /* @__PURE__ */ d("span", {
|
|
114
116
|
className: "min-w-0 flex-1 truncate text-center",
|
|
115
117
|
children: e
|
|
116
118
|
}, t))
|
|
117
119
|
}),
|
|
118
|
-
n.length > 1 && /* @__PURE__ */
|
|
120
|
+
n.length > 1 && /* @__PURE__ */ d("ul", {
|
|
119
121
|
className: "mt-2 flex flex-wrap gap-3 text-xs",
|
|
120
|
-
children: n.map((e, t) => /* @__PURE__ */
|
|
122
|
+
children: n.map((e, t) => /* @__PURE__ */ f("li", {
|
|
121
123
|
className: "flex items-center gap-1.5",
|
|
122
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ d("span", { className: p("size-2 rounded-sm bg-current", _[t % _.length]) }), e.name]
|
|
123
125
|
}, e.name))
|
|
124
126
|
})
|
|
125
127
|
]
|
|
126
128
|
});
|
|
127
129
|
}
|
|
128
|
-
function
|
|
130
|
+
function y({ path: e, patch: t }) {
|
|
129
131
|
let n = t.replace(/\n$/, "").split("\n");
|
|
130
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ f("div", {
|
|
131
133
|
className: "overflow-hidden rounded-md border border-border",
|
|
132
|
-
children: [e && /* @__PURE__ */
|
|
134
|
+
children: [e && /* @__PURE__ */ f("div", {
|
|
133
135
|
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__ */
|
|
135
|
-
}), /* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ d(r, { className: "size-3.5 text-muted-foreground" }), e]
|
|
137
|
+
}), /* @__PURE__ */ d("pre", {
|
|
136
138
|
className: "max-h-96 overflow-auto py-1 font-mono text-xs leading-5",
|
|
137
|
-
children: n.map((e, t) => /* @__PURE__ */
|
|
138
|
-
className:
|
|
139
|
+
children: n.map((e, t) => /* @__PURE__ */ d("div", {
|
|
140
|
+
className: p("px-3 whitespace-pre", e.startsWith("+") && "bg-success/10 text-success", e.startsWith("-") && "bg-danger/10 text-danger", e.startsWith("@@") && "text-muted-foreground"),
|
|
139
141
|
children: e || " "
|
|
140
142
|
}, t))
|
|
141
143
|
})]
|
|
142
144
|
});
|
|
143
145
|
}
|
|
144
|
-
function
|
|
145
|
-
let t =
|
|
146
|
-
return /* @__PURE__ */
|
|
146
|
+
function b({ files: e }) {
|
|
147
|
+
let t = u("widgets"), n = [...e].sort((e, t) => e.path.localeCompare(t.path));
|
|
148
|
+
return /* @__PURE__ */ d("ul", {
|
|
147
149
|
className: "rounded-md border border-border py-1 font-mono text-xs",
|
|
148
150
|
children: n.map((e) => {
|
|
149
151
|
let n = e.path.split("/");
|
|
150
|
-
return /* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ f("li", {
|
|
151
153
|
className: "flex items-center gap-2 px-3 py-0.5",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ f("span", {
|
|
153
155
|
style: { paddingLeft: `${(n.length - 1) * 12}px` },
|
|
154
156
|
className: "min-w-0 truncate",
|
|
155
157
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ d("span", {
|
|
157
159
|
className: "text-muted-foreground",
|
|
158
160
|
children: n.slice(0, -1).join("/")
|
|
159
161
|
}),
|
|
160
|
-
n.length > 1 && /* @__PURE__ */
|
|
162
|
+
n.length > 1 && /* @__PURE__ */ d("span", {
|
|
161
163
|
className: "text-muted-foreground",
|
|
162
164
|
children: "/"
|
|
163
165
|
}),
|
|
164
166
|
n.at(-1)
|
|
165
167
|
]
|
|
166
|
-
}), e.change && /* @__PURE__ */
|
|
167
|
-
className:
|
|
168
|
+
}), e.change && /* @__PURE__ */ d("span", {
|
|
169
|
+
className: p("ml-auto shrink-0 font-sans text-[11px]", e.change === "added" && "text-success", e.change === "removed" && "text-danger", e.change === "changed" && "text-warning"),
|
|
168
170
|
children: t(`change.${e.change}`)
|
|
169
171
|
})]
|
|
170
172
|
}, e.path);
|
|
171
173
|
})
|
|
172
174
|
});
|
|
173
175
|
}
|
|
174
|
-
function
|
|
175
|
-
let t =
|
|
176
|
+
function x({ widget: e }) {
|
|
177
|
+
let t = u("widgets"), n = [
|
|
176
178
|
{
|
|
177
179
|
key: "passed",
|
|
178
180
|
n: e.passed,
|
|
@@ -189,51 +191,51 @@ function b({ widget: e }) {
|
|
|
189
191
|
tone: "text-muted-foreground"
|
|
190
192
|
}
|
|
191
193
|
];
|
|
192
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ f("div", {
|
|
193
195
|
className: "rounded-md border border-border px-3 py-2",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ d("p", {
|
|
195
197
|
className: "flex flex-wrap gap-4 text-sm",
|
|
196
|
-
children: n.map((e) => e.n !== void 0 && /* @__PURE__ */
|
|
198
|
+
children: n.map((e) => e.n !== void 0 && /* @__PURE__ */ d("span", {
|
|
197
199
|
className: e.tone,
|
|
198
200
|
children: t(`tests.${e.key}`, { count: e.n })
|
|
199
201
|
}, e.key))
|
|
200
|
-
}), (e.failures ?? []).length > 0 && /* @__PURE__ */
|
|
202
|
+
}), (e.failures ?? []).length > 0 && /* @__PURE__ */ d("ul", {
|
|
201
203
|
className: "mt-2 space-y-1 text-xs",
|
|
202
|
-
children: (e.failures ?? []).map((e) => /* @__PURE__ */
|
|
204
|
+
children: (e.failures ?? []).map((e) => /* @__PURE__ */ f("li", { children: [/* @__PURE__ */ d("span", {
|
|
203
205
|
className: "font-mono text-danger",
|
|
204
206
|
children: e.name
|
|
205
|
-
}), e.output && /* @__PURE__ */
|
|
207
|
+
}), e.output && /* @__PURE__ */ d("pre", {
|
|
206
208
|
className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
|
|
207
209
|
children: e.output
|
|
208
210
|
})] }, e.name))
|
|
209
211
|
})]
|
|
210
212
|
});
|
|
211
213
|
}
|
|
212
|
-
function
|
|
213
|
-
let t =
|
|
214
|
-
return /* @__PURE__ */
|
|
214
|
+
function S({ checks: e }) {
|
|
215
|
+
let t = u("widgets"), r = e.filter((e) => e.done).length;
|
|
216
|
+
return /* @__PURE__ */ f("div", {
|
|
215
217
|
className: "rounded-md border border-border px-3 py-2",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ d("p", {
|
|
217
219
|
className: "mb-1 text-xs text-muted-foreground",
|
|
218
220
|
children: t("checked", {
|
|
219
221
|
done: r,
|
|
220
222
|
count: e.length
|
|
221
223
|
})
|
|
222
|
-
}), /* @__PURE__ */
|
|
224
|
+
}), /* @__PURE__ */ d("ul", {
|
|
223
225
|
className: "space-y-1 text-sm",
|
|
224
|
-
children: e.map((e, r) => /* @__PURE__ */
|
|
226
|
+
children: e.map((e, r) => /* @__PURE__ */ f("li", {
|
|
225
227
|
className: "flex items-start gap-2",
|
|
226
228
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
className:
|
|
229
|
+
/* @__PURE__ */ d("span", {
|
|
230
|
+
className: p("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
231
|
"aria-hidden": "true",
|
|
230
|
-
children: e.done && /* @__PURE__ */
|
|
232
|
+
children: e.done && /* @__PURE__ */ d(n, { className: "size-3" })
|
|
231
233
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
className:
|
|
234
|
+
/* @__PURE__ */ d("span", {
|
|
235
|
+
className: p(e.done && "text-muted-foreground line-through"),
|
|
234
236
|
children: e.text
|
|
235
237
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ d("span", {
|
|
237
239
|
className: "sr-only",
|
|
238
240
|
children: e.done ? t("done") : t("notDone")
|
|
239
241
|
})
|
|
@@ -242,9 +244,9 @@ function x({ checks: e }) {
|
|
|
242
244
|
})]
|
|
243
245
|
});
|
|
244
246
|
}
|
|
245
|
-
function
|
|
246
|
-
let r =
|
|
247
|
-
return /* @__PURE__ */
|
|
247
|
+
function C({ value: e, max: t, title: n }) {
|
|
248
|
+
let r = u("widgets"), i = l();
|
|
249
|
+
return /* @__PURE__ */ d(a, {
|
|
248
250
|
value: Math.min(Math.max(e, 0), t),
|
|
249
251
|
max: t,
|
|
250
252
|
size: "lg",
|
|
@@ -253,31 +255,31 @@ function S({ value: e, max: t, title: n }) {
|
|
|
253
255
|
"aria-label": n || r("progress")
|
|
254
256
|
});
|
|
255
257
|
}
|
|
256
|
-
function
|
|
257
|
-
let a =
|
|
258
|
-
return /* @__PURE__ */
|
|
258
|
+
function w({ workspace: n, links: r }) {
|
|
259
|
+
let a = u("widgets"), o = "inline-flex items-center gap-1.5 rounded-md border border-border px-2 py-1 text-xs hover:bg-muted";
|
|
260
|
+
return /* @__PURE__ */ d("ul", {
|
|
259
261
|
className: "flex flex-wrap gap-1.5",
|
|
260
|
-
children: r.map((r) => /* @__PURE__ */
|
|
262
|
+
children: r.map((r) => /* @__PURE__ */ d("li", { children: r.kind === "issue" ? /* @__PURE__ */ f(t, {
|
|
261
263
|
to: "/$workspace/issues/$identifier",
|
|
262
264
|
params: {
|
|
263
265
|
workspace: n,
|
|
264
266
|
identifier: r.ref
|
|
265
267
|
},
|
|
266
268
|
className: o,
|
|
267
|
-
children: [/* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ d("span", {
|
|
268
270
|
className: "text-muted-foreground",
|
|
269
271
|
children: r.ref
|
|
270
272
|
}), r.label]
|
|
271
|
-
}) : r.kind === "pullRequest" ? /* @__PURE__ */
|
|
272
|
-
href:
|
|
273
|
+
}) : r.kind === "pullRequest" ? /* @__PURE__ */ f("a", {
|
|
274
|
+
href: e(r.ref),
|
|
273
275
|
target: "_blank",
|
|
274
276
|
rel: "noopener noreferrer",
|
|
275
277
|
className: o,
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
-
}) : /* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ d(i, { className: "size-3.5 text-muted-foreground" }), r.label || a("pullRequest")]
|
|
279
|
+
}) : /* @__PURE__ */ d("span", {
|
|
278
280
|
className: o,
|
|
279
281
|
children: r.label || a("run")
|
|
280
282
|
}) }, `${r.kind}:${r.ref}`))
|
|
281
283
|
});
|
|
282
284
|
}
|
|
283
|
-
export {
|
|
285
|
+
export { m as Widgets };
|
package/components/WorkCounts.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { teamsQuery as e } from "../api/queries.js";
|
|
2
|
+
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { Tooltip as n } from "@parallelworks/ui";
|
|
4
4
|
import { useParams as r } from "@tanstack/react-router";
|
|
5
5
|
import { useTranslations as i } from "use-intl";
|
|
@@ -8,7 +8,7 @@ import { useQuery as o } from "@tanstack/react-query";
|
|
|
8
8
|
// src/components/WorkCounts.tsx
|
|
9
9
|
function s({ counts: s, teamId: c, className: l = "" }) {
|
|
10
10
|
let u = i("workCounts"), { workspace: d = "" } = r({ strict: !1 }), { data: f = [] } = o({
|
|
11
|
-
...
|
|
11
|
+
...e(d),
|
|
12
12
|
enabled: !!d
|
|
13
13
|
});
|
|
14
14
|
if (!s) return null;
|
|
@@ -46,20 +46,20 @@ function s({ counts: s, teamId: c, className: l = "" }) {
|
|
|
46
46
|
let g = "rounded border px-1.5 py-0.5 text-[11px] leading-none";
|
|
47
47
|
return /* @__PURE__ */ a("span", {
|
|
48
48
|
className: `flex shrink-0 items-center gap-1 ${l}`,
|
|
49
|
-
children: h.map((
|
|
50
|
-
content:
|
|
49
|
+
children: h.map((e) => /* @__PURE__ */ a(n, {
|
|
50
|
+
content: e.hint,
|
|
51
51
|
describesAnchor: !0,
|
|
52
|
-
children: "to" in
|
|
53
|
-
to:
|
|
52
|
+
children: "to" in e && e.to && d ? /* @__PURE__ */ a(t, {
|
|
53
|
+
to: e.to,
|
|
54
54
|
params: { workspace: d },
|
|
55
55
|
search: p ? { team: p } : {},
|
|
56
|
-
className: `${g} ${
|
|
57
|
-
children:
|
|
56
|
+
className: `${g} ${e.tone} hover:border-primary hover:text-foreground`,
|
|
57
|
+
children: e.label
|
|
58
58
|
}) : /* @__PURE__ */ a("span", {
|
|
59
|
-
className: `${g} ${
|
|
60
|
-
children:
|
|
59
|
+
className: `${g} ${e.tone}`,
|
|
60
|
+
children: e.label
|
|
61
61
|
})
|
|
62
|
-
},
|
|
62
|
+
}, e.key))
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
export { s as WorkCounts };
|
package/components/cycleCrumb.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { cycleParam as e } from "../lib/cycleLinks.js";
|
|
2
|
+
import { byStart as t } from "../lib/cycleOrder.js";
|
|
3
|
+
import { cycleChoices as n } from "../lib/cycleSwitcher.js";
|
|
4
|
+
import { useNavigate as r } from "../lib/router.js";
|
|
5
|
+
import { useTime as i } from "../lib/time.js";
|
|
6
6
|
import { useTranslations as a } from "use-intl";
|
|
7
7
|
// src/components/cycleCrumb.ts
|
|
8
8
|
function o(o, s, c, l) {
|
|
9
|
-
let u = a("planning"), d =
|
|
9
|
+
let u = a("planning"), d = i(), f = r(), p = (e) => e.name ? u("cycleNamed", {
|
|
10
10
|
number: e.number,
|
|
11
11
|
name: e.name
|
|
12
12
|
}) : u("cycle", { number: e.number });
|
|
@@ -15,8 +15,8 @@ function o(o, s, c, l) {
|
|
|
15
15
|
switcher: {
|
|
16
16
|
label: u("switchCycle"),
|
|
17
17
|
placeholder: u("findCycle"),
|
|
18
|
-
items:
|
|
19
|
-
value:
|
|
18
|
+
items: n([...c].sort(t), e, p, (e) => d.dayRange(e.startsOn, e.endsOn), (e) => u(`states.${e}`)),
|
|
19
|
+
value: e(l),
|
|
20
20
|
onValueChange: (e) => {
|
|
21
21
|
f({
|
|
22
22
|
to: "/$workspace/teams/$key/cycles/$number",
|