@parallelworks/tandem-web 0.192.2 → 0.193.0
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 +15 -3
- package/_virtual/_virtual_i18n/es/common.js +15 -3
- package/_virtual/_virtual_i18n/ja/common.js +15 -3
- package/_virtual/_virtual_i18n/ko/common.js +15 -3
- package/_virtual/_virtual_i18n/zh/common.js +15 -3
- package/components/DocIconPicker.js +17 -8
- package/components/DocLook.js +93 -68
- package/components/DocTable.js +67 -66
- package/components/DocsTree.js +182 -182
- package/components/IssueImport.js +95 -46
- package/components/IssueView.js +397 -397
- package/components/SubPages.js +60 -57
- package/components/SubpageViews.js +379 -365
- package/lib/docs.js +203 -133
- package/lib/menus.js +15 -1
- package/package.json +1 -1
- package/pages/issues.js +421 -455
- package/routes/_workspace/docs/_doc2.js +227 -227
- package/routes/_workspace/teams/_key/settings2.js +202 -196
- package/routes/_workspace2.js +157 -155
package/routes/_workspace2.js
CHANGED
|
@@ -2,47 +2,48 @@ import { api as e } from "../api/client.js";
|
|
|
2
2
|
import { inboxQuery as t, issuesQuery as n, meQuery as r, myTeamsQuery as i, notificationsQuery as a, workspaceQuery as o } from "../api/queries.js";
|
|
3
3
|
import { AppLauncher as s } from "../components/AppLauncher.js";
|
|
4
4
|
import { CommandPalette as c } from "../components/CommandPalette.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { DocMenuHost as l } from "../components/DocLook.js";
|
|
6
|
+
import { EntityIcon as ee } from "../components/EntityIcon.js";
|
|
7
|
+
import { FavoritesNav as te } from "../components/FavoritesNav.js";
|
|
7
8
|
import { HostActions as u } from "../components/HostActions.js";
|
|
8
9
|
import { HostPanel as d } from "../components/HostPanel.js";
|
|
9
10
|
import { HoverCards as f } from "../components/HoverCards.js";
|
|
10
|
-
import { AddIcon as p, AgentIcon as
|
|
11
|
-
import { Logo as
|
|
12
|
-
import { NewIssueDialog as
|
|
13
|
-
import { SettingsNav as
|
|
14
|
-
import { ShareDialogHost as
|
|
15
|
-
import { ShortcutSheet as
|
|
16
|
-
import { CreateTeamDialog as
|
|
17
|
-
import { useFavorites as
|
|
18
|
-
import { useHost as
|
|
19
|
-
import { HostPanelProvider as
|
|
20
|
-
import { hostSignOut as
|
|
21
|
-
import { useInstall as
|
|
22
|
-
import { LiveProvider as
|
|
23
|
-
import { copyItem as
|
|
24
|
-
import { NewIssueContext as
|
|
25
|
-
import { usePushSync as
|
|
26
|
-
import { PaletteSelectionContext as
|
|
27
|
-
import { isBuiltIn as
|
|
28
|
-
import { useLocation as
|
|
29
|
-
import { useShortcuts as
|
|
30
|
-
import { teamPageOf as _, teamPath as
|
|
31
|
-
import { Route as
|
|
32
|
-
import { ActionMenu as
|
|
33
|
-
import { Outlet as
|
|
34
|
-
import { Suspense as
|
|
35
|
-
import { useLocale as
|
|
11
|
+
import { AddIcon as p, AgentIcon as ne, AreaIcon as re, ChartIcon as ie, ChevronDownIcon as m, CycleIcon as ae, FileTextIcon as oe, InboxIcon as se, LibraryIcon as ce, ListViewIcon as le, NotificationIcon as ue, ProjectIcon as de, SearchIcon as h, TriageIcon as fe, UserIcon as pe } from "../components/icons.js";
|
|
12
|
+
import { Logo as me } from "../components/Logo.js";
|
|
13
|
+
import { NewIssueDialog as he } from "../components/NewIssueDialog.js";
|
|
14
|
+
import { SettingsNav as ge } from "../components/SettingsNav.js";
|
|
15
|
+
import { ShareDialogHost as _e } from "../components/ShareDialog.js";
|
|
16
|
+
import { ShortcutSheet as ve } from "../components/ShortcutSheet.js";
|
|
17
|
+
import { CreateTeamDialog as ye } from "../components/TeamForm.js";
|
|
18
|
+
import { useFavorites as be } from "../lib/favorites.js";
|
|
19
|
+
import { useHost as xe } from "../lib/host.js";
|
|
20
|
+
import { HostPanelProvider as Se, useHostPanel as g } from "../lib/hostPanel.js";
|
|
21
|
+
import { hostSignOut as Ce } from "../lib/hostSignOut.js";
|
|
22
|
+
import { useInstall as we } from "../lib/install.js";
|
|
23
|
+
import { LiveProvider as Te } from "../lib/live.js";
|
|
24
|
+
import { copyItem as Ee, useLinkItems as De } from "../lib/menus.js";
|
|
25
|
+
import { NewIssueContext as Oe } from "../lib/newIssue.js";
|
|
26
|
+
import { usePushSync as ke } from "../lib/notifications.js";
|
|
27
|
+
import { PaletteSelectionContext as Ae } from "../lib/palette.js";
|
|
28
|
+
import { isBuiltIn as je, useCan as Me } from "../lib/roles.js";
|
|
29
|
+
import { useLocation as Ne, useNavigate as Pe } from "../lib/router.js";
|
|
30
|
+
import { useShortcuts as Fe } from "../lib/shortcuts.js";
|
|
31
|
+
import { teamPageOf as _, teamPath as Ie } from "../lib/teamPaths.js";
|
|
32
|
+
import { Route as Le } from "./_workspace.js";
|
|
33
|
+
import { ActionMenu as Re, Avatar as ze, Combobox as Be, CountBadge as v, IconButton as y, Kbd as Ve, PageHeaderBar as He, PageHeaderProvider as Ue, Tooltip as b, menuDivider as x, useOpenMenu as We } from "@parallelworks/ui";
|
|
34
|
+
import { Outlet as Ge, useParams as Ke } from "@tanstack/react-router";
|
|
35
|
+
import { Suspense as qe, useCallback as Je, useEffect as S, useMemo as Ye, useState as C } from "react";
|
|
36
|
+
import { useLocale as Xe, useTranslations as w } from "use-intl";
|
|
36
37
|
import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
37
|
-
import { useQuery as O, useQueryClient as
|
|
38
|
-
import { AppFrame as
|
|
38
|
+
import { useQuery as O, useQueryClient as Ze, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
39
|
+
import { AppFrame as Qe, AppFrameNavGroup as $e, AppFrameNavItem as A, AppFrameToggle as j, useAppFrame as M } from "@parallelworks/ui/app-frame";
|
|
39
40
|
import { createPortal as N } from "react-dom";
|
|
40
41
|
// src/routes/$workspace.tsx?tsr-split=component
|
|
41
|
-
var P = "inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-[color-mix(in_oklab,currentColor_20%,transparent)] bg-[color-mix(in_oklab,currentColor_6%,transparent)] text-sm font-medium hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)]",
|
|
42
|
+
var P = "inline-flex h-8 min-w-8 items-center justify-center rounded-md border border-[color-mix(in_oklab,currentColor_20%,transparent)] bg-[color-mix(in_oklab,currentColor_6%,transparent)] text-sm font-medium hover:bg-[color-mix(in_oklab,currentColor_12%,transparent)]", et = "absolute top-1.5 right-3 size-2 rounded-full bg-primary", F = (...e) => e.filter(Boolean).join(" ");
|
|
42
43
|
function I() {
|
|
43
|
-
let { workspace: d } =
|
|
44
|
+
let { workspace: d } = Le.useParams(), { data: g } = k(r), { data: M } = k(o(d)), { data: N } = k(i(d)), I = xe(), [L, R] = C(null), [dt, z] = C(!1), ft = Me(d, "manage_teams"), { canInstall: pt, install: mt } = we(), B = Pe(), ht = Ze(), V = We(), H = be(d), U = w("workspace"), gt = w("common"), W = Xe(), G = w("favorites"), _t = w("roles"), K = De(), vt = (e) => [
|
|
44
45
|
{
|
|
45
|
-
label:
|
|
46
|
+
label: gt("open"),
|
|
46
47
|
onClick: () => B({
|
|
47
48
|
to: "/$workspace/teams/$key/issues",
|
|
48
49
|
params: {
|
|
@@ -81,12 +82,12 @@ function I() {
|
|
|
81
82
|
onClick: () => H.toggle("team", e.id)
|
|
82
83
|
},
|
|
83
84
|
x,
|
|
84
|
-
...K(
|
|
85
|
-
|
|
86
|
-
],
|
|
85
|
+
...K(Ie(d, e.key, "issues")),
|
|
86
|
+
Ee(gt("copyKey"), e.key)
|
|
87
|
+
], yt = (e) => ({
|
|
87
88
|
label: H.find("page", e) ? G("remove") : G("add"),
|
|
88
89
|
onClick: () => H.toggle("page", e)
|
|
89
|
-
}), q =
|
|
90
|
+
}), q = Ne(), [bt, xt] = C(() => ot().expanded), [St, Ct] = C(() => ot().width), wt = Ye(() => {
|
|
90
91
|
let e = _(q.pathname, d), t = e?.page === "issues" ? e.team : void 0, n = q.pathname === `/${d}/issues` || t !== void 0, r = q.search;
|
|
91
92
|
return {
|
|
92
93
|
mine: n && !r.saved && !t && (r.assignee === g?.user.username || r.creator === g?.user.username),
|
|
@@ -100,36 +101,36 @@ function I() {
|
|
|
100
101
|
]), J = (e, t) => {
|
|
101
102
|
let n = _(q.pathname, d);
|
|
102
103
|
return n?.page === e && n.team === t;
|
|
103
|
-
}, [
|
|
104
|
+
}, [Tt, Et] = C(() => at(d)), Dt = (e, t) => Et((n) => {
|
|
104
105
|
let r = new Set(n);
|
|
105
|
-
return t ? r.delete(e) : r.add(e),
|
|
106
|
-
}), Y = q.pathname.startsWith(`/${d}/settings`), { data:
|
|
106
|
+
return t ? r.delete(e) : r.add(e), ct(d, r), r;
|
|
107
|
+
}), Y = q.pathname.startsWith(`/${d}/settings`), { data: Ot = [] } = O(t(d)), kt = N.some((e) => e.triageEnabled && !e.archivedAt), { data: At } = O({
|
|
107
108
|
...n(d, { triage: "only" }),
|
|
108
|
-
enabled:
|
|
109
|
-
}),
|
|
110
|
-
|
|
111
|
-
let { key:
|
|
112
|
-
...
|
|
109
|
+
enabled: kt
|
|
110
|
+
}), jt = (e) => At?.issues.filter((t) => t.teamId === e).length ?? 0, { data: Mt } = O(a(d)), X = Mt?.unread ?? 0;
|
|
111
|
+
ke();
|
|
112
|
+
let { key: Nt } = Ke({ strict: !1 }), Z = Je((e) => R({
|
|
113
|
+
...Nt && { team: Nt },
|
|
113
114
|
...e
|
|
114
|
-
}), [
|
|
115
|
-
|
|
116
|
-
let [
|
|
117
|
-
|
|
118
|
-
let [
|
|
115
|
+
}), [Nt]);
|
|
116
|
+
Fe({ c: () => Z() }, L === null);
|
|
117
|
+
let [Pt, Ft] = C(!1);
|
|
118
|
+
Fe({ "?": () => Ft(!0) });
|
|
119
|
+
let [It, Q] = C(!1), [Lt, Rt] = C([]);
|
|
119
120
|
if (S(() => {
|
|
120
121
|
let e = (e) => {
|
|
121
|
-
!e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented ||
|
|
122
|
+
!e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "k" || e.defaultPrevented || (e.preventDefault(), Q((e) => !e)), !e.metaKey && !e.ctrlKey || e.altKey || e.shiftKey || e.key.toLowerCase() !== "f" || e.defaultPrevented || lt() || (e.preventDefault(), Q(!0));
|
|
122
123
|
};
|
|
123
124
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
124
125
|
}, []), !g) return null;
|
|
125
|
-
let
|
|
126
|
-
$ === void 0 ? (await e.POST("/api/v1/auth/logout"),
|
|
127
|
-
},
|
|
128
|
-
let t = /* @__PURE__ */ E(
|
|
126
|
+
let zt = g.mode === "platform", Bt = pt && !zt, $ = g.signOutUrl, Vt = !I && (!zt || $ !== void 0), Ht = async () => {
|
|
127
|
+
$ === void 0 ? (await e.POST("/api/v1/auth/logout"), ht.clear(), B({ to: "/login" })) : await Ce($);
|
|
128
|
+
}, Ut = Y ? void 0 : ({ expanded: e }) => {
|
|
129
|
+
let t = /* @__PURE__ */ E(Be, {
|
|
129
130
|
items: [...g.workspaces.map((e) => ({
|
|
130
131
|
value: e.slug,
|
|
131
132
|
label: e.name,
|
|
132
|
-
hint:
|
|
133
|
+
hint: je(e.role) ? _t(`${e.role}.name`) : _t("custom")
|
|
133
134
|
})), ...g.canCreateWorkspace ? [{
|
|
134
135
|
value: "__new",
|
|
135
136
|
label: U("createWorkspace")
|
|
@@ -167,19 +168,19 @@ function I() {
|
|
|
167
168
|
}] : []]
|
|
168
169
|
},
|
|
169
170
|
x,
|
|
170
|
-
|
|
171
|
-
...
|
|
171
|
+
Ee(U("copyWorkspaceSlug"), d),
|
|
172
|
+
...Vt ? [x, {
|
|
172
173
|
label: U("signOut"),
|
|
173
|
-
onClick:
|
|
174
|
+
onClick: Ht
|
|
174
175
|
}] : []
|
|
175
176
|
]),
|
|
176
177
|
className: F("flex h-9 items-center gap-2 rounded-md text-left hover:bg-muted", e ? "w-full px-2" : "w-9 justify-center"),
|
|
177
|
-
children: [M.icon ? /* @__PURE__ */ E(
|
|
178
|
+
children: [M.icon ? /* @__PURE__ */ E(ee, {
|
|
178
179
|
icon: M.icon,
|
|
179
180
|
color: M.color,
|
|
180
181
|
name: M.name,
|
|
181
182
|
className: "size-6 text-base"
|
|
182
|
-
}) : /* @__PURE__ */ E(
|
|
183
|
+
}) : /* @__PURE__ */ E(me, { withName: !1 }), e && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("span", {
|
|
183
184
|
className: "min-w-0 flex-1 truncate text-sm font-semibold",
|
|
184
185
|
children: M.name
|
|
185
186
|
}), /* @__PURE__ */ E(m, { className: "size-3.5 text-muted-foreground" })] })]
|
|
@@ -210,7 +211,7 @@ function I() {
|
|
|
210
211
|
className: "flex-1 text-left",
|
|
211
212
|
children: U("newIssue")
|
|
212
213
|
}),
|
|
213
|
-
/* @__PURE__ */ E(
|
|
214
|
+
/* @__PURE__ */ E(Ve, {
|
|
214
215
|
keys: "C",
|
|
215
216
|
size: "xs",
|
|
216
217
|
variant: "plain"
|
|
@@ -261,66 +262,66 @@ function I() {
|
|
|
261
262
|
})
|
|
262
263
|
]
|
|
263
264
|
});
|
|
264
|
-
},
|
|
265
|
-
if (Y) return /* @__PURE__ */ E(
|
|
265
|
+
}, Wt = ({ expanded: e, mobileOpen: t }) => {
|
|
266
|
+
if (Y) return /* @__PURE__ */ E(ge, { workspace: d });
|
|
266
267
|
let n = !e, r = (e) => q.pathname === e || q.pathname.startsWith(`${e}/`), i = (e, t) => (n) => V(n, [
|
|
267
|
-
|
|
268
|
+
yt(e),
|
|
268
269
|
x,
|
|
269
270
|
...K(t)
|
|
270
271
|
]), a = (e) => (t) => V(t, K(e)), o = (e, t) => /* @__PURE__ */ D("span", {
|
|
271
272
|
className: "relative flex",
|
|
272
|
-
children: [e, n && t && /* @__PURE__ */ E("span", { className:
|
|
273
|
-
}), s = /* @__PURE__ */ E("hr", { className: "tandem-nav-divider mx-2 my-2 border-border" }), c = N.filter((e) => !e.archivedAt),
|
|
274
|
-
let t = (t) =>
|
|
275
|
-
return /* @__PURE__ */ D(
|
|
273
|
+
children: [e, n && t && /* @__PURE__ */ E("span", { className: et })]
|
|
274
|
+
}), s = /* @__PURE__ */ E("hr", { className: "tandem-nav-divider mx-2 my-2 border-border" }), c = N.filter((e) => !e.archivedAt), l = new Set(c.map((e) => e.id)), u = (e) => c.filter((t) => (t.parentId && l.has(t.parentId) ? t.parentId : "") === e), f = (e) => {
|
|
275
|
+
let t = (t) => Ie(d, e.key, t), n = Ot.filter((t) => t.identifier.startsWith(`${e.key}-`)).length, i = (t) => !(e.sidebarHidden ?? []).includes(t);
|
|
276
|
+
return /* @__PURE__ */ D($e, {
|
|
276
277
|
label: e.name,
|
|
277
278
|
className: "tandem-team",
|
|
278
|
-
icon: o(/* @__PURE__ */ E(
|
|
279
|
+
icon: o(/* @__PURE__ */ E(ee, {
|
|
279
280
|
icon: e.icon,
|
|
280
281
|
color: e.color,
|
|
281
282
|
name: e.name
|
|
282
|
-
}), i("triage") &&
|
|
283
|
+
}), i("triage") && jt(e.id) > 0),
|
|
283
284
|
selected: _(q.pathname, d)?.team === e.key,
|
|
284
|
-
open: !
|
|
285
|
-
onOpenChange: (t) =>
|
|
286
|
-
onContextMenu: (t) => V(t,
|
|
285
|
+
open: !Tt.has(e.key),
|
|
286
|
+
onOpenChange: (t) => Dt(e.key, t),
|
|
287
|
+
onContextMenu: (t) => V(t, vt(e)),
|
|
287
288
|
children: [
|
|
288
289
|
e.triageEnabled && i("triage") && /* @__PURE__ */ E(A, {
|
|
289
290
|
label: U("triage"),
|
|
290
|
-
icon: /* @__PURE__ */ E(
|
|
291
|
+
icon: /* @__PURE__ */ E(fe, { className: "size-4" }),
|
|
291
292
|
href: t("triage"),
|
|
292
293
|
selected: J("triage", e.key),
|
|
293
294
|
onContextMenu: a(t("triage")),
|
|
294
295
|
badge: /* @__PURE__ */ E(v, {
|
|
295
|
-
count:
|
|
296
|
+
count: jt(e.id),
|
|
296
297
|
locale: W,
|
|
297
298
|
label: U("triageCount")
|
|
298
299
|
})
|
|
299
300
|
}),
|
|
300
301
|
i("issues") && /* @__PURE__ */ E(A, {
|
|
301
302
|
label: U("issues"),
|
|
302
|
-
icon: /* @__PURE__ */ E(
|
|
303
|
+
icon: /* @__PURE__ */ E(le, { className: "size-4" }),
|
|
303
304
|
href: t("issues"),
|
|
304
|
-
selected:
|
|
305
|
+
selected: wt.team === e.key,
|
|
305
306
|
onContextMenu: a(t("issues"))
|
|
306
307
|
}),
|
|
307
308
|
i("projects") && /* @__PURE__ */ E(A, {
|
|
308
309
|
label: U("projects"),
|
|
309
|
-
icon: /* @__PURE__ */ E(
|
|
310
|
+
icon: /* @__PURE__ */ E(de, { className: "size-4" }),
|
|
310
311
|
href: t("projects"),
|
|
311
312
|
selected: J("projects", e.key),
|
|
312
313
|
onContextMenu: a(t("projects"))
|
|
313
314
|
}),
|
|
314
315
|
i("areas") && /* @__PURE__ */ E(A, {
|
|
315
316
|
label: U("areas"),
|
|
316
|
-
icon: /* @__PURE__ */ E(
|
|
317
|
+
icon: /* @__PURE__ */ E(re, { className: "size-4" }),
|
|
317
318
|
href: t("areas"),
|
|
318
319
|
selected: J("areas", e.key),
|
|
319
320
|
onContextMenu: a(t("areas"))
|
|
320
321
|
}),
|
|
321
322
|
i("decisions") && /* @__PURE__ */ E(A, {
|
|
322
323
|
label: U("decisions"),
|
|
323
|
-
icon: /* @__PURE__ */ E(
|
|
324
|
+
icon: /* @__PURE__ */ E(se, { className: "size-4" }),
|
|
324
325
|
href: t("decisions"),
|
|
325
326
|
selected: J("decisions", e.key),
|
|
326
327
|
onContextMenu: a(t("decisions")),
|
|
@@ -333,26 +334,26 @@ function I() {
|
|
|
333
334
|
}),
|
|
334
335
|
i("docs") && /* @__PURE__ */ E(A, {
|
|
335
336
|
label: U("docs"),
|
|
336
|
-
icon: /* @__PURE__ */ E(
|
|
337
|
+
icon: /* @__PURE__ */ E(oe, { className: "size-4" }),
|
|
337
338
|
href: `/${d}/docs/space/${e.key}`,
|
|
338
339
|
selected: r(`/${d}/docs/space/${e.key}`),
|
|
339
340
|
onContextMenu: a(`/${d}/docs/space/${e.key}`)
|
|
340
341
|
}),
|
|
341
342
|
e.cyclesEnabled && i("cycles") && /* @__PURE__ */ E(A, {
|
|
342
343
|
label: U("cycles"),
|
|
343
|
-
icon: /* @__PURE__ */ E(
|
|
344
|
+
icon: /* @__PURE__ */ E(ae, { className: "size-4" }),
|
|
344
345
|
href: t("cycles"),
|
|
345
346
|
selected: J("cycles", e.key)
|
|
346
347
|
}),
|
|
347
|
-
|
|
348
|
+
u(e.id).map(f)
|
|
348
349
|
]
|
|
349
350
|
}, e.id);
|
|
350
|
-
},
|
|
351
|
+
}, m = u("").map(f), h = `/${d}/issues?assignee=${encodeURIComponent(g.user.username)}`;
|
|
351
352
|
return /* @__PURE__ */ D(T, { children: [
|
|
352
|
-
t && /* @__PURE__ */ E(
|
|
353
|
+
t && /* @__PURE__ */ E(tt, {}),
|
|
353
354
|
/* @__PURE__ */ E(A, {
|
|
354
355
|
label: U("notifications"),
|
|
355
|
-
icon: o(/* @__PURE__ */ E(
|
|
356
|
+
icon: o(/* @__PURE__ */ E(ue, { className: "size-4" }), X > 0),
|
|
356
357
|
href: `/${d}/notifications`,
|
|
357
358
|
selected: r(`/${d}/notifications`),
|
|
358
359
|
onContextMenu: i("notifications", `/${d}/notifications`),
|
|
@@ -364,61 +365,61 @@ function I() {
|
|
|
364
365
|
}),
|
|
365
366
|
/* @__PURE__ */ E(A, {
|
|
366
367
|
label: U("myIssues"),
|
|
367
|
-
icon: /* @__PURE__ */ E(
|
|
368
|
-
href:
|
|
369
|
-
selected:
|
|
370
|
-
onContextMenu: i("my-issues",
|
|
368
|
+
icon: /* @__PURE__ */ E(pe, { className: "size-4" }),
|
|
369
|
+
href: h,
|
|
370
|
+
selected: wt.mine,
|
|
371
|
+
onContextMenu: i("my-issues", h)
|
|
371
372
|
}),
|
|
372
373
|
/* @__PURE__ */ E(A, {
|
|
373
374
|
label: U("projects"),
|
|
374
|
-
icon: /* @__PURE__ */ E(
|
|
375
|
+
icon: /* @__PURE__ */ E(de, { className: "size-4" }),
|
|
375
376
|
href: `/${d}/projects`,
|
|
376
377
|
selected: r(`/${d}/projects`),
|
|
377
378
|
onContextMenu: i("projects", `/${d}/projects`)
|
|
378
379
|
}),
|
|
379
380
|
/* @__PURE__ */ E(A, {
|
|
380
381
|
label: U("dashboards"),
|
|
381
|
-
icon: /* @__PURE__ */ E(
|
|
382
|
+
icon: /* @__PURE__ */ E(ie, { className: "size-4" }),
|
|
382
383
|
href: `/${d}/dashboards`,
|
|
383
384
|
selected: r(`/${d}/dashboards`),
|
|
384
385
|
onContextMenu: i("dashboards", `/${d}/dashboards`)
|
|
385
386
|
}),
|
|
386
387
|
/* @__PURE__ */ E(A, {
|
|
387
388
|
label: U("knowledge"),
|
|
388
|
-
icon: /* @__PURE__ */ E(
|
|
389
|
+
icon: /* @__PURE__ */ E(ce, { className: "size-4" }),
|
|
389
390
|
href: `/${d}/knowledge`,
|
|
390
391
|
selected: r(`/${d}/knowledge`),
|
|
391
392
|
onContextMenu: i("knowledge", `/${d}/knowledge`)
|
|
392
393
|
}),
|
|
393
394
|
/* @__PURE__ */ E(A, {
|
|
394
395
|
label: U("agents"),
|
|
395
|
-
icon: /* @__PURE__ */ E(
|
|
396
|
+
icon: /* @__PURE__ */ E(ne, { className: "size-4" }),
|
|
396
397
|
href: `/${d}/agents`,
|
|
397
398
|
selected: r(`/${d}/agents`),
|
|
398
399
|
onContextMenu: i("agents", `/${d}/agents`)
|
|
399
400
|
}),
|
|
400
401
|
n ? /* @__PURE__ */ E("div", {
|
|
401
402
|
className: "mt-4 border-t border-border pt-4",
|
|
402
|
-
children:
|
|
403
|
+
children: m
|
|
403
404
|
}) : /* @__PURE__ */ D(T, { children: [
|
|
404
405
|
s,
|
|
405
|
-
/* @__PURE__ */ E(
|
|
406
|
+
/* @__PURE__ */ E(te, {
|
|
406
407
|
workspace: d,
|
|
407
408
|
myUsername: g.user.username,
|
|
408
409
|
currentHref: q.pathname + q.searchStr
|
|
409
410
|
}),
|
|
410
411
|
s,
|
|
411
|
-
/* @__PURE__ */ E(
|
|
412
|
+
/* @__PURE__ */ E($e, {
|
|
412
413
|
label: U("teams"),
|
|
413
414
|
collapsible: !1,
|
|
414
|
-
action:
|
|
415
|
+
action: ft && /* @__PURE__ */ E(y, {
|
|
415
416
|
variant: "ghost",
|
|
416
417
|
size: "xs",
|
|
417
418
|
icon: /* @__PURE__ */ E(p, {}),
|
|
418
419
|
label: U("createTeam"),
|
|
419
420
|
onClick: () => z(!0)
|
|
420
421
|
}),
|
|
421
|
-
children: N.length === 0 && (
|
|
422
|
+
children: N.length === 0 && (ft ? /* @__PURE__ */ E(A, {
|
|
422
423
|
label: U("createFirstTeam"),
|
|
423
424
|
icon: /* @__PURE__ */ E(p, { className: "size-4" }),
|
|
424
425
|
onClick: () => z(!0)
|
|
@@ -427,10 +428,10 @@ function I() {
|
|
|
427
428
|
children: U("noTeams")
|
|
428
429
|
}))
|
|
429
430
|
}),
|
|
430
|
-
|
|
431
|
+
m
|
|
431
432
|
] })
|
|
432
433
|
] });
|
|
433
|
-
},
|
|
434
|
+
}, Gt = Y ? void 0 : ({ expanded: e, isMobile: t }) => {
|
|
434
435
|
let n = [
|
|
435
436
|
{
|
|
436
437
|
label: U("myAccount"),
|
|
@@ -446,15 +447,15 @@ function I() {
|
|
|
446
447
|
params: { workspace: d }
|
|
447
448
|
})
|
|
448
449
|
},
|
|
449
|
-
...
|
|
450
|
+
...Bt ? [{
|
|
450
451
|
label: U("installApp"),
|
|
451
|
-
onClick:
|
|
452
|
+
onClick: mt
|
|
452
453
|
}] : [],
|
|
453
|
-
...
|
|
454
|
+
...Vt ? [x, {
|
|
454
455
|
label: U("signOut"),
|
|
455
|
-
onClick:
|
|
456
|
+
onClick: Ht
|
|
456
457
|
}] : []
|
|
457
|
-
], r = /* @__PURE__ */ E(
|
|
458
|
+
], r = /* @__PURE__ */ E(ze, {
|
|
458
459
|
name: g.user.name,
|
|
459
460
|
src: g.user.avatarUrl,
|
|
460
461
|
size: "sm",
|
|
@@ -462,7 +463,7 @@ function I() {
|
|
|
462
463
|
});
|
|
463
464
|
return e ? /* @__PURE__ */ D("div", {
|
|
464
465
|
className: "flex items-center gap-1",
|
|
465
|
-
children: [/* @__PURE__ */ E(
|
|
466
|
+
children: [/* @__PURE__ */ E(Re, {
|
|
466
467
|
label: U("accountMenu", { name: g.user.name }),
|
|
467
468
|
side: "top",
|
|
468
469
|
align: "start",
|
|
@@ -479,7 +480,7 @@ function I() {
|
|
|
479
480
|
}), !t && /* @__PURE__ */ E(j, {})]
|
|
480
481
|
}) : /* @__PURE__ */ D("div", {
|
|
481
482
|
className: "flex flex-col items-center gap-2",
|
|
482
|
-
children: [/* @__PURE__ */ E(j, {}), /* @__PURE__ */ E(
|
|
483
|
+
children: [/* @__PURE__ */ E(j, {}), /* @__PURE__ */ E(Re, {
|
|
483
484
|
label: U("accountMenu", { name: g.user.name }),
|
|
484
485
|
side: "right",
|
|
485
486
|
align: "end",
|
|
@@ -489,7 +490,7 @@ function I() {
|
|
|
489
490
|
children: r
|
|
490
491
|
})]
|
|
491
492
|
});
|
|
492
|
-
},
|
|
493
|
+
}, Kt = /* @__PURE__ */ E(nt, {
|
|
493
494
|
workspace: d,
|
|
494
495
|
name: M.name,
|
|
495
496
|
apps: g.apps ?? [],
|
|
@@ -497,39 +498,39 @@ function I() {
|
|
|
497
498
|
onSearch: () => Q(!0),
|
|
498
499
|
onNewIssue: () => Z()
|
|
499
500
|
});
|
|
500
|
-
return /* @__PURE__ */ E(
|
|
501
|
+
return /* @__PURE__ */ E(Te, {
|
|
501
502
|
workspace: d,
|
|
502
|
-
children: /* @__PURE__ */ E(
|
|
503
|
+
children: /* @__PURE__ */ E(Se, {
|
|
503
504
|
actions: g.actions ?? [],
|
|
504
|
-
children: /* @__PURE__ */ E(
|
|
505
|
+
children: /* @__PURE__ */ E(Oe.Provider, {
|
|
505
506
|
value: Z,
|
|
506
|
-
children: /* @__PURE__ */ D(
|
|
507
|
-
value:
|
|
507
|
+
children: /* @__PURE__ */ D(Ae.Provider, {
|
|
508
|
+
value: Rt,
|
|
508
509
|
children: [
|
|
509
|
-
I ? /* @__PURE__ */ E(
|
|
510
|
+
I ? /* @__PURE__ */ E(Ue, { children: /* @__PURE__ */ E(rt, {
|
|
510
511
|
sidebar: I.sidebar,
|
|
511
|
-
brand:
|
|
512
|
-
navigation:
|
|
513
|
-
header:
|
|
514
|
-
children: /* @__PURE__ */ E(
|
|
512
|
+
brand: Ut,
|
|
513
|
+
navigation: Wt,
|
|
514
|
+
header: Kt,
|
|
515
|
+
children: /* @__PURE__ */ E(it, { children: /* @__PURE__ */ D("div", {
|
|
515
516
|
className: "flex h-full min-h-0 flex-col",
|
|
516
|
-
children: [/* @__PURE__ */ E(
|
|
517
|
+
children: [/* @__PURE__ */ E(He, {}), /* @__PURE__ */ E("div", {
|
|
517
518
|
className: "min-h-0 flex-1",
|
|
518
|
-
children: /* @__PURE__ */ E(
|
|
519
|
+
children: /* @__PURE__ */ E(Ge, {})
|
|
519
520
|
})]
|
|
520
521
|
}) })
|
|
521
|
-
}) }) : /* @__PURE__ */ E(
|
|
522
|
-
expanded:
|
|
522
|
+
}) }) : /* @__PURE__ */ E(Qe, {
|
|
523
|
+
expanded: bt || Y,
|
|
523
524
|
onExpandedChange: (e) => {
|
|
524
|
-
|
|
525
|
+
xt(e), st({
|
|
525
526
|
expanded: e,
|
|
526
|
-
width:
|
|
527
|
+
width: St
|
|
527
528
|
});
|
|
528
529
|
},
|
|
529
|
-
width:
|
|
530
|
+
width: St,
|
|
530
531
|
onWidthChange: (e) => {
|
|
531
|
-
|
|
532
|
-
expanded:
|
|
532
|
+
Ct(e), st({
|
|
533
|
+
expanded: bt,
|
|
533
534
|
width: e
|
|
534
535
|
});
|
|
535
536
|
},
|
|
@@ -545,30 +546,31 @@ function I() {
|
|
|
545
546
|
collapseSidebar: U("collapseSidebar"),
|
|
546
547
|
resizeSidebar: U("resizeSidebar")
|
|
547
548
|
},
|
|
548
|
-
header:
|
|
549
|
-
brand:
|
|
550
|
-
navigation:
|
|
551
|
-
footer:
|
|
552
|
-
children: /* @__PURE__ */ E(
|
|
549
|
+
header: Kt,
|
|
550
|
+
brand: Ut,
|
|
551
|
+
navigation: Wt,
|
|
552
|
+
footer: Gt,
|
|
553
|
+
children: /* @__PURE__ */ E(it, { children: /* @__PURE__ */ E(Ge, {}) })
|
|
553
554
|
}),
|
|
554
555
|
/* @__PURE__ */ E(f, { workspace: d }),
|
|
555
|
-
!
|
|
556
|
+
!zt && /* @__PURE__ */ E(ut, {}),
|
|
556
557
|
/* @__PURE__ */ E(c, {
|
|
557
558
|
workspace: d,
|
|
558
|
-
open:
|
|
559
|
+
open: It,
|
|
559
560
|
onClose: () => Q(!1),
|
|
560
|
-
selection:
|
|
561
|
+
selection: Lt
|
|
561
562
|
}),
|
|
562
|
-
/* @__PURE__ */ E(
|
|
563
|
-
/* @__PURE__ */ E(
|
|
564
|
-
|
|
565
|
-
|
|
563
|
+
/* @__PURE__ */ E(_e, { workspace: d }),
|
|
564
|
+
/* @__PURE__ */ E(l, { workspace: d }),
|
|
565
|
+
/* @__PURE__ */ E(ve, {
|
|
566
|
+
open: Pt,
|
|
567
|
+
onClose: () => Ft(!1)
|
|
566
568
|
}),
|
|
567
|
-
|
|
569
|
+
dt && /* @__PURE__ */ E(ye, {
|
|
568
570
|
workspace: d,
|
|
569
571
|
onClose: () => z(!1)
|
|
570
572
|
}),
|
|
571
|
-
L && /* @__PURE__ */ E(
|
|
573
|
+
L && /* @__PURE__ */ E(qe, { children: /* @__PURE__ */ E(he, {
|
|
572
574
|
workspace: d,
|
|
573
575
|
...L.team && { defaultTeam: L.team },
|
|
574
576
|
...L.title && { defaultTitle: L.title },
|
|
@@ -585,13 +587,13 @@ function I() {
|
|
|
585
587
|
})
|
|
586
588
|
});
|
|
587
589
|
}
|
|
588
|
-
function
|
|
590
|
+
function tt() {
|
|
589
591
|
return S(() => {
|
|
590
592
|
document.querySelector(".pw-frame-drawer [aria-current=\"page\"]")?.scrollIntoView({ block: "nearest" });
|
|
591
593
|
}, []), null;
|
|
592
594
|
}
|
|
593
|
-
function
|
|
594
|
-
let { isMobile: o } = M(), c =
|
|
595
|
+
function nt({ workspace: e, name: t, apps: n, unread: r, onSearch: i, onNewIssue: a }) {
|
|
596
|
+
let { isMobile: o } = M(), c = xe(), l = w("workspace");
|
|
595
597
|
return o ? /* @__PURE__ */ D("div", {
|
|
596
598
|
className: "flex h-12 items-center gap-1 border-b border-border px-1",
|
|
597
599
|
children: [
|
|
@@ -612,7 +614,7 @@ function tt({ workspace: e, name: t, apps: n, unread: r, onSearch: i, onNewIssue
|
|
|
612
614
|
/* @__PURE__ */ E(y, {
|
|
613
615
|
variant: "ghost",
|
|
614
616
|
size: "lg",
|
|
615
|
-
icon: /* @__PURE__ */ E(
|
|
617
|
+
icon: /* @__PURE__ */ E(ue, {}),
|
|
616
618
|
label: l("notifications"),
|
|
617
619
|
href: `/${e}/notifications`,
|
|
618
620
|
dot: r > 0
|
|
@@ -627,7 +629,7 @@ function tt({ workspace: e, name: t, apps: n, unread: r, onSearch: i, onNewIssue
|
|
|
627
629
|
]
|
|
628
630
|
}) : null;
|
|
629
631
|
}
|
|
630
|
-
function
|
|
632
|
+
function rt({ sidebar: e, brand: t, navigation: n, header: r, children: i }) {
|
|
631
633
|
let a = M();
|
|
632
634
|
return /* @__PURE__ */ D(T, { children: [e && N(/* @__PURE__ */ D("div", {
|
|
633
635
|
className: "tandem-hosted-sidebar flex flex-col gap-3",
|
|
@@ -637,7 +639,7 @@ function nt({ sidebar: e, brand: t, navigation: n, header: r, children: i }) {
|
|
|
637
639
|
children: [r, i]
|
|
638
640
|
})] });
|
|
639
641
|
}
|
|
640
|
-
function
|
|
642
|
+
function it({ children: e }) {
|
|
641
643
|
let { state: t } = g(), n = t?.open && t.maximized;
|
|
642
644
|
return /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("div", {
|
|
643
645
|
className: F("min-h-0 min-w-0 flex-1 overflow-y-auto bg-card", n && "hidden"),
|
|
@@ -645,7 +647,7 @@ function rt({ children: e }) {
|
|
|
645
647
|
}), /* @__PURE__ */ E(d, {})] });
|
|
646
648
|
}
|
|
647
649
|
var L = (e) => `tandem:collapsed-teams:${e}`;
|
|
648
|
-
function
|
|
650
|
+
function at(e) {
|
|
649
651
|
try {
|
|
650
652
|
let t = JSON.parse(localStorage.getItem(L(e)) ?? "[]");
|
|
651
653
|
return new Set(Array.isArray(t) ? t.filter((e) => typeof e == "string") : []);
|
|
@@ -654,7 +656,7 @@ function it(e) {
|
|
|
654
656
|
}
|
|
655
657
|
}
|
|
656
658
|
var R = "tandem:sidebar";
|
|
657
|
-
function
|
|
659
|
+
function ot() {
|
|
658
660
|
try {
|
|
659
661
|
let e = JSON.parse(localStorage.getItem(R) ?? "{}");
|
|
660
662
|
return {
|
|
@@ -668,20 +670,20 @@ function at() {
|
|
|
668
670
|
};
|
|
669
671
|
}
|
|
670
672
|
}
|
|
671
|
-
function
|
|
673
|
+
function st(e) {
|
|
672
674
|
try {
|
|
673
675
|
localStorage.setItem(R, JSON.stringify(e));
|
|
674
676
|
} catch {}
|
|
675
677
|
}
|
|
676
|
-
function
|
|
678
|
+
function ct(e, t) {
|
|
677
679
|
try {
|
|
678
680
|
localStorage.setItem(L(e), JSON.stringify([...t]));
|
|
679
681
|
} catch {}
|
|
680
682
|
}
|
|
681
|
-
function
|
|
683
|
+
function lt() {
|
|
682
684
|
return Array.from(document.querySelectorAll("[aria-keyshortcuts]")).some((e) => /\b(Meta|Control)\+F\b/.test(e.getAttribute("aria-keyshortcuts") ?? "") && e.getClientRects().length > 0);
|
|
683
685
|
}
|
|
684
|
-
function
|
|
686
|
+
function ut() {
|
|
685
687
|
return S(() => {
|
|
686
688
|
let t = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
687
689
|
try {
|