@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,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { myTeamsQuery as e } from "../../../api/queries.js";
|
|
2
|
+
import { issueSearch as t } from "../../../lib/issueList.js";
|
|
3
|
+
import { rememberSearch as n } from "../../../lib/listSearch.js";
|
|
4
|
+
import { redirect as r } from "../../../lib/router.js";
|
|
5
5
|
import { lastTeam as i } from "../../../lib/teamPaths.js";
|
|
6
6
|
import { createFileRoute as a, lazyFn as o, lazyRouteComponent as s } from "@tanstack/react-router";
|
|
7
7
|
var c = a("/$workspace/issues/")({
|
|
8
|
-
validateSearch:
|
|
9
|
-
beforeLoad: async ({ context: { queryClient:
|
|
8
|
+
validateSearch: t,
|
|
9
|
+
beforeLoad: async ({ context: { queryClient: t }, params: a, search: o, location: s, preload: c }) => {
|
|
10
10
|
let l = o.team;
|
|
11
11
|
if (!l && !o.assignee && !o.creator && !o.saved && !o.scope) {
|
|
12
|
-
let
|
|
13
|
-
l = (
|
|
12
|
+
let n = (await t.ensureQueryData(e(a.workspace))).filter((e) => !e.archivedAt), r = i(a.workspace);
|
|
13
|
+
l = (n.find((e) => e.key === r) ?? n[0])?.key;
|
|
14
14
|
}
|
|
15
15
|
if (l) {
|
|
16
|
-
let { team: e, ...
|
|
17
|
-
throw
|
|
16
|
+
let { team: e, ...t } = o;
|
|
17
|
+
throw r({
|
|
18
18
|
to: "/$workspace/teams/$key/issues",
|
|
19
19
|
params: {
|
|
20
20
|
...a,
|
|
21
21
|
key: l
|
|
22
22
|
},
|
|
23
|
-
search:
|
|
23
|
+
search: t,
|
|
24
24
|
replace: !0
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
let u =
|
|
28
|
-
if (u) throw
|
|
27
|
+
let u = n(s.pathname, o, c);
|
|
28
|
+
if (u) throw r({
|
|
29
29
|
to: "/$workspace/issues",
|
|
30
30
|
params: a,
|
|
31
31
|
search: u,
|
|
@@ -1,252 +1,252 @@
|
|
|
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 {
|
|
17
|
-
import {
|
|
18
|
-
import { Button as O, ErrorText as k, PageHeader as
|
|
19
|
-
import { Suspense as
|
|
20
|
-
import { useErrorMessage as
|
|
21
|
-
import { useTranslations as
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { useQuery as
|
|
24
|
-
import { MoreButton as
|
|
1
|
+
import { areasQuery as e, knowledgeEntryQuery as t, knowledgeEventsQuery as n, knowledgeMentionsQuery as r, knowledgeQuery as i } from "../../../api/queries.js";
|
|
2
|
+
import { Timeline as a, TimelineItem as o, activityIcon as s } from "../../../components/ActivityTimeline.js";
|
|
3
|
+
import { AttachButton as c, UploadStatus as l, useFileUpload as u } from "../../../components/Attachments.js";
|
|
4
|
+
import { Editor as d } from "../../../components/Editor.js";
|
|
5
|
+
import { KnowledgeStatus as f } from "../../../components/HoverCards.js";
|
|
6
|
+
import { FileTextIcon as p, LibraryIcon as m, StatusIcon as h } from "../../../components/icons.js";
|
|
7
|
+
import { uploadKnowledgeAttachment as g } from "../../../lib/attachments.js";
|
|
8
|
+
import { docRef as _ } from "../../../lib/docs.js";
|
|
9
|
+
import { headingAnchor as v } from "../../../lib/glossary.js";
|
|
10
|
+
import { EntryDialog as y, useKnowledgeActions as ee, useKnowledgeMenu as b } from "../../../lib/knowledge.js";
|
|
11
|
+
import { termRef as x } from "../../../lib/knowledgeKinds.js";
|
|
12
|
+
import { usePageTitle as S } from "../../../lib/pageTitle.js";
|
|
13
|
+
import { usePeople as C } from "../../../lib/people.js";
|
|
14
|
+
import { useCan as w } from "../../../lib/roles.js";
|
|
15
|
+
import { Link as T, useNavigate as te } from "../../../lib/router.js";
|
|
16
|
+
import { useTime as E } from "../../../lib/time.js";
|
|
17
|
+
import { Route as D } from "./_term.js";
|
|
18
|
+
import { Button as O, ErrorText as k, PageHeader as ne, Section as A, TitleInput as j, useOpenMenu as M } from "@parallelworks/ui";
|
|
19
|
+
import { Suspense as N, useCallback as P, useMemo as F, useRef as I, useState as L } from "react";
|
|
20
|
+
import { useErrorMessage as R } from "@parallelworks/problem/react";
|
|
21
|
+
import { useTranslations as z } from "use-intl";
|
|
22
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
23
|
+
import { useQuery as U, useSuspenseQuery as W } from "@tanstack/react-query";
|
|
24
|
+
import { MoreButton as G } from "@parallelworks/ui/list";
|
|
25
25
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=component
|
|
26
|
-
function
|
|
27
|
-
let { workspace:
|
|
28
|
-
|
|
29
|
-
let Q =
|
|
30
|
-
id:
|
|
26
|
+
function K() {
|
|
27
|
+
let { workspace: e, term: n } = D.useParams(), r = z("knowledge"), a = z("common"), o = te(), s = M(), f = R(), { data: p } = W(t(e, n)), { data: h } = W(i(e)), _ = ee(e), v = w(e, "edit_docs"), C = v && !p.archivedAt, [E, A] = L(null), U = P((e) => A(e), []), K = b(e, U), X = I(null), Z = u((t) => g(e, p.id, t));
|
|
28
|
+
S(p.name);
|
|
29
|
+
let Q = F(() => h.filter((e) => e.supersededBy === p.id), [h, p.id]), $ = (e) => _.update.mutate({
|
|
30
|
+
id: p.id,
|
|
31
31
|
...e,
|
|
32
|
-
ifVersion:
|
|
33
|
-
}), re =
|
|
34
|
-
return /* @__PURE__ */
|
|
32
|
+
ifVersion: p.version
|
|
33
|
+
}), re = p.status === "superseded";
|
|
34
|
+
return /* @__PURE__ */ H("div", {
|
|
35
35
|
className: "flex h-full min-h-0 flex-col",
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ V(ne, {
|
|
38
38
|
heading: !1,
|
|
39
39
|
breadcrumbs: [{
|
|
40
|
-
label:
|
|
41
|
-
href: `/${
|
|
40
|
+
label: r("title"),
|
|
41
|
+
href: `/${e}/knowledge`
|
|
42
42
|
}, {
|
|
43
|
-
label:
|
|
44
|
-
icon: /* @__PURE__ */
|
|
43
|
+
label: p.name,
|
|
44
|
+
icon: /* @__PURE__ */ V(m, { className: "size-4 text-muted-foreground" })
|
|
45
45
|
}],
|
|
46
|
-
titleActions: /* @__PURE__ */
|
|
47
|
-
items: () =>
|
|
48
|
-
label:
|
|
46
|
+
titleActions: /* @__PURE__ */ V(G, {
|
|
47
|
+
items: () => K(p),
|
|
48
|
+
label: a("moreActionsFor", { name: p.name }),
|
|
49
49
|
visible: !0
|
|
50
50
|
}),
|
|
51
|
-
actions: /* @__PURE__ */
|
|
51
|
+
actions: /* @__PURE__ */ H(B, { children: [_.update.isPending && /* @__PURE__ */ V("span", {
|
|
52
52
|
className: "text-xs text-muted-foreground",
|
|
53
53
|
role: "status",
|
|
54
|
-
children:
|
|
55
|
-
}),
|
|
54
|
+
children: a("saving")
|
|
55
|
+
}), C && /* @__PURE__ */ V(O, {
|
|
56
56
|
type: "button",
|
|
57
57
|
size: "sm",
|
|
58
|
-
onClick: () =>
|
|
58
|
+
onClick: () => U({
|
|
59
59
|
kind: "edit",
|
|
60
|
-
entry:
|
|
60
|
+
entry: p
|
|
61
61
|
}),
|
|
62
|
-
children:
|
|
62
|
+
children: r("editDetails")
|
|
63
63
|
})] })
|
|
64
64
|
}),
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ V("div", {
|
|
66
66
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
67
|
-
children: /* @__PURE__ */
|
|
67
|
+
children: /* @__PURE__ */ H("article", {
|
|
68
68
|
className: "mx-auto w-full max-w-3xl px-4 pt-6 pb-20 md:px-8 md:pt-10",
|
|
69
69
|
onContextMenu: (e) => {
|
|
70
|
-
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") ||
|
|
70
|
+
e.target instanceof Element && e.target.closest("textarea, .ProseMirror") || s(e, K(p));
|
|
71
71
|
},
|
|
72
72
|
children: [
|
|
73
|
-
|
|
73
|
+
p.archivedAt && /* @__PURE__ */ H("div", {
|
|
74
74
|
className: "mb-6 flex items-center gap-3 rounded-xl border border-border bg-muted px-3 py-2 text-sm",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ V("span", {
|
|
76
76
|
className: "min-w-0 flex-1",
|
|
77
|
-
children:
|
|
78
|
-
}),
|
|
77
|
+
children: r("archivedNotice")
|
|
78
|
+
}), v && /* @__PURE__ */ V(O, {
|
|
79
79
|
type: "button",
|
|
80
80
|
size: "sm",
|
|
81
|
-
onClick: () =>
|
|
82
|
-
children:
|
|
81
|
+
onClick: () => _.restore.mutate(p.id),
|
|
82
|
+
children: r("restore")
|
|
83
83
|
})]
|
|
84
84
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
workspace:
|
|
87
|
-
entry:
|
|
85
|
+
/* @__PURE__ */ V(q, {
|
|
86
|
+
workspace: e,
|
|
87
|
+
entry: p
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ V("h1", {
|
|
90
90
|
className: "sr-only",
|
|
91
|
-
children:
|
|
91
|
+
children: p.name
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
value:
|
|
93
|
+
/* @__PURE__ */ V(j, {
|
|
94
|
+
value: p.name,
|
|
95
95
|
onCommit: (e) => $({ name: e }),
|
|
96
|
-
readOnly: !
|
|
97
|
-
"aria-label":
|
|
96
|
+
readOnly: !C,
|
|
97
|
+
"aria-label": r("name"),
|
|
98
98
|
maxLength: 100,
|
|
99
99
|
className: re ? "mt-2 text-muted-foreground line-through" : "mt-2"
|
|
100
100
|
}),
|
|
101
|
-
|
|
101
|
+
p.aliases.length > 0 && /* @__PURE__ */ V("p", {
|
|
102
102
|
className: "mt-1 text-sm text-muted-foreground",
|
|
103
|
-
children:
|
|
103
|
+
children: r("alsoCalled", { names: p.aliases.join(", ") })
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
value:
|
|
105
|
+
/* @__PURE__ */ V(j, {
|
|
106
|
+
value: p.definition,
|
|
107
107
|
onCommit: (e) => $({ definition: e }),
|
|
108
|
-
readOnly: !
|
|
109
|
-
"aria-label":
|
|
110
|
-
placeholder:
|
|
108
|
+
readOnly: !C,
|
|
109
|
+
"aria-label": r("definition"),
|
|
110
|
+
placeholder: r("definitionPlaceholder"),
|
|
111
111
|
maxLength: 1e3,
|
|
112
112
|
size: "lg",
|
|
113
113
|
className: "mt-3 text-base leading-relaxed font-normal tracking-normal text-muted-foreground"
|
|
114
114
|
}),
|
|
115
|
-
(
|
|
115
|
+
(p.supersededBy || Q.length > 0) && /* @__PURE__ */ H("div", {
|
|
116
116
|
className: "mt-3 space-y-1 text-sm",
|
|
117
|
-
children: [
|
|
117
|
+
children: [p.supersededBy && /* @__PURE__ */ V(T, {
|
|
118
118
|
to: "/$workspace/knowledge/$term",
|
|
119
119
|
params: {
|
|
120
|
-
workspace:
|
|
121
|
-
term:
|
|
120
|
+
workspace: e,
|
|
121
|
+
term: x(h.find((e) => e.id === p.supersededBy) ?? { id: p.supersededBy })
|
|
122
122
|
},
|
|
123
123
|
className: "block text-primary hover:underline",
|
|
124
|
-
children:
|
|
125
|
-
}), Q.map((
|
|
124
|
+
children: r("supersededBy", { name: p.supersededByName ?? "" })
|
|
125
|
+
}), Q.map((t) => /* @__PURE__ */ V(T, {
|
|
126
126
|
to: "/$workspace/knowledge/$term",
|
|
127
127
|
params: {
|
|
128
|
-
workspace:
|
|
129
|
-
term:
|
|
128
|
+
workspace: e,
|
|
129
|
+
term: x(t)
|
|
130
130
|
},
|
|
131
131
|
className: "block text-muted-foreground hover:text-foreground",
|
|
132
|
-
children:
|
|
133
|
-
},
|
|
132
|
+
children: r("replaces", { name: t.name })
|
|
133
|
+
}, t.id))]
|
|
134
134
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
"aria-label":
|
|
135
|
+
/* @__PURE__ */ H("section", {
|
|
136
|
+
"aria-label": r("page"),
|
|
137
137
|
className: "mt-8 border-t border-border pt-6",
|
|
138
138
|
children: [
|
|
139
|
-
|
|
140
|
-
value:
|
|
141
|
-
editable:
|
|
142
|
-
placeholder:
|
|
143
|
-
label:
|
|
144
|
-
onBlur: (e) => e !== (
|
|
139
|
+
C || p.body ? /* @__PURE__ */ V(d, {
|
|
140
|
+
value: p.body ?? "",
|
|
141
|
+
editable: C,
|
|
142
|
+
placeholder: r("pagePlaceholder"),
|
|
143
|
+
label: r("page"),
|
|
144
|
+
onBlur: (e) => e !== (p.body ?? "") && $({ body: e }),
|
|
145
145
|
onFiles: (e, t) => Z.upload(X.current, e, t),
|
|
146
146
|
onEditor: (e) => {
|
|
147
147
|
X.current = e;
|
|
148
148
|
},
|
|
149
149
|
className: "min-h-32 [&>:first-child]:mt-0"
|
|
150
|
-
}) : /* @__PURE__ */
|
|
150
|
+
}) : /* @__PURE__ */ V("p", {
|
|
151
151
|
className: "text-sm text-muted-foreground",
|
|
152
|
-
children:
|
|
152
|
+
children: r("noPage")
|
|
153
153
|
}),
|
|
154
|
-
|
|
154
|
+
C && /* @__PURE__ */ H("div", {
|
|
155
155
|
className: "mt-3 flex items-center gap-2",
|
|
156
156
|
children: [
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ V(c, { onFiles: (e) => Z.upload(X.current, e) }),
|
|
158
|
+
/* @__PURE__ */ V("span", {
|
|
159
159
|
className: "text-xs text-muted-foreground",
|
|
160
|
-
children:
|
|
160
|
+
children: r("attachHint")
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ V("span", {
|
|
163
163
|
className: "ml-auto",
|
|
164
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ V(l, {
|
|
165
165
|
pending: Z.pending,
|
|
166
166
|
error: Z.error
|
|
167
167
|
})
|
|
168
168
|
})
|
|
169
169
|
]
|
|
170
170
|
}),
|
|
171
|
-
|
|
171
|
+
_.update.isError && /* @__PURE__ */ V(k, {
|
|
172
172
|
className: "mt-2",
|
|
173
|
-
children: f(
|
|
173
|
+
children: f(_.update.error)
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
workspace:
|
|
179
|
-
entryId:
|
|
177
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(J, {
|
|
178
|
+
workspace: e,
|
|
179
|
+
entryId: p.id
|
|
180
180
|
}) }),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
-
workspace:
|
|
183
|
-
entryId:
|
|
181
|
+
/* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(Y, {
|
|
182
|
+
workspace: e,
|
|
183
|
+
entryId: p.id
|
|
184
184
|
}) })
|
|
185
185
|
]
|
|
186
186
|
})
|
|
187
187
|
}),
|
|
188
|
-
|
|
189
|
-
workspace:
|
|
190
|
-
mode:
|
|
191
|
-
onClose: () =>
|
|
192
|
-
onSaved: (
|
|
188
|
+
E && /* @__PURE__ */ V(N, { children: /* @__PURE__ */ V(y, {
|
|
189
|
+
workspace: e,
|
|
190
|
+
mode: E,
|
|
191
|
+
onClose: () => A(null),
|
|
192
|
+
onSaved: (t) => o({
|
|
193
193
|
to: "/$workspace/knowledge/$term",
|
|
194
194
|
params: {
|
|
195
|
-
workspace:
|
|
196
|
-
term:
|
|
195
|
+
workspace: e,
|
|
196
|
+
term: x(t)
|
|
197
197
|
},
|
|
198
|
-
replace:
|
|
198
|
+
replace: t.id === p.id
|
|
199
199
|
})
|
|
200
200
|
}) })
|
|
201
201
|
]
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
let
|
|
206
|
-
...n.kind === "term" ? [] : [
|
|
207
|
-
...
|
|
208
|
-
|
|
209
|
-
/* @__PURE__ */
|
|
204
|
+
function q({ workspace: t, entry: n }) {
|
|
205
|
+
let r = z("knowledge"), { actorName: i } = C(t), a = E(), { data: o = [] } = U(e(t)), s = o.find((e) => e.id === n.areaId), c = n.source.doc, l = [
|
|
206
|
+
...n.kind === "term" ? [] : [r(`kind.${n.kind}`)],
|
|
207
|
+
...s ? [s.title] : [],
|
|
208
|
+
r("writtenBy", { name: i(n.creator) }),
|
|
209
|
+
/* @__PURE__ */ V("time", {
|
|
210
210
|
dateTime: n.updatedAt,
|
|
211
|
-
title:
|
|
212
|
-
children:
|
|
211
|
+
title: a.full(n.updatedAt),
|
|
212
|
+
children: r("updated", { when: a.relative(n.updatedAt) })
|
|
213
213
|
}, "updated")
|
|
214
214
|
];
|
|
215
|
-
return /* @__PURE__ */
|
|
215
|
+
return /* @__PURE__ */ H("div", {
|
|
216
216
|
className: "space-y-1 text-xs text-muted-foreground",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ H("p", {
|
|
218
218
|
className: "flex flex-wrap items-center gap-x-1.5 gap-y-1",
|
|
219
|
-
children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */
|
|
219
|
+
children: [(n.kind !== "term" || n.status !== "decided") && /* @__PURE__ */ V(f, { status: n.status }), l.map((e, t) => /* @__PURE__ */ H("span", {
|
|
220
220
|
className: "inline-flex items-center gap-1.5",
|
|
221
|
-
children: [t > 0 && /* @__PURE__ */
|
|
221
|
+
children: [t > 0 && /* @__PURE__ */ V("span", {
|
|
222
222
|
"aria-hidden": "true",
|
|
223
223
|
children: "·"
|
|
224
224
|
}), e]
|
|
225
225
|
}, t))]
|
|
226
|
-
}), (
|
|
226
|
+
}), (c || n.source.identifier) && /* @__PURE__ */ H("p", {
|
|
227
227
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
228
228
|
children: [
|
|
229
|
-
|
|
229
|
+
c && /* @__PURE__ */ H(T, {
|
|
230
230
|
to: "/$workspace/docs/$doc",
|
|
231
231
|
params: {
|
|
232
|
-
workspace:
|
|
233
|
-
doc: c
|
|
232
|
+
workspace: t,
|
|
233
|
+
doc: _(c)
|
|
234
234
|
},
|
|
235
|
-
...n.source.section && { hash:
|
|
235
|
+
...n.source.section && { hash: v(n.source.section) },
|
|
236
236
|
className: "inline-flex items-center gap-1 hover:text-foreground",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
-
doc:
|
|
237
|
+
children: [/* @__PURE__ */ V(p, { className: "size-3" }), n.source.section ? r("sourceSection", {
|
|
238
|
+
doc: c.title,
|
|
239
239
|
section: n.source.section
|
|
240
|
-
}) :
|
|
240
|
+
}) : c.title]
|
|
241
241
|
}),
|
|
242
|
-
n.source.missing && /* @__PURE__ */
|
|
242
|
+
n.source.missing && /* @__PURE__ */ V("span", {
|
|
243
243
|
className: "text-warning",
|
|
244
|
-
children:
|
|
244
|
+
children: r("sourceMissing", { section: n.source.section ?? "" })
|
|
245
245
|
}),
|
|
246
|
-
n.source.identifier && /* @__PURE__ */
|
|
246
|
+
n.source.identifier && /* @__PURE__ */ H(T, {
|
|
247
247
|
to: "/$workspace/issues/$identifier",
|
|
248
248
|
params: {
|
|
249
|
-
workspace:
|
|
249
|
+
workspace: t,
|
|
250
250
|
identifier: n.source.identifier
|
|
251
251
|
},
|
|
252
252
|
className: "hover:text-foreground",
|
|
@@ -260,88 +260,88 @@ function J({ workspace: e, entry: n }) {
|
|
|
260
260
|
})]
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
let
|
|
263
|
+
function J({ workspace: e, entryId: t }) {
|
|
264
|
+
let n = z("knowledge"), { data: i } = U(r(e, t));
|
|
265
265
|
if (!i) return null;
|
|
266
|
-
let a = i.issues.length + i.docs.length,
|
|
267
|
-
return /* @__PURE__ */
|
|
268
|
-
"aria-label":
|
|
266
|
+
let a = i.issues.length + i.docs.length, o = "flex min-h-10 items-center gap-2.5 px-3 py-2 text-sm hover:bg-muted focus-visible:outline-offset-[-2px]";
|
|
267
|
+
return /* @__PURE__ */ H("section", {
|
|
268
|
+
"aria-label": n("mentionedIn"),
|
|
269
269
|
className: "mt-12",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
271
271
|
className: "mb-3 flex items-baseline gap-2 text-base font-semibold",
|
|
272
|
-
children: [
|
|
272
|
+
children: [n("mentionedIn"), a > 0 && /* @__PURE__ */ V("span", {
|
|
273
273
|
className: "text-xs font-normal text-muted-foreground tabular-nums",
|
|
274
274
|
children: a
|
|
275
275
|
})]
|
|
276
|
-
}), a === 0 ? /* @__PURE__ */
|
|
276
|
+
}), a === 0 ? /* @__PURE__ */ V("p", {
|
|
277
277
|
className: "text-sm text-muted-foreground",
|
|
278
|
-
children:
|
|
279
|
-
}) : /* @__PURE__ */
|
|
278
|
+
children: n("mentionedNone")
|
|
279
|
+
}) : /* @__PURE__ */ H("ul", {
|
|
280
280
|
className: "divide-y divide-border overflow-hidden rounded-xl border border-border bg-card",
|
|
281
|
-
children: [i.issues.map((
|
|
281
|
+
children: [i.issues.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(T, {
|
|
282
282
|
to: "/$workspace/issues/$identifier",
|
|
283
283
|
params: {
|
|
284
284
|
workspace: e,
|
|
285
|
-
identifier:
|
|
285
|
+
identifier: t.identifier
|
|
286
286
|
},
|
|
287
|
-
className:
|
|
287
|
+
className: o,
|
|
288
288
|
children: [
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
category:
|
|
289
|
+
/* @__PURE__ */ V(h, {
|
|
290
|
+
category: t.statusCategory,
|
|
291
291
|
className: "size-3.5 shrink-0"
|
|
292
292
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
className: "w-
|
|
295
|
-
children:
|
|
293
|
+
/* @__PURE__ */ V("span", {
|
|
294
|
+
className: "min-w-24 shrink-0 text-xs whitespace-nowrap text-muted-foreground tabular-nums",
|
|
295
|
+
children: t.identifier
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ V("span", {
|
|
298
298
|
className: "min-w-0 truncate",
|
|
299
|
-
children:
|
|
299
|
+
children: t.title
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
|
-
}) },
|
|
302
|
+
}) }, t.identifier)), i.docs.map((t) => /* @__PURE__ */ V("li", { children: /* @__PURE__ */ H(T, {
|
|
303
303
|
to: "/$workspace/docs/$doc",
|
|
304
304
|
params: {
|
|
305
305
|
workspace: e,
|
|
306
|
-
doc:
|
|
306
|
+
doc: _(t)
|
|
307
307
|
},
|
|
308
|
-
className:
|
|
308
|
+
className: o,
|
|
309
309
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ V(p, { className: "size-3.5 shrink-0 text-muted-foreground" }),
|
|
311
|
+
/* @__PURE__ */ V("span", {
|
|
312
312
|
className: "w-16 shrink-0 text-xs text-muted-foreground",
|
|
313
|
-
children:
|
|
313
|
+
children: n("doc")
|
|
314
314
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ V("span", {
|
|
316
316
|
className: "min-w-0 truncate",
|
|
317
|
-
children:
|
|
317
|
+
children: t.title
|
|
318
318
|
})
|
|
319
319
|
]
|
|
320
|
-
}) },
|
|
320
|
+
}) }, t.id))]
|
|
321
321
|
})]
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
|
-
function
|
|
325
|
-
let
|
|
326
|
-
return
|
|
327
|
-
title:
|
|
324
|
+
function Y({ workspace: e, entryId: t }) {
|
|
325
|
+
let r = z("knowledge.history"), { data: i = [] } = U(n(e, t)), { actorName: c } = C(e);
|
|
326
|
+
return i.length === 0 ? null : /* @__PURE__ */ V(A, {
|
|
327
|
+
title: r("title"),
|
|
328
328
|
variant: "bare",
|
|
329
329
|
defaultOpen: !1,
|
|
330
330
|
headingLevel: 2,
|
|
331
331
|
className: "mt-10",
|
|
332
|
-
children: /* @__PURE__ */
|
|
332
|
+
children: /* @__PURE__ */ V(a, { children: i.map((t) => /* @__PURE__ */ V(o, {
|
|
333
333
|
workspace: e,
|
|
334
|
-
icon:
|
|
334
|
+
icon: s(t.type, t.data),
|
|
335
335
|
actor: t.actor,
|
|
336
336
|
at: t.createdAt,
|
|
337
|
-
children: X(
|
|
337
|
+
children: X(r, t, c(t.actor))
|
|
338
338
|
}, t.id)) })
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
341
|
function X(e, t, n) {
|
|
342
342
|
let r = t.data ?? {}, i = {
|
|
343
343
|
name: n,
|
|
344
|
-
actor: (e) => /* @__PURE__ */
|
|
344
|
+
actor: (e) => /* @__PURE__ */ V("span", {
|
|
345
345
|
className: "font-medium text-foreground",
|
|
346
346
|
children: e
|
|
347
347
|
})
|
|
@@ -363,4 +363,4 @@ function X(e, t, n) {
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
export {
|
|
366
|
+
export { K as component };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { knowledgeEntryQuery as e, knowledgeQuery as t } from "../../../api/queries.js";
|
|
2
|
+
import { redirect as n } from "../../../lib/router.js";
|
|
3
3
|
// src/routes/$workspace/knowledge/$term.tsx?tsr-split=loader
|
|
4
4
|
var r = async ({ context: { queryClient: r }, params: { workspace: i, term: a } }) => {
|
|
5
|
-
let [o] = await Promise.all([r.ensureQueryData(
|
|
6
|
-
if (o.slug && o.slug !== a) throw
|
|
5
|
+
let [o] = await Promise.all([r.ensureQueryData(e(i, a)), r.ensureQueryData(t(i))]);
|
|
6
|
+
if (o.slug && o.slug !== a) throw n({
|
|
7
7
|
to: "/$workspace/knowledge/$term",
|
|
8
8
|
params: {
|
|
9
9
|
workspace: i,
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { knowledgeQuery as e } from "../../../api/queries.js";
|
|
2
|
+
import { kinds as t, termRef as n } from "../../../lib/knowledgeKinds.js";
|
|
3
|
+
import { rememberSearch as r } from "../../../lib/listSearch.js";
|
|
4
|
+
import { isEntryAt as i } from "../../../lib/refs.js";
|
|
5
|
+
import { redirect as a } from "../../../lib/router.js";
|
|
6
6
|
import { createFileRoute as o, lazyFn as s, lazyRouteComponent as c } from "@tanstack/react-router";
|
|
7
7
|
var l = o("/$workspace/knowledge/")({
|
|
8
8
|
validateSearch: (e) => ({
|
|
9
9
|
...typeof e.entry == "string" && { entry: e.entry },
|
|
10
10
|
...(e.archived === !0 || e.archived === "true") && { archived: !0 },
|
|
11
|
-
...
|
|
11
|
+
...t.includes(e.kind) && { kind: e.kind }
|
|
12
12
|
}),
|
|
13
|
-
beforeLoad: async ({ context: { queryClient:
|
|
13
|
+
beforeLoad: async ({ context: { queryClient: t }, params: o, search: { entry: s, ...c }, location: l, preload: u }) => {
|
|
14
14
|
if (s) {
|
|
15
|
-
let
|
|
16
|
-
throw
|
|
15
|
+
let r = (await t.ensureQueryData(e(o.workspace))).find((e) => i(e, s));
|
|
16
|
+
throw a({
|
|
17
17
|
to: "/$workspace/knowledge/$term",
|
|
18
18
|
params: {
|
|
19
19
|
workspace: o.workspace,
|
|
20
|
-
term:
|
|
20
|
+
term: r ? n(r) : s
|
|
21
21
|
},
|
|
22
22
|
replace: !0
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
let d =
|
|
26
|
-
if (d) throw
|
|
25
|
+
let d = r(l.pathname, c, u);
|
|
26
|
+
if (d) throw a({
|
|
27
27
|
to: "/$workspace/knowledge",
|
|
28
28
|
params: o,
|
|
29
29
|
search: d,
|