@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,38 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 { EmptyState as
|
|
17
|
-
import { useEffect as
|
|
18
|
-
import { useTranslations as
|
|
19
|
-
import { jsx as
|
|
20
|
-
import { keepPreviousData as
|
|
1
|
+
import { docQuery as e, docsQuery as t, issueSearchQuery as n, knowledgeQuery as r, meQuery as i, myTeamsQuery as a } from "../api/queries.js";
|
|
2
|
+
import { docPath as o, useDocActions as ee } from "../lib/docs.js";
|
|
3
|
+
import { headingAnchor as te, headings as ne } from "../lib/glossary.js";
|
|
4
|
+
import { useHost as re } from "../lib/host.js";
|
|
5
|
+
import { useIssueMenu as ie } from "../lib/issueMenu.js";
|
|
6
|
+
import { useNewIssue as ae } from "../lib/newIssue.js";
|
|
7
|
+
import { fuzzyScore as s, namedFirst as oe } from "../lib/palette.js";
|
|
8
|
+
import { recentPages as se } from "../lib/recent.js";
|
|
9
|
+
import { useNavigate as ce } from "../lib/router.js";
|
|
10
|
+
import { teamPath as le } from "../lib/teamPaths.js";
|
|
11
|
+
import { useSavedViews as ue, viewHref as de } from "../lib/views.js";
|
|
12
|
+
import { DocIcon as c } from "./DocIcon.js";
|
|
13
|
+
import { EntityIcon as fe } from "./EntityIcon.js";
|
|
14
|
+
import { AddIcon as l, AreaIcon as pe, CheckIcon as me, ChevronRightIcon as he, CloseIcon as ge, CycleIcon as _e, FileTextIcon as u, InboxIcon as d, LibraryIcon as f, ListViewIcon as p, NotificationIcon as ve, ProjectIcon as m, SearchIcon as ye, SettingsIcon as be, StatusIcon as xe, TriageIcon as Se, UserIcon as h, UsersIcon as g } from "./icons.js";
|
|
15
|
+
import { useSettingsPages as Ce } from "./SettingsNav.js";
|
|
16
|
+
import { EmptyState as we, IconButton as Te, ListboxGroup as Ee, ListboxOption as De, Modal as Oe, Tooltip as ke, isMenuSubmenu as _, useListboxNavigation as Ae } from "@parallelworks/ui";
|
|
17
|
+
import { useEffect as v, useRef as je, useState as y } from "react";
|
|
18
|
+
import { useTranslations as b } from "use-intl";
|
|
19
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
20
|
+
import { keepPreviousData as C, useQueries as Me, useQuery as w, useSuspenseQuery as Ne } from "@tanstack/react-query";
|
|
21
21
|
// src/components/CommandPalette.tsx
|
|
22
|
-
var
|
|
23
|
-
function
|
|
22
|
+
var T = "size-4 text-muted-foreground";
|
|
23
|
+
function Pe(e, t, n = 6) {
|
|
24
24
|
return t.trim() ? e.map((e) => ({
|
|
25
25
|
...e,
|
|
26
26
|
items: e.items.map((e) => ({
|
|
27
27
|
item: e,
|
|
28
|
-
score:
|
|
28
|
+
score: s(t, e.label)
|
|
29
29
|
})).filter((e) => e.score !== null).sort((e, t) => t.score - e.score).slice(0, e.limit ?? n).map((e) => e.item)
|
|
30
30
|
})).filter((e) => e.items.length > 0) : e;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Fe(e, t) {
|
|
33
33
|
let n = [];
|
|
34
34
|
for (let r of e) {
|
|
35
|
-
if (!
|
|
35
|
+
if (!_(r) || r.disabled) continue;
|
|
36
36
|
let e = t(r.shortcut, r.label), i = r.items.flatMap((e, t) => !("label" in e) || !("onClick" in e) || !e.onClick ? [] : [{
|
|
37
37
|
id: `${r.label}-${t}`,
|
|
38
38
|
label: e.label,
|
|
@@ -56,44 +56,44 @@ function Pe(e, t) {
|
|
|
56
56
|
}
|
|
57
57
|
return n;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let
|
|
61
|
-
...
|
|
62
|
-
enabled:
|
|
63
|
-
}),
|
|
64
|
-
...
|
|
65
|
-
enabled:
|
|
66
|
-
placeholderData:
|
|
67
|
-
}), [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
let e = setTimeout(() =>
|
|
59
|
+
function E({ workspace: _, open: E, onClose: D, selection: O }) {
|
|
60
|
+
let k = b("palette"), A = b("common"), j = b("workspace"), M = re(), Ie = b("measures"), Le = b("graphPage"), Re = ce(), ze = ae(), { data: N } = Ne(i), { data: Be = [] } = w(a(_)), { data: Ve = [] } = w({
|
|
61
|
+
...r(_),
|
|
62
|
+
enabled: E
|
|
63
|
+
}), He = ee(_), { views: Ue } = ue(_), P = Ce(), We = ie(_), [F, I] = y(""), [L, R] = y(""), { data: z = [] } = w({
|
|
64
|
+
...t(_, { title: L }),
|
|
65
|
+
enabled: E && L !== "",
|
|
66
|
+
placeholderData: C
|
|
67
|
+
}), [Ge, B] = y([]), V = je(null);
|
|
68
|
+
v(() => {
|
|
69
|
+
E && (I(""), R(""), B([]));
|
|
70
|
+
}, [E]), v(() => {
|
|
71
|
+
let e = setTimeout(() => R(F.trim()), 150);
|
|
72
72
|
return () => clearTimeout(e);
|
|
73
|
-
}, [
|
|
74
|
-
let
|
|
75
|
-
...
|
|
76
|
-
enabled:
|
|
77
|
-
placeholderData:
|
|
78
|
-
}), { data:
|
|
79
|
-
...
|
|
80
|
-
enabled:
|
|
81
|
-
placeholderData:
|
|
82
|
-
}),
|
|
83
|
-
...
|
|
84
|
-
enabled:
|
|
85
|
-
})) }), q =
|
|
73
|
+
}, [F]);
|
|
74
|
+
let H = Ge.at(-1), U = E && !H && L !== "", { data: W } = w({
|
|
75
|
+
...n(_, { q: L }),
|
|
76
|
+
enabled: U,
|
|
77
|
+
placeholderData: C
|
|
78
|
+
}), { data: G = [] } = w({
|
|
79
|
+
...t(_, { q: L }),
|
|
80
|
+
enabled: U,
|
|
81
|
+
placeholderData: C
|
|
82
|
+
}), K = Me({ queries: G.slice(0, 3).map((t) => ({
|
|
83
|
+
...e(_, t.key),
|
|
84
|
+
enabled: U
|
|
85
|
+
})) }), q = G.slice(0, 3).flatMap((e, t) => ne(K[t]?.data?.body ?? "").filter((e) => s(L, e.text) !== null).slice(0, 3).map((t) => ({
|
|
86
86
|
doc: e,
|
|
87
87
|
heading: t.text
|
|
88
|
-
}))), J =
|
|
89
|
-
let e =
|
|
90
|
-
if (
|
|
91
|
-
let n =
|
|
88
|
+
}))), J = E ? se(_) : [], Ke = N?.workspaces.find((e) => e.slug === _)?.name ?? _, Y = Be.filter((e) => !e.archivedAt), X = (e) => () => Re({ href: e }), qe = (() => {
|
|
89
|
+
let e = F.trim(), t = [];
|
|
90
|
+
if (O.length > 0) {
|
|
91
|
+
let n = Fe(We(O), (e, t) => e === "S" ? k("setStatus") : e === "P" ? k("setPriority") : e === "A" ? k("setAssignee") : e === "L" ? k("setLabels") : t), r = e ? n.flatMap((e) => {
|
|
92
92
|
let t = e.page?.(), n = t?.groups[0]?.label ?? e.label;
|
|
93
93
|
return (t?.groups[0]?.items ?? []).map((t) => ({
|
|
94
94
|
...t,
|
|
95
95
|
id: `${e.id}-${t.id}`,
|
|
96
|
-
label:
|
|
96
|
+
label: A("fieldValue", {
|
|
97
97
|
label: n,
|
|
98
98
|
value: t.label
|
|
99
99
|
})
|
|
@@ -101,51 +101,51 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
|
|
|
101
101
|
}) : [];
|
|
102
102
|
t.push({
|
|
103
103
|
id: "selection",
|
|
104
|
-
label:
|
|
104
|
+
label: k("selection", { count: O.length }),
|
|
105
105
|
items: [...n, ...r]
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
if (!e && J.length > 0 && t.push({
|
|
109
109
|
id: "recent",
|
|
110
|
-
label:
|
|
110
|
+
label: k("recent"),
|
|
111
111
|
items: J.map((e) => ({
|
|
112
112
|
id: `recent-${e.href}`,
|
|
113
113
|
label: e.label,
|
|
114
|
-
icon: e.kind === "doc" ? /* @__PURE__ */
|
|
114
|
+
icon: e.kind === "doc" ? /* @__PURE__ */ x(u, { className: T }) : /* @__PURE__ */ x(p, { className: T }),
|
|
115
115
|
run: X(e.href)
|
|
116
116
|
}))
|
|
117
|
-
}),
|
|
117
|
+
}), U && W && W.issues.length > 0 && t.push({
|
|
118
118
|
id: "issues",
|
|
119
|
-
label:
|
|
120
|
-
items:
|
|
119
|
+
label: k("issues"),
|
|
120
|
+
items: W.issues.slice(0, 8).map((e) => ({
|
|
121
121
|
id: e.id,
|
|
122
122
|
label: `${e.identifier} ${e.title}`,
|
|
123
|
-
icon: /* @__PURE__ */
|
|
123
|
+
icon: /* @__PURE__ */ x(xe, {
|
|
124
124
|
category: e.status.category,
|
|
125
125
|
step: e.status.step
|
|
126
126
|
}),
|
|
127
|
-
run: X(`/${
|
|
127
|
+
run: X(`/${_}/issues/${e.identifier}`)
|
|
128
128
|
}))
|
|
129
129
|
}), t.push({
|
|
130
130
|
id: "actions",
|
|
131
|
-
label:
|
|
131
|
+
label: k("actions"),
|
|
132
132
|
items: [
|
|
133
133
|
{
|
|
134
134
|
id: "new-issue",
|
|
135
|
-
label:
|
|
136
|
-
icon: /* @__PURE__ */
|
|
135
|
+
label: k("newIssue"),
|
|
136
|
+
icon: /* @__PURE__ */ x(l, { className: T }),
|
|
137
137
|
hint: "C",
|
|
138
|
-
run: () =>
|
|
138
|
+
run: () => ze()
|
|
139
139
|
},
|
|
140
140
|
{
|
|
141
141
|
id: "new-doc",
|
|
142
|
-
label:
|
|
143
|
-
icon: /* @__PURE__ */
|
|
142
|
+
label: k("newDoc"),
|
|
143
|
+
icon: /* @__PURE__ */ x(l, { className: T }),
|
|
144
144
|
page: () => ({
|
|
145
|
-
title:
|
|
145
|
+
title: k("newDoc"),
|
|
146
146
|
groups: [{
|
|
147
147
|
id: "spaces",
|
|
148
|
-
label:
|
|
148
|
+
label: k("newDocIn"),
|
|
149
149
|
items: [{
|
|
150
150
|
id: "space-workspace",
|
|
151
151
|
label: Ke
|
|
@@ -155,92 +155,92 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
|
|
|
155
155
|
hint: e.key
|
|
156
156
|
}))].map((e) => ({
|
|
157
157
|
...e,
|
|
158
|
-
run: () =>
|
|
158
|
+
run: () => He.create.mutate({ team: e.id === "space-workspace" ? void 0 : e.id.slice(6) })
|
|
159
159
|
}))
|
|
160
160
|
}]
|
|
161
161
|
})
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
164
|
id: "my-issues",
|
|
165
|
-
label:
|
|
166
|
-
icon: /* @__PURE__ */
|
|
167
|
-
run: X(`/${
|
|
165
|
+
label: k("goTo", { page: j("myIssues") }),
|
|
166
|
+
icon: /* @__PURE__ */ x(h, { className: T }),
|
|
167
|
+
run: X(`/${_}/issues?assignee=${encodeURIComponent(N?.user.username ?? "")}`)
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
170
|
id: "decisions",
|
|
171
|
-
label:
|
|
172
|
-
icon: /* @__PURE__ */
|
|
173
|
-
run: X(`/${
|
|
171
|
+
label: k("goToInbox"),
|
|
172
|
+
icon: /* @__PURE__ */ x(d, { className: T }),
|
|
173
|
+
run: X(`/${_}/decisions`)
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
id: "notifications",
|
|
177
|
-
label:
|
|
178
|
-
icon: /* @__PURE__ */
|
|
179
|
-
run: X(`/${
|
|
177
|
+
label: k("goTo", { page: j("notifications") }),
|
|
178
|
+
icon: /* @__PURE__ */ x(ve, { className: T }),
|
|
179
|
+
run: X(`/${_}/notifications`)
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
id: "knowledge",
|
|
183
|
-
label:
|
|
184
|
-
icon: /* @__PURE__ */
|
|
185
|
-
run: X(`/${
|
|
183
|
+
label: k("goTo", { page: j("knowledge") }),
|
|
184
|
+
icon: /* @__PURE__ */ x(f, { className: T }),
|
|
185
|
+
run: X(`/${_}/knowledge`)
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
id: "docs",
|
|
189
|
-
label:
|
|
190
|
-
icon: /* @__PURE__ */
|
|
191
|
-
run: X(`/${
|
|
189
|
+
label: k("goTo", { page: k("docs") }),
|
|
190
|
+
icon: /* @__PURE__ */ x(u, { className: T }),
|
|
191
|
+
run: X(`/${_}/docs`)
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
id: "agents",
|
|
195
|
-
label:
|
|
196
|
-
icon: /* @__PURE__ */
|
|
197
|
-
run: X(`/${
|
|
195
|
+
label: k("goTo", { page: j("agents") }),
|
|
196
|
+
icon: /* @__PURE__ */ x(h, { className: T }),
|
|
197
|
+
run: X(`/${_}/agents`)
|
|
198
198
|
},
|
|
199
199
|
...[
|
|
200
200
|
[
|
|
201
201
|
"projects",
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
j("projects"),
|
|
203
|
+
m
|
|
204
204
|
],
|
|
205
205
|
...Y.some((e) => e.triageEnabled) ? [[
|
|
206
206
|
"triage",
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
j("triage"),
|
|
208
|
+
Se
|
|
209
209
|
]] : [],
|
|
210
210
|
[
|
|
211
211
|
"measures",
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
Ie("title"),
|
|
213
|
+
p
|
|
214
214
|
],
|
|
215
215
|
[
|
|
216
216
|
"graph",
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
Le("title"),
|
|
218
|
+
f
|
|
219
219
|
],
|
|
220
220
|
[
|
|
221
221
|
"settings",
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
j("settings"),
|
|
223
|
+
be
|
|
224
224
|
]
|
|
225
225
|
].map(([e, t, n]) => ({
|
|
226
226
|
id: e,
|
|
227
|
-
label:
|
|
228
|
-
icon: /* @__PURE__ */
|
|
229
|
-
run: X(`/${
|
|
227
|
+
label: k("goTo", { page: t }),
|
|
228
|
+
icon: /* @__PURE__ */ x(n, { className: T }),
|
|
229
|
+
run: X(`/${_}/${e}`)
|
|
230
230
|
})),
|
|
231
|
-
...(
|
|
231
|
+
...(N?.workspaces.length ?? 0) > 1 ? [{
|
|
232
232
|
id: "switch-workspace",
|
|
233
|
-
label:
|
|
234
|
-
icon: /* @__PURE__ */
|
|
233
|
+
label: j("switchWorkspace"),
|
|
234
|
+
icon: /* @__PURE__ */ x(g, { className: T }),
|
|
235
235
|
page: () => ({
|
|
236
|
-
title:
|
|
236
|
+
title: j("switchWorkspace"),
|
|
237
237
|
groups: [{
|
|
238
238
|
id: "workspaces",
|
|
239
|
-
label:
|
|
240
|
-
items: (
|
|
239
|
+
label: k("workspaces"),
|
|
240
|
+
items: (N?.workspaces ?? []).map((e) => ({
|
|
241
241
|
id: e.slug,
|
|
242
242
|
label: e.name,
|
|
243
|
-
checked: e.slug ===
|
|
243
|
+
checked: e.slug === _,
|
|
244
244
|
run: X(`/${e.slug}/issues`)
|
|
245
245
|
}))
|
|
246
246
|
}]
|
|
@@ -249,31 +249,31 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
|
|
|
249
249
|
]
|
|
250
250
|
}), t.push({
|
|
251
251
|
id: "views",
|
|
252
|
-
label:
|
|
253
|
-
items:
|
|
252
|
+
label: k("views"),
|
|
253
|
+
items: Ue.map((e) => ({
|
|
254
254
|
id: e.id,
|
|
255
255
|
label: e.name,
|
|
256
|
-
icon: e.shared ? /* @__PURE__ */
|
|
257
|
-
run: X(
|
|
256
|
+
icon: e.shared ? /* @__PURE__ */ x(g, { className: T }) : /* @__PURE__ */ x(p, { className: T }),
|
|
257
|
+
run: X(de(_, e))
|
|
258
258
|
}))
|
|
259
259
|
}), t.push({
|
|
260
260
|
id: "teams",
|
|
261
|
-
label:
|
|
261
|
+
label: k("teams"),
|
|
262
262
|
items: Y.map((e) => ({
|
|
263
263
|
id: e.id,
|
|
264
264
|
label: e.name,
|
|
265
265
|
hint: e.key,
|
|
266
|
-
icon: /* @__PURE__ */
|
|
266
|
+
icon: /* @__PURE__ */ x(fe, {
|
|
267
267
|
icon: e.icon,
|
|
268
268
|
color: e.color,
|
|
269
269
|
name: e.name
|
|
270
270
|
}),
|
|
271
|
-
run: X(
|
|
271
|
+
run: X(le(_, e.key, "issues"))
|
|
272
272
|
}))
|
|
273
|
-
}),
|
|
273
|
+
}), M?.controls?.length && t.push({
|
|
274
274
|
id: "host",
|
|
275
|
-
label:
|
|
276
|
-
items:
|
|
275
|
+
label: k("host"),
|
|
276
|
+
items: M.controls.map((e) => ({
|
|
277
277
|
id: `host-${e.id}`,
|
|
278
278
|
label: e.label,
|
|
279
279
|
...e.shortcut && { hint: e.shortcut },
|
|
@@ -282,221 +282,221 @@ function D({ workspace: v, open: D, onClose: O, selection: k }) {
|
|
|
282
282
|
}), e) {
|
|
283
283
|
t.push({
|
|
284
284
|
id: "team-pages",
|
|
285
|
-
label:
|
|
285
|
+
label: k("teams"),
|
|
286
286
|
items: Y.flatMap((e) => {
|
|
287
287
|
let t = encodeURIComponent(e.key);
|
|
288
288
|
return [
|
|
289
289
|
[
|
|
290
290
|
"projects",
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
j("projects"),
|
|
292
|
+
m,
|
|
293
293
|
`teams/${t}/projects`
|
|
294
294
|
],
|
|
295
295
|
[
|
|
296
296
|
"areas",
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
j("areas"),
|
|
298
|
+
pe,
|
|
299
299
|
`teams/${t}/areas`
|
|
300
300
|
],
|
|
301
301
|
[
|
|
302
302
|
"decisions",
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
j("decisions"),
|
|
304
|
+
d,
|
|
305
305
|
`teams/${t}/decisions`
|
|
306
306
|
],
|
|
307
307
|
...e.cyclesEnabled ? [[
|
|
308
308
|
"cycles",
|
|
309
|
-
|
|
310
|
-
|
|
309
|
+
j("cycles"),
|
|
310
|
+
_e,
|
|
311
311
|
`cycles/${t}`
|
|
312
312
|
]] : []
|
|
313
313
|
].map(([t, n, r, i]) => ({
|
|
314
314
|
id: `${e.id}-${t}`,
|
|
315
|
-
label:
|
|
315
|
+
label: k("teamPage", {
|
|
316
316
|
team: e.name,
|
|
317
317
|
page: n
|
|
318
318
|
}),
|
|
319
319
|
hint: e.key,
|
|
320
|
-
icon: /* @__PURE__ */
|
|
321
|
-
run: X(`/${
|
|
320
|
+
icon: /* @__PURE__ */ x(r, { className: T }),
|
|
321
|
+
run: X(`/${_}/${i}`)
|
|
322
322
|
}));
|
|
323
323
|
})
|
|
324
324
|
}), t.push({
|
|
325
325
|
id: "docs",
|
|
326
|
-
label:
|
|
327
|
-
items:
|
|
326
|
+
label: k("docs"),
|
|
327
|
+
items: z.filter((e) => !e.archivedAt).map((e) => ({
|
|
328
328
|
id: e.id,
|
|
329
329
|
label: e.title,
|
|
330
|
-
icon: /* @__PURE__ */
|
|
330
|
+
icon: /* @__PURE__ */ x(c, {
|
|
331
331
|
icon: e.icon,
|
|
332
|
-
className:
|
|
332
|
+
className: T
|
|
333
333
|
}),
|
|
334
|
-
run: X(
|
|
334
|
+
run: X(o(_, e))
|
|
335
335
|
}))
|
|
336
336
|
});
|
|
337
|
-
let n = new Set(
|
|
338
|
-
|
|
337
|
+
let n = new Set(z.filter((t) => s(e, t.title) !== null).map((e) => e.id)), r = G.filter((e) => !e.archivedAt && !n.has(e.id));
|
|
338
|
+
U && r.length > 0 && t.push({
|
|
339
339
|
id: "doc-text",
|
|
340
|
-
label:
|
|
340
|
+
label: k("docText"),
|
|
341
341
|
items: r.slice(0, 6).map((e) => ({
|
|
342
342
|
id: `text-${e.id}`,
|
|
343
343
|
label: e.title,
|
|
344
|
-
icon: /* @__PURE__ */
|
|
344
|
+
icon: /* @__PURE__ */ x(c, {
|
|
345
345
|
icon: e.icon,
|
|
346
|
-
className:
|
|
346
|
+
className: T
|
|
347
347
|
}),
|
|
348
|
-
run: X(
|
|
348
|
+
run: X(o(_, e))
|
|
349
349
|
}))
|
|
350
350
|
}), q.length > 0 && t.push({
|
|
351
351
|
id: "sections",
|
|
352
|
-
label:
|
|
352
|
+
label: k("sections"),
|
|
353
353
|
items: q.map(({ doc: e, heading: t }) => ({
|
|
354
354
|
id: `section-${e.id}-${t}`,
|
|
355
|
-
label:
|
|
355
|
+
label: k("section", {
|
|
356
356
|
doc: e.title,
|
|
357
357
|
heading: t
|
|
358
358
|
}),
|
|
359
|
-
icon: /* @__PURE__ */
|
|
359
|
+
icon: /* @__PURE__ */ x(c, {
|
|
360
360
|
icon: e.icon,
|
|
361
|
-
className:
|
|
361
|
+
className: T
|
|
362
362
|
}),
|
|
363
|
-
run: X(`${
|
|
363
|
+
run: X(`${o(_, e)}#${te(t)}`)
|
|
364
364
|
}))
|
|
365
365
|
}), t.push({
|
|
366
366
|
id: "knowledge",
|
|
367
|
-
label:
|
|
368
|
-
items:
|
|
367
|
+
label: j("knowledge"),
|
|
368
|
+
items: Ve.filter((e) => !e.archivedAt).map((e) => ({
|
|
369
369
|
id: `knowledge-${e.id}`,
|
|
370
370
|
label: e.name,
|
|
371
|
-
icon: /* @__PURE__ */
|
|
372
|
-
run: X(`/${
|
|
371
|
+
icon: /* @__PURE__ */ x(f, { className: T }),
|
|
372
|
+
run: X(`/${_}/knowledge?entry=${encodeURIComponent(e.id)}`)
|
|
373
373
|
}))
|
|
374
374
|
}), t.push({
|
|
375
375
|
id: "settings",
|
|
376
|
-
label:
|
|
377
|
-
limit:
|
|
378
|
-
items:
|
|
376
|
+
label: k("settings"),
|
|
377
|
+
limit: P.reduce((e, t) => e + t.items.length, 0),
|
|
378
|
+
items: P.flatMap((e) => e.items.map(({ to: t, label: n, Icon: r }) => ({
|
|
379
379
|
id: t,
|
|
380
|
-
label:
|
|
381
|
-
team:
|
|
380
|
+
label: k("goTo", { page: k("teamPage", {
|
|
381
|
+
team: j("settings"),
|
|
382
382
|
page: n
|
|
383
383
|
}) }),
|
|
384
384
|
hint: e.label,
|
|
385
|
-
icon: /* @__PURE__ */
|
|
386
|
-
run: X(t.replace("$workspace",
|
|
385
|
+
icon: /* @__PURE__ */ x(r, { className: T }),
|
|
386
|
+
run: X(t.replace("$workspace", _))
|
|
387
387
|
})))
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
return t;
|
|
391
391
|
})(), Z = (() => {
|
|
392
|
-
let e =
|
|
392
|
+
let e = H ? H.groups : qe, t = (e) => e.id === "issues" || e.id === "doc-text" || e.id === "sections", n = Pe(e.filter((e) => !t(e)), F), r = e.find((e) => e.id === "issues"), i = e.filter((e) => t(e) && e.id !== "issues"), [a, o] = oe(n, F);
|
|
393
393
|
return [
|
|
394
394
|
...a,
|
|
395
395
|
...r ? [r] : [],
|
|
396
396
|
...o,
|
|
397
397
|
...i
|
|
398
398
|
];
|
|
399
|
-
})(), Q = Z.flatMap((e) => e.items), $ =
|
|
399
|
+
})(), Q = Z.flatMap((e) => e.items), $ = Ae({
|
|
400
400
|
items: Q,
|
|
401
401
|
onChoose: (e) => {
|
|
402
|
-
e.page ? (
|
|
402
|
+
e.page ? (B((t) => [...t, e.page?.()]), I(""), V.current?.focus()) : (D(), e.run?.());
|
|
403
403
|
},
|
|
404
404
|
loop: !1,
|
|
405
405
|
chooseKeys: [],
|
|
406
406
|
homeEnd: !0
|
|
407
407
|
}), { setActive: Je } = $;
|
|
408
|
-
return
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
]), /* @__PURE__ */
|
|
413
|
-
open:
|
|
414
|
-
onClose:
|
|
408
|
+
return v(() => Je(0), [
|
|
409
|
+
F,
|
|
410
|
+
H,
|
|
411
|
+
E
|
|
412
|
+
]), /* @__PURE__ */ S(Oe, {
|
|
413
|
+
open: E,
|
|
414
|
+
onClose: D,
|
|
415
415
|
panel: !1,
|
|
416
|
-
"aria-label":
|
|
416
|
+
"aria-label": k("label"),
|
|
417
417
|
backdropClassName: "bg-(--theme-backdrop) data-ending-style:transition-none",
|
|
418
418
|
className: "data-ending-style:transition-none flex w-full max-w-xl flex-col overflow-hidden rounded-xl border border-border bg-card text-foreground shadow-lg shadow-black/15 max-md:fixed max-md:inset-0 max-md:max-w-none max-md:rounded-none max-md:border-0",
|
|
419
419
|
children: [
|
|
420
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ S("div", {
|
|
421
421
|
className: "flex h-12 shrink-0 items-center gap-2 border-b border-border px-3",
|
|
422
422
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
424
|
-
|
|
425
|
-
content:
|
|
426
|
-
children: /* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ x(ye, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
424
|
+
H && /* @__PURE__ */ x(ke, {
|
|
425
|
+
content: k("back"),
|
|
426
|
+
children: /* @__PURE__ */ x("button", {
|
|
427
427
|
type: "button",
|
|
428
|
-
onClick: () =>
|
|
428
|
+
onClick: () => B((e) => e.slice(0, -1)),
|
|
429
429
|
className: "shrink-0 rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground hover:text-foreground",
|
|
430
|
-
children:
|
|
430
|
+
children: H.title
|
|
431
431
|
})
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
ref:
|
|
433
|
+
/* @__PURE__ */ x("input", {
|
|
434
|
+
ref: V,
|
|
435
435
|
autoFocus: !0,
|
|
436
|
-
value:
|
|
437
|
-
onChange: (e) =>
|
|
436
|
+
value: F,
|
|
437
|
+
onChange: (e) => I(e.target.value),
|
|
438
438
|
onKeyDown: (e) => {
|
|
439
|
-
e.key === "Backspace" &&
|
|
439
|
+
e.key === "Backspace" && F === "" && H ? (e.preventDefault(), B((e) => e.slice(0, -1))) : $.handleKey(e);
|
|
440
440
|
},
|
|
441
|
-
placeholder:
|
|
441
|
+
placeholder: k(H ? "filterPlaceholder" : "placeholder"),
|
|
442
442
|
role: "combobox",
|
|
443
|
-
"aria-label":
|
|
443
|
+
"aria-label": k("label"),
|
|
444
444
|
"aria-expanded": "true",
|
|
445
445
|
...$.hostProps,
|
|
446
446
|
className: "min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground"
|
|
447
447
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ x(Te, {
|
|
449
449
|
variant: "ghost",
|
|
450
450
|
size: "sm",
|
|
451
|
-
icon: /* @__PURE__ */
|
|
452
|
-
label:
|
|
453
|
-
onClick:
|
|
451
|
+
icon: /* @__PURE__ */ x(ge, {}),
|
|
452
|
+
label: A("close"),
|
|
453
|
+
onClick: D,
|
|
454
454
|
className: "md:hidden"
|
|
455
455
|
})
|
|
456
456
|
]
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ S("div", {
|
|
459
459
|
id: $.listProps.id,
|
|
460
460
|
role: "listbox",
|
|
461
|
-
"aria-label":
|
|
461
|
+
"aria-label": k("results"),
|
|
462
462
|
className: "min-h-0 flex-1 overflow-y-auto p-1 md:max-h-[min(60vh,28rem)] md:flex-none",
|
|
463
|
-
children: [Z.map((e) => /* @__PURE__ */
|
|
463
|
+
children: [Z.map((e) => /* @__PURE__ */ x(Ee, {
|
|
464
464
|
label: e.label,
|
|
465
|
-
children: e.items.map((e) => /* @__PURE__ */
|
|
465
|
+
children: e.items.map((e) => /* @__PURE__ */ x(De, {
|
|
466
466
|
option: $.optionProps(Q.indexOf(e)),
|
|
467
|
-
icon: /* @__PURE__ */
|
|
467
|
+
icon: /* @__PURE__ */ x("span", {
|
|
468
468
|
className: "flex size-4 items-center justify-center",
|
|
469
469
|
children: e.icon
|
|
470
470
|
}),
|
|
471
471
|
label: e.label,
|
|
472
|
-
hint: e.checked || e.hint || e.page ? /* @__PURE__ */
|
|
472
|
+
hint: e.checked || e.hint || e.page ? /* @__PURE__ */ S("span", {
|
|
473
473
|
className: "flex items-center gap-2",
|
|
474
474
|
children: [
|
|
475
|
-
e.checked && /* @__PURE__ */
|
|
475
|
+
e.checked && /* @__PURE__ */ x(me, { className: "size-3.5" }),
|
|
476
476
|
e.hint,
|
|
477
|
-
e.page && /* @__PURE__ */
|
|
477
|
+
e.page && /* @__PURE__ */ x(he, { className: "size-3.5" })
|
|
478
478
|
]
|
|
479
479
|
}) : void 0,
|
|
480
480
|
className: "h-9 md:h-8"
|
|
481
481
|
}, e.id))
|
|
482
|
-
}, e.id)), Q.length === 0 && /* @__PURE__ */
|
|
482
|
+
}, e.id)), Q.length === 0 && /* @__PURE__ */ x(we, {
|
|
483
483
|
variant: "bare",
|
|
484
|
-
title:
|
|
484
|
+
title: k("noMatches")
|
|
485
485
|
})]
|
|
486
486
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ S("div", {
|
|
488
488
|
className: "hidden h-8 shrink-0 items-center gap-4 border-t border-border px-3 text-xs text-muted-foreground md:flex",
|
|
489
489
|
children: [
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
|
|
493
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ x("span", { children: k("hintMove") }),
|
|
491
|
+
/* @__PURE__ */ x("span", { children: k("hintSelect") }),
|
|
492
|
+
H && /* @__PURE__ */ x("span", { children: k("hintBack") }),
|
|
493
|
+
/* @__PURE__ */ x("span", {
|
|
494
494
|
className: "ml-auto",
|
|
495
|
-
children:
|
|
495
|
+
children: k("hintClose")
|
|
496
496
|
})
|
|
497
497
|
]
|
|
498
498
|
})
|
|
499
499
|
]
|
|
500
500
|
});
|
|
501
501
|
}
|
|
502
|
-
export {
|
|
502
|
+
export { E as CommandPalette };
|