@parallelworks/tandem-web 0.185.0 → 0.186.1
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 +19 -4
- package/_virtual/_virtual_i18n/es/common.js +19 -4
- package/_virtual/_virtual_i18n/ja/common.js +19 -4
- package/_virtual/_virtual_i18n/ko/common.js +19 -4
- package/_virtual/_virtual_i18n/zh/common.js +19 -4
- package/components/DocsTree.js +149 -139
- package/components/FavoriteStar.js +13 -1
- package/components/FavoritesNav.js +97 -60
- package/components/StatusRules.js +119 -85
- package/package.json +1 -1
- package/pages/areas.js +183 -173
- package/pages/decisions.js +61 -57
- package/pages/projects.js +71 -67
- package/pages/triage.js +197 -184
- package/routes/_workspace/agents/index2.js +95 -87
- package/routes/_workspace/dashboards/index2.js +61 -53
- package/routes/_workspace/docs/space2._space.js +105 -94
- package/routes/_workspace/graph3.js +69 -60
- package/routes/_workspace/measures3.js +82 -74
- package/routes/_workspace/notifications2.js +236 -230
- package/routes/_workspace/teams/_key/cycles/index2.js +98 -88
- package/routes/_workspace2.js +3 -2
|
@@ -1,110 +1,120 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../../../api/client.js";
|
|
2
2
|
import { cyclesQuery as n, teamsQuery as r } from "../../../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
3
|
+
import { FavoriteStar as i } from "../../../../../components/FavoriteStar.js";
|
|
4
|
+
import { AddIcon as a, CycleIcon as o } from "../../../../../components/icons.js";
|
|
5
|
+
import { BurnUp as s } from "../../../../../components/Reports.js";
|
|
6
|
+
import { cycleParam as c } from "../../../../../lib/cycleLinks.js";
|
|
7
|
+
import { byStart as l } from "../../../../../lib/cycleOrder.js";
|
|
8
|
+
import { usePageTitle as u } from "../../../../../lib/pageTitle.js";
|
|
9
|
+
import { useCan as d } from "../../../../../lib/roles.js";
|
|
10
|
+
import { Link as f } from "../../../../../lib/router.js";
|
|
11
|
+
import { teamPath as p } from "../../../../../lib/teamPaths.js";
|
|
12
|
+
import { useTime as m } from "../../../../../lib/time.js";
|
|
13
|
+
import { Route as h } from "./index.js";
|
|
14
|
+
import { Button as g, EmptyState as _, ErrorText as v, PageHeader as y, StatusBadge as b } from "@parallelworks/ui";
|
|
15
|
+
import { useState as x } from "react";
|
|
16
|
+
import { useErrorMessage as S } from "@parallelworks/problem/react";
|
|
17
|
+
import { useFormatter as C, useTranslations as w } from "use-intl";
|
|
18
|
+
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
19
|
+
import { useMutation as O, useQueryClient as k, useSuspenseQuery as A } from "@tanstack/react-query";
|
|
19
20
|
// src/routes/$workspace/teams/$key/cycles/index.tsx?tsr-split=component
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
let t = e.filter((e) => e.state === "past").sort(
|
|
21
|
+
var j = 5, M = (e) => e.progress.total + e.carriedOut;
|
|
22
|
+
function N(e) {
|
|
23
|
+
let t = e.filter((e) => e.state === "past").sort(l).slice(-3);
|
|
23
24
|
if (t.length === 0) return null;
|
|
24
25
|
let n = t.reduce((e, t) => e + t.progress.completed, 0) / t.length;
|
|
25
26
|
return n > 0 ? n : null;
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
let { workspace:
|
|
29
|
-
|
|
30
|
-
let
|
|
28
|
+
function P() {
|
|
29
|
+
let { workspace: s, key: c } = h.useParams(), m = w("favorites"), b = w("planning"), C = S(), { data: M } = A(r(s)), { data: P } = A(n(s, c)), I = M.find((e) => e.key === c);
|
|
30
|
+
u(b("cycles"), I?.name);
|
|
31
|
+
let L = d(s, "manage_cycles", { team: c }), R = k(), [z, B] = x(!1), V = O({
|
|
31
32
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles", {
|
|
32
33
|
params: { path: {
|
|
33
|
-
workspace:
|
|
34
|
-
key:
|
|
34
|
+
workspace: s,
|
|
35
|
+
key: c
|
|
35
36
|
} },
|
|
36
37
|
body: {}
|
|
37
38
|
})),
|
|
38
|
-
onSettled: () =>
|
|
39
|
-
}),
|
|
40
|
-
return /* @__PURE__ */
|
|
39
|
+
onSettled: () => R.invalidateQueries({ queryKey: n(s, c).queryKey })
|
|
40
|
+
}), H = [...P].sort(l), U = H.filter((e) => e.state === "past"), W = z ? 0 : Math.max(0, U.length - j), G = H.filter((e) => e.state !== "past" || U.indexOf(e) >= W), K = N(P);
|
|
41
|
+
return /* @__PURE__ */ D("div", {
|
|
41
42
|
className: "flex h-full min-h-0 flex-col",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ E(y, {
|
|
43
44
|
heading: !1,
|
|
44
45
|
breadcrumbs: [{
|
|
45
|
-
label:
|
|
46
|
-
href:
|
|
47
|
-
}, { label:
|
|
48
|
-
|
|
46
|
+
label: I?.name ?? c,
|
|
47
|
+
href: p(s, c, "issues")
|
|
48
|
+
}, { label: b("cycles") }],
|
|
49
|
+
titleActions: /* @__PURE__ */ E(i, {
|
|
50
|
+
workspace: s,
|
|
51
|
+
kind: "view",
|
|
52
|
+
target: p(s, c, "cycles"),
|
|
53
|
+
label: m("teamPage", {
|
|
54
|
+
team: I?.name ?? c,
|
|
55
|
+
page: b("cycles")
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
}), /* @__PURE__ */ E("div", {
|
|
49
59
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
50
|
-
children: /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ D("div", {
|
|
51
61
|
className: "w-full px-4 py-6 md:px-8 md:py-8",
|
|
52
62
|
children: [
|
|
53
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ D("div", {
|
|
54
64
|
className: "flex items-center gap-3",
|
|
55
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ E("div", {
|
|
56
66
|
className: "min-w-0",
|
|
57
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ E("h1", {
|
|
58
68
|
className: "text-xl font-semibold tracking-tight",
|
|
59
|
-
children:
|
|
69
|
+
children: b("cycles")
|
|
60
70
|
})
|
|
61
|
-
}),
|
|
71
|
+
}), L && I?.cyclesEnabled && /* @__PURE__ */ D(g, {
|
|
62
72
|
type: "button",
|
|
63
|
-
onClick: () =>
|
|
64
|
-
loading:
|
|
73
|
+
onClick: () => V.mutate(),
|
|
74
|
+
loading: V.isPending,
|
|
65
75
|
className: "ml-auto",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ E(a, { className: "size-3.5" }), b("newCycle")]
|
|
67
77
|
})]
|
|
68
78
|
}),
|
|
69
|
-
|
|
79
|
+
V.isError && /* @__PURE__ */ E(v, {
|
|
70
80
|
size: "md",
|
|
71
81
|
className: "mt-2",
|
|
72
|
-
children:
|
|
82
|
+
children: C(V.error)
|
|
73
83
|
}),
|
|
74
|
-
!
|
|
84
|
+
!I?.cyclesEnabled && P.length === 0 ? /* @__PURE__ */ E("div", {
|
|
75
85
|
className: "mt-8",
|
|
76
|
-
children: /* @__PURE__ */
|
|
77
|
-
icon: /* @__PURE__ */
|
|
78
|
-
title:
|
|
79
|
-
description:
|
|
80
|
-
action: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ E(_, {
|
|
87
|
+
icon: /* @__PURE__ */ E(o, {}),
|
|
88
|
+
title: b("cyclesOff"),
|
|
89
|
+
description: b("cyclesOffDescription"),
|
|
90
|
+
action: /* @__PURE__ */ E(f, {
|
|
81
91
|
to: "/$workspace/teams/$key/settings",
|
|
82
92
|
params: {
|
|
83
|
-
workspace:
|
|
84
|
-
key:
|
|
93
|
+
workspace: s,
|
|
94
|
+
key: c
|
|
85
95
|
},
|
|
86
96
|
className: "text-sm text-primary hover:underline",
|
|
87
|
-
children:
|
|
97
|
+
children: b("teamSettings")
|
|
88
98
|
})
|
|
89
99
|
})
|
|
90
|
-
}) : /* @__PURE__ */
|
|
100
|
+
}) : /* @__PURE__ */ D(T, { children: [U.length > j && /* @__PURE__ */ E("div", {
|
|
91
101
|
className: "mt-4 flex justify-center",
|
|
92
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ E(g, {
|
|
93
103
|
type: "button",
|
|
94
104
|
variant: "ghost",
|
|
95
105
|
size: "sm",
|
|
96
|
-
onClick: () =>
|
|
97
|
-
children:
|
|
106
|
+
onClick: () => B(!z),
|
|
107
|
+
children: z ? b("fewerCycles") : b("olderCycles", { count: U.length - j })
|
|
98
108
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
109
|
+
}), /* @__PURE__ */ E("ol", {
|
|
100
110
|
className: "relative mt-6",
|
|
101
|
-
children:
|
|
102
|
-
workspace:
|
|
103
|
-
teamKey:
|
|
111
|
+
children: G.map((e, t) => /* @__PURE__ */ E(F, {
|
|
112
|
+
workspace: s,
|
|
113
|
+
teamKey: c,
|
|
104
114
|
cycle: e,
|
|
105
|
-
capacity:
|
|
115
|
+
capacity: K,
|
|
106
116
|
first: t === 0,
|
|
107
|
-
last: t ===
|
|
117
|
+
last: t === G.length - 1
|
|
108
118
|
}, e.id))
|
|
109
119
|
})] })
|
|
110
120
|
]
|
|
@@ -112,11 +122,11 @@ function N() {
|
|
|
112
122
|
})]
|
|
113
123
|
});
|
|
114
124
|
}
|
|
115
|
-
function
|
|
116
|
-
let l =
|
|
125
|
+
function F({ workspace: e, teamKey: t, cycle: n, capacity: r, first: i, last: a }) {
|
|
126
|
+
let l = w("planning"), u = m(), d = C(), p = n.state === "current", h = (e) => d.number(e, {
|
|
117
127
|
style: "percent",
|
|
118
128
|
maximumFractionDigits: 0
|
|
119
|
-
}), g = n.state === "past" ?
|
|
129
|
+
}), g = n.state === "past" ? M(n) : n.progress.total, _ = r !== null && n.state !== "past" && g > r, v = n.state === "past" ? [
|
|
120
130
|
...g > 0 ? [l("success", { percent: h(n.progress.completed / g) })] : [],
|
|
121
131
|
l("completedCount", { count: n.progress.completed }),
|
|
122
132
|
l("scopeCount", { count: g }),
|
|
@@ -126,67 +136,67 @@ function P({ workspace: e, teamKey: t, cycle: n, capacity: r, first: i, last: c
|
|
|
126
136
|
l("scopeCount", { count: g }),
|
|
127
137
|
...n.carriedIn > 0 ? [l("carriedIn", { count: n.carriedIn })] : []
|
|
128
138
|
];
|
|
129
|
-
return /* @__PURE__ */
|
|
139
|
+
return /* @__PURE__ */ D("li", {
|
|
130
140
|
className: "grid grid-cols-[3.5rem_1fr] gap-x-3 md:grid-cols-[4.5rem_1fr] md:gap-x-4",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ D("div", {
|
|
132
142
|
className: "relative",
|
|
133
143
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ E("span", {
|
|
135
145
|
className: "absolute top-4 right-5 text-right text-xs leading-tight text-muted-foreground tabular-nums",
|
|
136
146
|
children: u.day(n.startsOn)
|
|
137
147
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ E("span", {
|
|
139
149
|
"aria-hidden": "true",
|
|
140
|
-
className: `absolute right-[7px] w-px ${i ? "top-6" : "top-0"} ${
|
|
150
|
+
className: `absolute right-[7px] w-px ${i ? "top-6" : "top-0"} ${a ? "h-6" : "bottom-0"} ${i && a ? "hidden" : ""} ${p ? "bg-primary" : "bg-border"}`
|
|
141
151
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ E("span", {
|
|
143
153
|
"aria-hidden": "true",
|
|
144
|
-
className: `absolute top-[18px] right-0.5 size-[11px] rounded-full border-2 ${
|
|
154
|
+
className: `absolute top-[18px] right-0.5 size-[11px] rounded-full border-2 ${p ? "border-primary bg-primary" : n.state === "past" ? "border-muted-foreground bg-muted-foreground" : "border-border bg-background"}`
|
|
145
155
|
})
|
|
146
156
|
]
|
|
147
|
-
}), /* @__PURE__ */
|
|
148
|
-
className: `min-w-0 border-b border-border ${
|
|
149
|
-
children: [/* @__PURE__ */
|
|
157
|
+
}), /* @__PURE__ */ D("div", {
|
|
158
|
+
className: `min-w-0 border-b border-border ${p ? "rounded-xl bg-muted/50" : ""}`,
|
|
159
|
+
children: [/* @__PURE__ */ D(f, {
|
|
150
160
|
to: "/$workspace/teams/$key/cycles/$number",
|
|
151
161
|
params: {
|
|
152
162
|
workspace: e,
|
|
153
163
|
key: t,
|
|
154
|
-
number:
|
|
164
|
+
number: c(n)
|
|
155
165
|
},
|
|
156
166
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1.5 rounded-xl px-3 py-3.5 hover:bg-muted/60",
|
|
157
167
|
children: [
|
|
158
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ D("span", {
|
|
159
169
|
className: "flex min-w-0 flex-1 basis-full items-center gap-2 md:basis-auto",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
170
|
+
children: [/* @__PURE__ */ E(o, { className: `size-4 shrink-0 ${p ? "text-primary" : "text-muted-foreground"}` }), /* @__PURE__ */ D("span", {
|
|
161
171
|
className: "min-w-0",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ E("span", {
|
|
163
173
|
className: "block truncate text-sm font-medium",
|
|
164
174
|
children: n.name ? l("cycleNamed", {
|
|
165
175
|
number: n.number,
|
|
166
176
|
name: n.name
|
|
167
177
|
}) : l("cycle", { number: n.number })
|
|
168
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ E("span", {
|
|
169
179
|
className: "block text-xs text-muted-foreground",
|
|
170
180
|
children: u.dayRange(n.startsOn, n.endsOn)
|
|
171
181
|
})]
|
|
172
182
|
})]
|
|
173
183
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
variant:
|
|
184
|
+
/* @__PURE__ */ E(b, {
|
|
185
|
+
variant: p ? "info" : "muted",
|
|
176
186
|
size: "sm",
|
|
177
187
|
children: l(`states.${n.state}`)
|
|
178
188
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ E("span", {
|
|
180
190
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums",
|
|
181
|
-
children: v.map((e, t) => /* @__PURE__ */
|
|
191
|
+
children: v.map((e, t) => /* @__PURE__ */ E("span", {
|
|
182
192
|
className: _ && t === 0 ? "font-medium text-warning" : void 0,
|
|
183
193
|
children: e
|
|
184
194
|
}, e))
|
|
185
195
|
})
|
|
186
196
|
]
|
|
187
|
-
}),
|
|
197
|
+
}), p && /* @__PURE__ */ E("div", {
|
|
188
198
|
className: "px-3 pb-4",
|
|
189
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ E(s, {
|
|
190
200
|
workspace: e,
|
|
191
201
|
teamKey: t,
|
|
192
202
|
cycle: n
|
|
@@ -195,4 +205,4 @@ function P({ workspace: e, teamKey: t, cycle: n, capacity: r, first: i, last: c
|
|
|
195
205
|
})]
|
|
196
206
|
});
|
|
197
207
|
}
|
|
198
|
-
export {
|
|
208
|
+
export { P as component };
|
package/routes/_workspace2.js
CHANGED
|
@@ -364,7 +364,7 @@ function at() {
|
|
|
364
364
|
icon: o(/* @__PURE__ */ A(le, { className: "size-4" }), Pt > 0),
|
|
365
365
|
href: `/${d}/notifications`,
|
|
366
366
|
selected: r(`/${d}/notifications`),
|
|
367
|
-
onContextMenu:
|
|
367
|
+
onContextMenu: i("notifications", `/${d}/notifications`),
|
|
368
368
|
badge: /* @__PURE__ */ A(Ue, {
|
|
369
369
|
count: Pt,
|
|
370
370
|
locale: G,
|
|
@@ -389,7 +389,8 @@ function at() {
|
|
|
389
389
|
label: U("dashboards"),
|
|
390
390
|
icon: /* @__PURE__ */ A(re, { className: "size-4" }),
|
|
391
391
|
href: `/${d}/dashboards`,
|
|
392
|
-
selected: r(`/${d}/dashboards`)
|
|
392
|
+
selected: r(`/${d}/dashboards`),
|
|
393
|
+
onContextMenu: i("dashboards", `/${d}/dashboards`)
|
|
393
394
|
}),
|
|
394
395
|
/* @__PURE__ */ A(F, {
|
|
395
396
|
label: U("knowledge"),
|