@parallelworks/tandem-web 0.171.2 → 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/ActivityTimeline.js +56 -56
- package/components/ActorLink.js +34 -0
- package/components/Attachments.js +67 -63
- package/components/CodeHostSettings.js +94 -60
- package/components/DashboardPanel.js +189 -152
- package/components/IssueEvent.js +91 -86
- package/components/IssueSentry.js +34 -32
- package/components/Widgets.js +96 -94
- package/lib/triageSeen.js +2 -2
- package/package.json +1 -1
- package/pages/triage.js +153 -163
- package/routes/_workspace/issues/_identifier2.js +273 -276
- package/routes/_workspace/knowledge/_term2.js +94 -92
- package/routes/_workspace/knowledge/index2.js +101 -99
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { panelQuery as e } from "../api/queries.js";
|
|
2
2
|
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { DownloadIcon as n, EditIcon as r, TrashIcon as i } from "./icons.js";
|
|
4
|
-
import { Card as a, ChartLegendList as o,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { Card as a, ChartLegendList as o, ChartTooltipBeside as s, ChartTooltipContent as c, IconButton as l, OTHER_SERIES_KEY as u, Tooltip as d, foldSeries as f, seriesColors as p } from "@parallelworks/ui";
|
|
5
|
+
import { useState as m } from "react";
|
|
6
|
+
import { useFormatter as h, useTranslations as g } from "use-intl";
|
|
7
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
8
|
+
import { useQuery as y } from "@tanstack/react-query";
|
|
8
9
|
// src/components/DashboardPanel.tsx
|
|
9
|
-
function
|
|
10
|
+
function b(e) {
|
|
10
11
|
let t = e.team || e.assignee || e.creator ? {} : { scope: "workspace" };
|
|
11
12
|
return Object.fromEntries(Object.entries({
|
|
12
13
|
...e,
|
|
13
14
|
...t
|
|
14
15
|
}).filter(([e, t]) => t && e !== "$schema"));
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
+
var x = /* @__PURE__ */ new Set([
|
|
17
18
|
"created_completed",
|
|
18
19
|
"open",
|
|
19
20
|
"throughput"
|
|
20
21
|
]);
|
|
21
|
-
function
|
|
22
|
+
function S(e) {
|
|
22
23
|
return [
|
|
23
24
|
{
|
|
24
25
|
title: e("starter.createdCompleted"),
|
|
@@ -58,7 +59,7 @@ function v(e) {
|
|
|
58
59
|
}
|
|
59
60
|
];
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function C(e, t) {
|
|
62
63
|
return [
|
|
63
64
|
{
|
|
64
65
|
value: "private",
|
|
@@ -74,7 +75,7 @@ function y(e, t) {
|
|
|
74
75
|
}))
|
|
75
76
|
];
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function w(e) {
|
|
78
79
|
return e === "private" ? {
|
|
79
80
|
shared: !1,
|
|
80
81
|
team: ""
|
|
@@ -86,53 +87,53 @@ function b(e) {
|
|
|
86
87
|
team: e.slice(5)
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
let u =
|
|
90
|
+
function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
|
|
91
|
+
let u = g("dashboards"), { data: d, isPending: f, isError: p } = y({
|
|
91
92
|
...e(t, o.chart, o.spec),
|
|
92
93
|
refetchInterval: 6e4
|
|
93
94
|
});
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ v(a, {
|
|
95
96
|
padding: "none",
|
|
96
97
|
interactive: !1,
|
|
97
98
|
className: "flex min-w-0 flex-col",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ v("div", {
|
|
99
100
|
className: "flex items-center gap-1 border-b border-border px-3 py-2",
|
|
100
101
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ _("h2", {
|
|
102
103
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
103
104
|
children: o.title || u(`measures.${o.spec.measure}`)
|
|
104
105
|
}),
|
|
105
|
-
d && /* @__PURE__ */
|
|
106
|
+
d && /* @__PURE__ */ _(l, {
|
|
106
107
|
variant: "ghost",
|
|
107
108
|
size: "sm",
|
|
108
|
-
icon: /* @__PURE__ */
|
|
109
|
+
icon: /* @__PURE__ */ _(n, {}),
|
|
109
110
|
label: u("csv"),
|
|
110
|
-
onClick: () =>
|
|
111
|
+
onClick: () => N(o.title || o.spec.measure, d, u)
|
|
111
112
|
}),
|
|
112
|
-
|
|
113
|
+
s && /* @__PURE__ */ _(l, {
|
|
113
114
|
variant: "ghost",
|
|
114
115
|
size: "sm",
|
|
115
|
-
icon: /* @__PURE__ */
|
|
116
|
+
icon: /* @__PURE__ */ _(r, {}),
|
|
116
117
|
label: u("edit"),
|
|
117
|
-
onClick:
|
|
118
|
+
onClick: s
|
|
118
119
|
}),
|
|
119
|
-
|
|
120
|
+
c && /* @__PURE__ */ _(l, {
|
|
120
121
|
variant: "ghost",
|
|
121
122
|
size: "sm",
|
|
122
|
-
icon: /* @__PURE__ */
|
|
123
|
+
icon: /* @__PURE__ */ _(i, {}),
|
|
123
124
|
label: u("remove"),
|
|
124
|
-
onClick:
|
|
125
|
+
onClick: c
|
|
125
126
|
})
|
|
126
127
|
]
|
|
127
|
-
}), /* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ _("div", {
|
|
128
129
|
className: "min-h-48 flex-1 p-3",
|
|
129
|
-
children:
|
|
130
|
+
children: f ? /* @__PURE__ */ _("p", {
|
|
130
131
|
className: "text-sm text-muted-foreground",
|
|
131
132
|
children: u("loading")
|
|
132
|
-
}) :
|
|
133
|
+
}) : p || !d ? /* @__PURE__ */ _("p", {
|
|
133
134
|
className: "text-sm text-danger",
|
|
134
135
|
children: u("failed")
|
|
135
|
-
}) : /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ _(D, {
|
|
136
137
|
workspace: t,
|
|
137
138
|
panel: o,
|
|
138
139
|
data: d
|
|
@@ -140,27 +141,27 @@ function x({ workspace: t, panel: o, onEdit: c, onDelete: l }) {
|
|
|
140
141
|
})]
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
-
let t =
|
|
144
|
+
function E(e) {
|
|
145
|
+
let t = h(), n = g("dashboards");
|
|
145
146
|
return (r) => e === "days" ? n("daysValue", { days: t.number(r, { maximumFractionDigits: 1 }) }) : t.number(r, { maximumFractionDigits: +(e === "points") });
|
|
146
147
|
}
|
|
147
|
-
function
|
|
148
|
-
let i =
|
|
149
|
-
return s === "number" ? /* @__PURE__ */
|
|
148
|
+
function D({ workspace: e, panel: n, data: r }) {
|
|
149
|
+
let i = g("dashboards"), a = E(r.unit), o = r.series.length > 0 && r.weeks.length > 0, s = n.chart;
|
|
150
|
+
return s === "number" ? /* @__PURE__ */ v(t, {
|
|
150
151
|
to: "/$workspace/issues",
|
|
151
152
|
params: { workspace: e },
|
|
152
|
-
search:
|
|
153
|
+
search: b(r.filter),
|
|
153
154
|
className: "flex h-full flex-col items-start justify-center gap-1 rounded-md hover:bg-muted",
|
|
154
|
-
children: [/* @__PURE__ */
|
|
155
|
+
children: [/* @__PURE__ */ _("span", {
|
|
155
156
|
className: "text-4xl font-semibold tabular-nums",
|
|
156
157
|
children: a(r.total)
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ _("span", {
|
|
158
159
|
className: "text-xs text-muted-foreground",
|
|
159
160
|
children: i(`units.${r.unit}`)
|
|
160
161
|
})]
|
|
161
|
-
}) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */
|
|
162
|
+
}) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ _("ul", {
|
|
162
163
|
className: "divide-y divide-border text-sm",
|
|
163
|
-
children: r.issues.map((n) => /* @__PURE__ */
|
|
164
|
+
children: r.issues.map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
|
|
164
165
|
to: "/$workspace/issues/$identifier",
|
|
165
166
|
params: {
|
|
166
167
|
workspace: e,
|
|
@@ -168,92 +169,92 @@ function C({ workspace: e, panel: n, data: r }) {
|
|
|
168
169
|
},
|
|
169
170
|
className: "flex min-w-0 gap-2 py-1.5 hover:bg-muted",
|
|
170
171
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ _("span", {
|
|
172
173
|
className: "shrink-0 text-muted-foreground tabular-nums",
|
|
173
174
|
children: n.identifier
|
|
174
175
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ _("span", {
|
|
176
177
|
className: "min-w-0 flex-1 truncate",
|
|
177
178
|
children: n.title
|
|
178
179
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ _("span", {
|
|
180
181
|
className: "shrink-0 text-xs text-muted-foreground",
|
|
181
182
|
children: n.status
|
|
182
183
|
})
|
|
183
184
|
]
|
|
184
185
|
}) }, n.identifier))
|
|
185
|
-
}) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */
|
|
186
|
+
}) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ v("table", {
|
|
186
187
|
className: "w-full text-sm",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
|
|
188
189
|
className: "text-left text-xs text-muted-foreground",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ _("th", {
|
|
190
191
|
className: "pb-1 font-medium",
|
|
191
192
|
children: i("group")
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ _("th", {
|
|
193
194
|
className: "pb-1 text-right font-medium",
|
|
194
195
|
children: i(`units.${r.unit}`)
|
|
195
196
|
})]
|
|
196
|
-
}) }), /* @__PURE__ */
|
|
197
|
+
}) }), /* @__PURE__ */ _("tbody", {
|
|
197
198
|
className: "divide-y divide-border",
|
|
198
|
-
children: r.rows.map((r) => /* @__PURE__ */
|
|
199
|
+
children: r.rows.map((r) => /* @__PURE__ */ v("tr", { children: [/* @__PURE__ */ _("td", {
|
|
199
200
|
className: "py-1.5",
|
|
200
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ _(t, {
|
|
201
202
|
to: "/$workspace/issues",
|
|
202
203
|
params: { workspace: e },
|
|
203
|
-
search:
|
|
204
|
+
search: b(r.filter),
|
|
204
205
|
className: "hover:underline",
|
|
205
|
-
children:
|
|
206
|
+
children: k(r.name, n.spec.groupBy, i)
|
|
206
207
|
})
|
|
207
|
-
}), /* @__PURE__ */
|
|
208
|
+
}), /* @__PURE__ */ _("td", {
|
|
208
209
|
className: "py-1.5 text-right tabular-nums",
|
|
209
210
|
children: a(r.value)
|
|
210
211
|
})] }, r.key || "-"))
|
|
211
212
|
})]
|
|
212
|
-
}) : o && (s === "line" || s === "stacked" ||
|
|
213
|
+
}) : o && (s === "line" || s === "stacked" || x.has(n.spec.measure)) ? /* @__PURE__ */ _(M, {
|
|
213
214
|
workspace: e,
|
|
214
215
|
data: r,
|
|
215
216
|
stacked: s !== "line",
|
|
216
|
-
names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) :
|
|
217
|
+
names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) : k(e.name, n.spec.groupBy, i),
|
|
217
218
|
value: a
|
|
218
|
-
}) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */
|
|
219
|
+
}) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ _(O, {}) : _(s === "pie" ? j : A, {
|
|
219
220
|
workspace: e,
|
|
220
221
|
data: r,
|
|
221
222
|
groupBy: n.spec.groupBy,
|
|
222
223
|
value: a
|
|
223
224
|
});
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
-
let e =
|
|
227
|
-
return /* @__PURE__ */
|
|
226
|
+
function O() {
|
|
227
|
+
let e = g("dashboards");
|
|
228
|
+
return /* @__PURE__ */ _("p", {
|
|
228
229
|
className: "text-sm text-muted-foreground",
|
|
229
230
|
children: e("empty")
|
|
230
231
|
});
|
|
231
232
|
}
|
|
232
|
-
function
|
|
233
|
+
function k(e, t, n) {
|
|
233
234
|
return t === "priority" ? n(`priorities.${e}`) : t === "status" && e ? n(`categories.${e}`) : t ? e || n("none") : n("all");
|
|
234
235
|
}
|
|
235
|
-
function
|
|
236
|
-
let a =
|
|
237
|
-
return /* @__PURE__ */
|
|
236
|
+
function A({ workspace: e, data: n, groupBy: r, value: i }) {
|
|
237
|
+
let a = g("dashboards"), o = Math.max(...n.rows.map((e) => e.value), 1);
|
|
238
|
+
return /* @__PURE__ */ _("ul", {
|
|
238
239
|
className: "space-y-1.5",
|
|
239
|
-
children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */
|
|
240
|
+
children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
|
|
240
241
|
to: "/$workspace/issues",
|
|
241
242
|
params: { workspace: e },
|
|
242
|
-
search:
|
|
243
|
+
search: b(n.filter),
|
|
243
244
|
className: "group grid grid-cols-[minmax(0,9rem)_1fr_auto] items-center gap-2 text-sm",
|
|
244
245
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ _("span", {
|
|
246
247
|
className: "truncate text-muted-foreground group-hover:text-foreground",
|
|
247
|
-
children:
|
|
248
|
+
children: k(n.name, r, a)
|
|
248
249
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ _("span", {
|
|
250
251
|
className: "h-4 rounded-sm bg-muted",
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
+
children: /* @__PURE__ */ _("span", {
|
|
252
253
|
className: "block h-full rounded-sm bg-primary group-hover:opacity-80",
|
|
253
254
|
style: { width: `${Math.max(2, n.value / o * 100)}%` }
|
|
254
255
|
})
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ _("span", {
|
|
257
258
|
className: "tabular-nums",
|
|
258
259
|
children: i(n.value)
|
|
259
260
|
})
|
|
@@ -261,59 +262,61 @@ function E({ workspace: e, data: n, groupBy: r, value: i }) {
|
|
|
261
262
|
}) }, n.key))
|
|
262
263
|
});
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
-
let a =
|
|
266
|
-
if (e ===
|
|
265
|
+
function j({ workspace: e, data: n, groupBy: r, value: i }) {
|
|
266
|
+
let a = g("dashboards"), o = n.rows.filter((e) => e.value > 0), { keys: s, folded: c } = f(o.map((e) => e.key)), l = p(s), m = s.map((e) => {
|
|
267
|
+
if (e === u) return {
|
|
267
268
|
key: e,
|
|
268
269
|
name: a("other"),
|
|
269
|
-
value: o.filter((e) =>
|
|
270
|
+
value: o.filter((e) => c.includes(e.key)).reduce((e, t) => e + t.value, 0),
|
|
270
271
|
filter: n.filter
|
|
271
272
|
};
|
|
272
273
|
let t = o.find((t) => t.key === e);
|
|
273
274
|
return {
|
|
274
275
|
key: e,
|
|
275
|
-
name:
|
|
276
|
+
name: k(t.name, r, a),
|
|
276
277
|
value: t.value,
|
|
277
278
|
filter: t.filter
|
|
278
279
|
};
|
|
279
|
-
}),
|
|
280
|
+
}), h = m.reduce((e, t) => e + t.value, 0) || 1, y = -Math.PI / 2, x = m.map((e) => {
|
|
280
281
|
let t = y;
|
|
281
|
-
y += e.value /
|
|
282
|
-
let n = +(y - t > Math.PI), r = (e, t) => `${50 + t * Math.cos(e)} ${50 + t * Math.sin(e)}`, i =
|
|
282
|
+
y += e.value / h * Math.PI * 2;
|
|
283
|
+
let n = +(y - t > Math.PI), r = (e, t) => `${50 + t * Math.cos(e)} ${50 + t * Math.sin(e)}`, i = m.length === 1 ? "M 50 8 A 42 42 0 1 1 49.99 8 L 49.99 26 A 24 24 0 1 0 50 26 Z" : `M ${r(t, 42)} A 42 42 0 ${n} 1 ${r(y, 42)} L ${r(y, 24)} A 24 24 0 ${n} 0 ${r(t, 24)} Z`;
|
|
283
284
|
return {
|
|
284
285
|
...e,
|
|
285
286
|
d: i
|
|
286
287
|
};
|
|
287
288
|
});
|
|
288
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ v("div", {
|
|
289
290
|
className: "flex flex-wrap items-center gap-4",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ _("svg", {
|
|
291
292
|
viewBox: "0 0 100 100",
|
|
292
293
|
className: "size-32 shrink-0",
|
|
293
294
|
role: "img",
|
|
294
295
|
"aria-label": a("pie"),
|
|
295
|
-
children:
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
children: x.map((e) => /* @__PURE__ */ _(d, {
|
|
297
|
+
content: `${e.name}: ${i(e.value)}`,
|
|
298
|
+
children: /* @__PURE__ */ _("path", {
|
|
299
|
+
d: e.d,
|
|
300
|
+
fill: l[e.key]
|
|
301
|
+
})
|
|
299
302
|
}, e.key))
|
|
300
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ _("ul", {
|
|
301
304
|
className: "min-w-0 flex-1 space-y-1 text-sm",
|
|
302
|
-
children:
|
|
305
|
+
children: x.map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
|
|
303
306
|
to: "/$workspace/issues",
|
|
304
307
|
params: { workspace: e },
|
|
305
|
-
search:
|
|
308
|
+
search: b(n.filter),
|
|
306
309
|
className: "flex items-center gap-2 hover:underline",
|
|
307
310
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ _("span", {
|
|
309
312
|
className: "size-2.5 shrink-0 rounded-sm",
|
|
310
|
-
style: { background:
|
|
313
|
+
style: { background: l[n.key] }
|
|
311
314
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ _("span", {
|
|
313
316
|
className: "min-w-0 flex-1 truncate",
|
|
314
317
|
children: n.name
|
|
315
318
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ _("span", {
|
|
317
320
|
className: "tabular-nums text-muted-foreground",
|
|
318
321
|
children: i(n.value)
|
|
319
322
|
})
|
|
@@ -322,13 +325,13 @@ function D({ workspace: e, data: n, groupBy: r, value: i }) {
|
|
|
322
325
|
})]
|
|
323
326
|
});
|
|
324
327
|
}
|
|
325
|
-
function
|
|
326
|
-
let
|
|
327
|
-
if (e ===
|
|
328
|
-
let t = n.series.filter((e) =>
|
|
328
|
+
function M({ workspace: e, data: n, stacked: r, names: i, value: a }) {
|
|
329
|
+
let l = g("dashboards"), d = h(), [y, x] = m(null), { keys: S, folded: C } = f(n.series.map((e) => e.key)), w = p(S), T = S.map((e) => {
|
|
330
|
+
if (e === u) {
|
|
331
|
+
let t = n.series.filter((e) => C.includes(e.key));
|
|
329
332
|
return {
|
|
330
333
|
key: e,
|
|
331
|
-
name:
|
|
334
|
+
name: l("other"),
|
|
332
335
|
values: n.weeks.map((e, n) => t.reduce((e, t) => e + (t.values[n] ?? 0), 0))
|
|
333
336
|
};
|
|
334
337
|
}
|
|
@@ -338,76 +341,110 @@ function O({ workspace: e, data: n, stacked: r, names: i, value: a }) {
|
|
|
338
341
|
name: i(t),
|
|
339
342
|
values: t.values
|
|
340
343
|
};
|
|
341
|
-
}),
|
|
344
|
+
}), E = n.weeks.length, D = n.weeks.map((e, t) => T.reduce((e, n) => e + (n.values[t] ?? 0), 0)), O = Math.max(1, ...r ? D : T.flatMap((e) => e.values)), k = 300 / E, A = (e) => 120 - e / O * 120, j = (e) => d.dateTime(/* @__PURE__ */ new Date(`${n.weeks[e]}T00:00:00Z`), {
|
|
342
345
|
month: "short",
|
|
343
346
|
day: "numeric",
|
|
344
347
|
timeZone: "UTC"
|
|
345
348
|
});
|
|
346
|
-
return /* @__PURE__ */
|
|
349
|
+
return /* @__PURE__ */ v(t, {
|
|
347
350
|
to: "/$workspace/issues",
|
|
348
351
|
params: { workspace: e },
|
|
349
|
-
search:
|
|
352
|
+
search: b(n.filter),
|
|
350
353
|
className: "block space-y-2",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
354
|
+
children: [/* @__PURE__ */ v("div", {
|
|
355
|
+
className: "relative",
|
|
356
|
+
children: [/* @__PURE__ */ v("svg", {
|
|
357
|
+
viewBox: "0 0 300 134",
|
|
358
|
+
className: "h-40 w-full overflow-visible",
|
|
359
|
+
role: "img",
|
|
360
|
+
"aria-label": l("overTime"),
|
|
361
|
+
onPointerMove: (e) => {
|
|
362
|
+
let t = e.currentTarget, n = t.getScreenCTM();
|
|
363
|
+
if (!n) return;
|
|
364
|
+
let r = Math.floor((e.clientX - n.e) / n.a / k);
|
|
365
|
+
if (r < 0 || r >= E) return x(null);
|
|
366
|
+
let i = t.getBoundingClientRect().left;
|
|
367
|
+
x({
|
|
368
|
+
i: r,
|
|
369
|
+
x: n.a * (r + .5) * k + n.e - i
|
|
370
|
+
});
|
|
371
|
+
},
|
|
372
|
+
onPointerLeave: () => x(null),
|
|
373
|
+
children: [
|
|
374
|
+
y && /* @__PURE__ */ _("rect", {
|
|
375
|
+
x: y.i * k,
|
|
376
|
+
width: k,
|
|
377
|
+
y: 0,
|
|
378
|
+
height: 120,
|
|
379
|
+
rx: 3,
|
|
380
|
+
className: "fill-muted"
|
|
381
|
+
}),
|
|
382
|
+
/* @__PURE__ */ _("line", {
|
|
383
|
+
x1: 0,
|
|
384
|
+
x2: 300,
|
|
385
|
+
y1: 120,
|
|
386
|
+
y2: 120,
|
|
387
|
+
className: "stroke-border"
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ _("text", {
|
|
390
|
+
x: 0,
|
|
391
|
+
y: 8,
|
|
392
|
+
className: "fill-muted-foreground text-[8px]",
|
|
393
|
+
children: a(O)
|
|
394
|
+
}),
|
|
395
|
+
r ? n.weeks.map((e, t) => {
|
|
396
|
+
let n = 120;
|
|
397
|
+
return /* @__PURE__ */ _("g", { children: T.map((e) => {
|
|
398
|
+
let r = (e.values[t] ?? 0) / O * 120;
|
|
399
|
+
return n -= r, /* @__PURE__ */ _("rect", {
|
|
400
|
+
x: t * k + k * .15,
|
|
401
|
+
width: k * .7,
|
|
402
|
+
y: n,
|
|
403
|
+
height: r,
|
|
404
|
+
fill: w[e.key]
|
|
405
|
+
}, e.key);
|
|
406
|
+
}) }, t);
|
|
407
|
+
}) : T.map((e) => /* @__PURE__ */ _("polyline", {
|
|
408
|
+
fill: "none",
|
|
409
|
+
stroke: w[e.key],
|
|
410
|
+
strokeWidth: 2,
|
|
411
|
+
vectorEffect: "non-scaling-stroke",
|
|
412
|
+
points: e.values.map((e, t) => `${t * k + k / 2},${A(e)}`).join(" ")
|
|
413
|
+
}, e.key)),
|
|
414
|
+
[
|
|
415
|
+
0,
|
|
416
|
+
Math.floor((E - 1) / 2),
|
|
417
|
+
E - 1
|
|
418
|
+
].filter((e, t, n) => n.indexOf(e) === t).map((e) => /* @__PURE__ */ _("text", {
|
|
419
|
+
x: e * k + k / 2,
|
|
420
|
+
y: 132,
|
|
421
|
+
textAnchor: "middle",
|
|
422
|
+
className: "fill-muted-foreground text-[8px]",
|
|
423
|
+
children: j(e)
|
|
424
|
+
}, e))
|
|
425
|
+
]
|
|
426
|
+
}), y && /* @__PURE__ */ _(s, {
|
|
427
|
+
x: y.x,
|
|
428
|
+
children: /* @__PURE__ */ _(c, { ...((e) => ({
|
|
429
|
+
label: j(e),
|
|
430
|
+
total: !1,
|
|
431
|
+
formatValue: a,
|
|
432
|
+
items: T.map((t) => ({
|
|
433
|
+
key: t.key,
|
|
434
|
+
name: t.name,
|
|
435
|
+
value: t.values[e] ?? 0,
|
|
436
|
+
color: w[t.key] ?? ""
|
|
437
|
+
}))
|
|
438
|
+
}))(y.i) })
|
|
439
|
+
})]
|
|
440
|
+
}), T.length > 1 && /* @__PURE__ */ _(o, { items: T.map((e) => ({
|
|
404
441
|
key: e.key,
|
|
405
442
|
label: e.name,
|
|
406
|
-
color:
|
|
443
|
+
color: w[e.key] ?? ""
|
|
407
444
|
})) })]
|
|
408
445
|
});
|
|
409
446
|
}
|
|
410
|
-
function
|
|
447
|
+
function N(e, t, n) {
|
|
411
448
|
let r = (e) => {
|
|
412
449
|
let t = String(e);
|
|
413
450
|
return /[",\n]/.test(t) ? `"${t.replaceAll("\"", "\"\"")}"` : t;
|
|
@@ -430,4 +467,4 @@ function k(e, t, n) {
|
|
|
430
467
|
])], a = new Blob([i.map((e) => e.map(r).join(",")).join("\n")], { type: "text/csv" }), o = document.createElement("a");
|
|
431
468
|
o.href = URL.createObjectURL(a), o.download = `${e.replace(/[^\w.-]+/g, "-")}.csv`, o.click(), URL.revokeObjectURL(o.href);
|
|
432
469
|
}
|
|
433
|
-
export {
|
|
470
|
+
export { T as DashboardPanel, D as PanelChart, b as issuesSearch, C as sharingItems, w as sharingOf, S as starterPanels };
|