@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,234 +1,234 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { AddIcon as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { areasQuery as e, knowledgeQuery as t } from "../../../api/queries.js";
|
|
2
|
+
import { FavoriteStar as n } from "../../../components/FavoriteStar.js";
|
|
3
|
+
import { KnowledgeStatus as r } from "../../../components/HoverCards.js";
|
|
4
|
+
import { AddIcon as i, LibraryIcon as a } from "../../../components/icons.js";
|
|
5
|
+
import { EntryDialog as o, useKnowledgeMenu as s } from "../../../lib/knowledge.js";
|
|
6
|
+
import { kinds as c, termRef as l } from "../../../lib/knowledgeKinds.js";
|
|
7
|
+
import { usePageTitle as u } from "../../../lib/pageTitle.js";
|
|
8
|
+
import { Link as d, useNavigate as f } from "../../../lib/router.js";
|
|
9
|
+
import { useTime as p } from "../../../lib/time.js";
|
|
10
|
+
import { Route as m } from "./index.js";
|
|
11
11
|
import { Button as h, EmptyState as g, SearchInput as _, SegmentedControl as v, buttonClasses as y, useOpenMenu as b } from "@parallelworks/ui";
|
|
12
12
|
import { Suspense as x, useCallback as S, useEffect as C, useMemo as w, useState as T } from "react";
|
|
13
13
|
import { useLocale as E, useTranslations as D } from "use-intl";
|
|
14
|
-
import { Fragment as
|
|
15
|
-
import { useQuery as
|
|
14
|
+
import { Fragment as ee, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
15
|
+
import { useQuery as A, useSuspenseQuery as j } from "@tanstack/react-query";
|
|
16
16
|
// src/routes/$workspace/knowledge/index.tsx?tsr-split=component
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let { workspace:
|
|
20
|
-
|
|
21
|
-
let
|
|
17
|
+
var M = 5, N = 8;
|
|
18
|
+
function P() {
|
|
19
|
+
let { workspace: r } = m.useParams(), { archived: s, kind: p = "all" } = m.useSearch(), b = D("knowledge"), P = E();
|
|
20
|
+
u(b("title"));
|
|
21
|
+
let I = f(), [L, R] = T(""), [z, B] = T(""), [V, H] = T(null);
|
|
22
22
|
C(() => {
|
|
23
|
-
let e = setTimeout(() =>
|
|
23
|
+
let e = setTimeout(() => B(L.trim()), 200);
|
|
24
24
|
return () => clearTimeout(e);
|
|
25
|
-
}, [
|
|
26
|
-
let { data:
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
-
}, { data:
|
|
30
|
-
...
|
|
31
|
-
enabled: !!
|
|
32
|
-
}),
|
|
25
|
+
}, [L]);
|
|
26
|
+
let { data: U } = j(t(r)), { data: W = [] } = A(e(r)), G = {
|
|
27
|
+
...z && { q: z },
|
|
28
|
+
...s && { archived: !0 }
|
|
29
|
+
}, { data: K } = A({
|
|
30
|
+
...t(r, G),
|
|
31
|
+
enabled: !!z || !!s
|
|
32
|
+
}), q = !!z || !!s, J = q ? K ?? [] : U, Y = p === "all" ? J : J.filter((e) => e.kind === p), X = S((e) => H(e), []), Z = w(() => {
|
|
33
33
|
let e = /* @__PURE__ */ new Map();
|
|
34
|
-
for (let t of
|
|
34
|
+
for (let t of J) e.set(t.kind, (e.get(t.kind) ?? 0) + 1);
|
|
35
35
|
return e;
|
|
36
|
-
}, [
|
|
37
|
-
let e = new Intl.Collator(
|
|
38
|
-
for (let e of
|
|
39
|
-
let n =
|
|
36
|
+
}, [J]), Q = w(() => [...Y].sort((e, t) => t.updatedAt.localeCompare(e.updatedAt)).slice(0, M), [Y]), te = w(() => {
|
|
37
|
+
let e = new Intl.Collator(P, { sensitivity: "base" }), t = /* @__PURE__ */ new Map();
|
|
38
|
+
for (let e of Y) {
|
|
39
|
+
let n = W.some((t) => t.id === e.areaId) ? e.areaId : "";
|
|
40
40
|
t.set(n, [...t.get(n) ?? [], e]);
|
|
41
41
|
}
|
|
42
42
|
return [...t].map(([t, n]) => ({
|
|
43
43
|
id: t,
|
|
44
|
-
title:
|
|
44
|
+
title: W.find((e) => e.id === t)?.title ?? b("general"),
|
|
45
45
|
entries: n.sort((t, n) => e.compare(t.name, n.name))
|
|
46
46
|
})).sort((t, n) => t.id ? n.id ? e.compare(t.title, n.title) : -1 : 1);
|
|
47
47
|
}, [
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
Y,
|
|
49
|
+
W,
|
|
50
|
+
P,
|
|
51
51
|
b
|
|
52
|
-
]), ne = (e) =>
|
|
52
|
+
]), ne = (e) => I({
|
|
53
53
|
to: "/$workspace/knowledge",
|
|
54
|
-
params: { workspace:
|
|
54
|
+
params: { workspace: r },
|
|
55
55
|
search: {
|
|
56
|
-
...
|
|
56
|
+
...s && { archived: s },
|
|
57
57
|
...e !== "all" && { kind: e }
|
|
58
58
|
},
|
|
59
59
|
replace: !0
|
|
60
|
-
}), $ =
|
|
61
|
-
return /* @__PURE__ */
|
|
60
|
+
}), $ = c.filter((e) => Z.has(e) || e === p);
|
|
61
|
+
return /* @__PURE__ */ k("div", {
|
|
62
62
|
className: "flex h-full flex-col",
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ k("header", {
|
|
65
65
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ O("h1", {
|
|
68
68
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
69
69
|
children: b("title")
|
|
70
70
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
workspace:
|
|
71
|
+
/* @__PURE__ */ O(n, {
|
|
72
|
+
workspace: r,
|
|
73
73
|
kind: "page",
|
|
74
74
|
target: "knowledge"
|
|
75
75
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ O("span", {
|
|
77
77
|
className: "whitespace-nowrap text-xs text-muted-foreground tabular-nums",
|
|
78
|
-
children: b("count", { count:
|
|
78
|
+
children: b("count", { count: U.length })
|
|
79
79
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ O(d, {
|
|
81
81
|
to: "/$workspace/graph",
|
|
82
|
-
params: { workspace:
|
|
82
|
+
params: { workspace: r },
|
|
83
83
|
className: `${y({ size: "sm" })} ml-auto`,
|
|
84
84
|
children: b("graph")
|
|
85
85
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ k(h, {
|
|
87
87
|
type: "button",
|
|
88
88
|
variant: "primary",
|
|
89
89
|
size: "sm",
|
|
90
|
-
onClick: () =>
|
|
91
|
-
children: [/* @__PURE__ */
|
|
90
|
+
onClick: () => X({ kind: "create" }),
|
|
91
|
+
children: [/* @__PURE__ */ O(i, { className: "size-3.5" }), /* @__PURE__ */ O("span", {
|
|
92
92
|
className: "max-md:sr-only",
|
|
93
93
|
children: b("new")
|
|
94
94
|
})]
|
|
95
95
|
})
|
|
96
96
|
]
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ O("div", {
|
|
99
99
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
100
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ k("div", {
|
|
101
101
|
className: "mx-auto w-full max-w-3xl px-4 pt-8 pb-16 md:px-8",
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
value:
|
|
105
|
-
onValueChange:
|
|
103
|
+
/* @__PURE__ */ O(_, {
|
|
104
|
+
value: L,
|
|
105
|
+
onValueChange: R,
|
|
106
106
|
label: b("search"),
|
|
107
107
|
size: "lg",
|
|
108
108
|
className: "w-full"
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ k("div", {
|
|
111
111
|
className: "mt-4 flex flex-wrap items-center gap-2",
|
|
112
|
-
children: [$.length > 1 && /* @__PURE__ */
|
|
112
|
+
children: [$.length > 1 && /* @__PURE__ */ O(v, {
|
|
113
113
|
label: b("kindLabel"),
|
|
114
114
|
size: "sm",
|
|
115
|
-
value:
|
|
115
|
+
value: p,
|
|
116
116
|
onValueChange: ne,
|
|
117
117
|
options: [{
|
|
118
118
|
value: "all",
|
|
119
119
|
label: b("allKinds"),
|
|
120
|
-
count:
|
|
120
|
+
count: J.length
|
|
121
121
|
}, ...$.map((e) => ({
|
|
122
122
|
value: e,
|
|
123
123
|
label: b(`kinds.${e}`),
|
|
124
|
-
count:
|
|
124
|
+
count: Z.get(e) ?? 0
|
|
125
125
|
}))]
|
|
126
|
-
}), /* @__PURE__ */
|
|
126
|
+
}), /* @__PURE__ */ O(d, {
|
|
127
127
|
to: "/$workspace/knowledge",
|
|
128
|
-
params: { workspace:
|
|
128
|
+
params: { workspace: r },
|
|
129
129
|
search: {
|
|
130
|
-
...!
|
|
131
|
-
...
|
|
130
|
+
...!s && { archived: !0 },
|
|
131
|
+
...p !== "all" && { kind: p }
|
|
132
132
|
},
|
|
133
|
-
"aria-current":
|
|
133
|
+
"aria-current": s || void 0,
|
|
134
134
|
className: `${y({
|
|
135
135
|
size: "sm",
|
|
136
|
-
variant:
|
|
136
|
+
variant: s ? "secondary" : "ghost"
|
|
137
137
|
})} ml-auto`,
|
|
138
138
|
children: b("archived")
|
|
139
139
|
})]
|
|
140
140
|
}),
|
|
141
|
-
|
|
142
|
-
icon: /* @__PURE__ */
|
|
143
|
-
title: b(
|
|
144
|
-
description:
|
|
145
|
-
action: !
|
|
141
|
+
Y.length === 0 ? /* @__PURE__ */ O(g, {
|
|
142
|
+
icon: /* @__PURE__ */ O(a, {}),
|
|
143
|
+
title: b(q || p !== "all" ? "noMatches" : "emptyTitle"),
|
|
144
|
+
description: q || p !== "all" ? void 0 : b("empty"),
|
|
145
|
+
action: !q && p === "all" ? /* @__PURE__ */ O(h, {
|
|
146
146
|
type: "button",
|
|
147
147
|
variant: "primary",
|
|
148
|
-
onClick: () =>
|
|
148
|
+
onClick: () => X({ kind: "create" }),
|
|
149
149
|
children: b("new")
|
|
150
150
|
}) : void 0,
|
|
151
151
|
className: "mt-16"
|
|
152
|
-
}) :
|
|
153
|
-
workspace:
|
|
152
|
+
}) : q ? /* @__PURE__ */ O(F, {
|
|
153
|
+
workspace: r,
|
|
154
154
|
title: b("results"),
|
|
155
|
-
entries:
|
|
156
|
-
onOpen:
|
|
157
|
-
}) : /* @__PURE__ */
|
|
158
|
-
workspace:
|
|
155
|
+
entries: Y,
|
|
156
|
+
onOpen: X
|
|
157
|
+
}) : /* @__PURE__ */ k(ee, { children: [Y.length >= N && /* @__PURE__ */ O(F, {
|
|
158
|
+
workspace: r,
|
|
159
159
|
title: b("recent"),
|
|
160
|
-
entries:
|
|
161
|
-
onOpen:
|
|
160
|
+
entries: Q,
|
|
161
|
+
onOpen: X,
|
|
162
162
|
showTime: !0
|
|
163
|
-
}), te.map((e) => /* @__PURE__ */
|
|
164
|
-
workspace:
|
|
163
|
+
}), te.map((e) => /* @__PURE__ */ O(F, {
|
|
164
|
+
workspace: r,
|
|
165
165
|
title: e.title,
|
|
166
166
|
entries: e.entries,
|
|
167
|
-
onOpen:
|
|
167
|
+
onOpen: X
|
|
168
168
|
}, e.id || "general"))] })
|
|
169
169
|
]
|
|
170
170
|
})
|
|
171
171
|
}),
|
|
172
|
-
|
|
173
|
-
workspace:
|
|
174
|
-
mode:
|
|
175
|
-
onClose: () =>
|
|
176
|
-
onSaved: (e) =>
|
|
172
|
+
V && /* @__PURE__ */ O(x, { children: /* @__PURE__ */ O(o, {
|
|
173
|
+
workspace: r,
|
|
174
|
+
mode: V,
|
|
175
|
+
onClose: () => H(null),
|
|
176
|
+
onSaved: (e) => I({
|
|
177
177
|
to: "/$workspace/knowledge/$term",
|
|
178
178
|
params: {
|
|
179
|
-
workspace:
|
|
180
|
-
term:
|
|
179
|
+
workspace: r,
|
|
180
|
+
term: l(e)
|
|
181
181
|
}
|
|
182
182
|
})
|
|
183
183
|
}) })
|
|
184
184
|
]
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
let o = D("knowledge"),
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
-
"aria-label":
|
|
187
|
+
function F({ workspace: e, title: t, entries: n, onOpen: i, showTime: a = !1 }) {
|
|
188
|
+
let o = D("knowledge"), c = b(), u = s(e, i), f = p();
|
|
189
|
+
return /* @__PURE__ */ k("section", {
|
|
190
|
+
"aria-label": t,
|
|
191
191
|
className: "mt-10",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ k("h2", {
|
|
193
193
|
className: "flex items-baseline gap-2 text-base font-semibold",
|
|
194
|
-
children: [
|
|
194
|
+
children: [t, /* @__PURE__ */ O("span", {
|
|
195
195
|
className: "text-xs font-normal text-muted-foreground tabular-nums",
|
|
196
|
-
children:
|
|
196
|
+
children: n.length
|
|
197
197
|
})]
|
|
198
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ O("ul", {
|
|
199
199
|
className: "mt-3 divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
200
|
-
children:
|
|
200
|
+
children: n.map((t) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k(d, {
|
|
201
201
|
to: "/$workspace/knowledge/$term",
|
|
202
202
|
params: {
|
|
203
203
|
workspace: e,
|
|
204
|
-
term:
|
|
204
|
+
term: l(t)
|
|
205
205
|
},
|
|
206
|
-
onContextMenu: (e) =>
|
|
206
|
+
onContextMenu: (e) => c(e, u(t)),
|
|
207
207
|
className: "group flex flex-col gap-1 px-4 py-3 sm:flex-row sm:items-start sm:gap-3 transition-colors duration-150 hover:bg-muted focus-visible:outline-offset-[-2px]",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ k("span", {
|
|
209
209
|
className: "min-w-0 flex-1",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
211
|
-
className: `block truncate text-sm font-medium ${
|
|
212
|
-
children:
|
|
213
|
-
}), /* @__PURE__ */
|
|
210
|
+
children: [/* @__PURE__ */ O("span", {
|
|
211
|
+
className: `block truncate text-sm font-medium ${t.status === "superseded" ? "text-muted-foreground line-through" : ""}`,
|
|
212
|
+
children: t.name
|
|
213
|
+
}), /* @__PURE__ */ O("span", {
|
|
214
214
|
className: "mt-0.5 line-clamp-2 text-xs leading-5 text-muted-foreground",
|
|
215
|
-
children:
|
|
215
|
+
children: t.definition
|
|
216
216
|
})]
|
|
217
|
-
}), (
|
|
217
|
+
}), (t.kind !== "term" || t.status === "added" || a) && /* @__PURE__ */ k("span", {
|
|
218
218
|
className: "flex items-center gap-2 text-xs text-muted-foreground sm:shrink-0 sm:pt-0.5",
|
|
219
219
|
children: [
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
a && /* @__PURE__ */
|
|
223
|
-
dateTime:
|
|
224
|
-
title:
|
|
220
|
+
t.kind !== "term" && /* @__PURE__ */ O("span", { children: o(`kind.${t.kind}`) }),
|
|
221
|
+
t.status === "added" && /* @__PURE__ */ O(r, { status: t.status }),
|
|
222
|
+
a && /* @__PURE__ */ O("time", {
|
|
223
|
+
dateTime: t.updatedAt,
|
|
224
|
+
title: f.full(t.updatedAt),
|
|
225
225
|
className: "tabular-nums",
|
|
226
|
-
children:
|
|
226
|
+
children: f.relative(t.updatedAt)
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
229
|
})]
|
|
230
|
-
}) },
|
|
230
|
+
}) }, t.id))
|
|
231
231
|
})]
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
|
-
export {
|
|
234
|
+
export { P as component };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { windows as e } from "./measures.js";
|
|
2
|
+
import { rememberSearch as t } from "../../lib/listSearch.js";
|
|
3
|
+
import { redirect as n } from "../../lib/router.js";
|
|
4
4
|
import { createFileRoute as r, lazyFn as i, lazyRouteComponent as a } from "@tanstack/react-router";
|
|
5
5
|
var o = r("/$workspace/measures")({
|
|
6
|
-
validateSearch: (
|
|
7
|
-
beforeLoad: ({ params:
|
|
8
|
-
let o =
|
|
9
|
-
if (o) throw
|
|
6
|
+
validateSearch: (t) => ({ ...e.includes(t.days) && { days: t.days } }),
|
|
7
|
+
beforeLoad: ({ params: e, search: r, location: i, preload: a }) => {
|
|
8
|
+
let o = t(i.pathname, r, a);
|
|
9
|
+
if (o) throw n({
|
|
10
10
|
to: "/$workspace/measures",
|
|
11
|
-
params:
|
|
11
|
+
params: e,
|
|
12
12
|
search: o,
|
|
13
13
|
replace: !0
|
|
14
14
|
});
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { windows as e } from "./measures.js";
|
|
2
|
+
import { measuresQuery as t } from "../../api/queries.js";
|
|
3
|
+
import { useMoney as n } from "../../components/AgentWork.js";
|
|
4
|
+
import { AreaLink as r } from "../../components/AreaLink.js";
|
|
5
|
+
import { usePageTitle as i } from "../../lib/pageTitle.js";
|
|
6
|
+
import { Link as a } from "../../lib/router.js";
|
|
7
|
+
import { Route as o } from "./measures2.js";
|
|
8
8
|
import { SegmentedControl as s } from "@parallelworks/ui";
|
|
9
9
|
import { useFormatter as c, useTranslations as l } from "use-intl";
|
|
10
10
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
11
11
|
import { useSuspenseQuery as f } from "@tanstack/react-query";
|
|
12
12
|
// src/routes/$workspace/measures.tsx?tsr-split=component
|
|
13
13
|
function p() {
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
let { workspace: c } =
|
|
14
|
+
let n = l("measures");
|
|
15
|
+
i(n("title"));
|
|
16
|
+
let { workspace: c } = o.useParams(), { days: p = "30" } = o.useSearch(), h = o.useNavigate(), { data: v } = f(t(c, Number(p)));
|
|
17
17
|
return /* @__PURE__ */ d("div", {
|
|
18
18
|
className: "w-full space-y-10 px-4 py-6 md:px-8 md:py-8",
|
|
19
19
|
children: [
|
|
@@ -21,37 +21,37 @@ function p() {
|
|
|
21
21
|
className: "flex flex-wrap items-end justify-between gap-4",
|
|
22
22
|
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
|
|
23
23
|
className: "text-xl font-semibold tracking-tight",
|
|
24
|
-
children:
|
|
24
|
+
children: n("title")
|
|
25
25
|
}), /* @__PURE__ */ u("p", {
|
|
26
26
|
className: "mt-1 text-sm text-muted-foreground",
|
|
27
|
-
children:
|
|
27
|
+
children: n("description")
|
|
28
28
|
})] }), /* @__PURE__ */ u(s, {
|
|
29
|
-
label:
|
|
29
|
+
label: n("window"),
|
|
30
30
|
value: p,
|
|
31
31
|
onValueChange: (e) => h({
|
|
32
32
|
search: { days: e },
|
|
33
33
|
replace: !0
|
|
34
34
|
}),
|
|
35
|
-
options:
|
|
35
|
+
options: e.map((e) => ({
|
|
36
36
|
value: e,
|
|
37
|
-
label:
|
|
37
|
+
label: n("days", { count: Number(e) })
|
|
38
38
|
}))
|
|
39
39
|
})]
|
|
40
40
|
}),
|
|
41
41
|
/* @__PURE__ */ u(m, { queue: v.queue }),
|
|
42
42
|
/* @__PURE__ */ u(g, { states: v.states }),
|
|
43
43
|
/* @__PURE__ */ d("section", {
|
|
44
|
-
"aria-label":
|
|
44
|
+
"aria-label": n("cost"),
|
|
45
45
|
children: [/* @__PURE__ */ u("h2", {
|
|
46
46
|
className: "text-sm font-semibold",
|
|
47
|
-
children:
|
|
47
|
+
children: n("cost")
|
|
48
48
|
}), /* @__PURE__ */ d("div", {
|
|
49
49
|
className: "mt-3 grid gap-6 lg:grid-cols-3",
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ u(_, {
|
|
52
|
-
title:
|
|
52
|
+
title: n("byIssue"),
|
|
53
53
|
rows: v.issues,
|
|
54
|
-
link: (e) => /* @__PURE__ */ d(
|
|
54
|
+
link: (e) => /* @__PURE__ */ d(a, {
|
|
55
55
|
to: "/$workspace/issues/$identifier",
|
|
56
56
|
params: {
|
|
57
57
|
workspace: c,
|
|
@@ -69,9 +69,9 @@ function p() {
|
|
|
69
69
|
})
|
|
70
70
|
}),
|
|
71
71
|
/* @__PURE__ */ u(_, {
|
|
72
|
-
title:
|
|
72
|
+
title: n("byArea"),
|
|
73
73
|
rows: v.areas,
|
|
74
|
-
link: (e) => /* @__PURE__ */ u(
|
|
74
|
+
link: (e) => /* @__PURE__ */ u(r, {
|
|
75
75
|
workspace: c,
|
|
76
76
|
area: e,
|
|
77
77
|
className: "hover:underline",
|
|
@@ -79,9 +79,9 @@ function p() {
|
|
|
79
79
|
})
|
|
80
80
|
}),
|
|
81
81
|
/* @__PURE__ */ u(_, {
|
|
82
|
-
title:
|
|
82
|
+
title: n("byTeam"),
|
|
83
83
|
rows: v.teams,
|
|
84
|
-
link: (e) => /* @__PURE__ */ u(
|
|
84
|
+
link: (e) => /* @__PURE__ */ u(a, {
|
|
85
85
|
to: "/$workspace/teams/$key/settings",
|
|
86
86
|
params: {
|
|
87
87
|
workspace: c,
|
|
@@ -198,8 +198,8 @@ function g({ states: e }) {
|
|
|
198
198
|
]
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function _({ title: e, rows: t, link:
|
|
202
|
-
let
|
|
201
|
+
function _({ title: e, rows: t, link: r }) {
|
|
202
|
+
let i = l("measures"), a = n();
|
|
203
203
|
return /* @__PURE__ */ d("div", {
|
|
204
204
|
className: "min-w-0",
|
|
205
205
|
children: [/* @__PURE__ */ u("h3", {
|
|
@@ -207,7 +207,7 @@ function _({ title: e, rows: t, link: n }) {
|
|
|
207
207
|
children: e
|
|
208
208
|
}), t.length === 0 ? /* @__PURE__ */ u("p", {
|
|
209
209
|
className: "text-sm text-muted-foreground",
|
|
210
|
-
children:
|
|
210
|
+
children: i("noCost")
|
|
211
211
|
}) : /* @__PURE__ */ u("ol", {
|
|
212
212
|
className: "divide-y divide-border rounded-md border border-border text-sm",
|
|
213
213
|
children: t.map((e) => /* @__PURE__ */ d("li", {
|
|
@@ -215,15 +215,15 @@ function _({ title: e, rows: t, link: n }) {
|
|
|
215
215
|
children: [
|
|
216
216
|
/* @__PURE__ */ u("span", {
|
|
217
217
|
className: "min-w-0 flex-1 truncate",
|
|
218
|
-
children:
|
|
218
|
+
children: r(e)
|
|
219
219
|
}),
|
|
220
220
|
/* @__PURE__ */ u("span", {
|
|
221
221
|
className: "shrink-0 text-xs text-muted-foreground tabular-nums",
|
|
222
|
-
children:
|
|
222
|
+
children: i("runCount", { count: e.runs })
|
|
223
223
|
}),
|
|
224
224
|
/* @__PURE__ */ u("span", {
|
|
225
225
|
className: "w-20 shrink-0 text-right tabular-nums",
|
|
226
|
-
children:
|
|
226
|
+
children: a(e.costMicros)
|
|
227
227
|
})
|
|
228
228
|
]
|
|
229
229
|
}, e.id))
|