@parallelworks/tandem-web 0.171.1 → 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/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 +39 -39
- 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/assignees.js +3 -3
- 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
package/pages/areas.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
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 {
|
|
1
|
+
import { areasQuery as e, countsQuery as t, docsQuery as n, inboxQuery as r, teamsQuery as i, unfiledQuery as a, workspaceQuery as o } from "../api/queries.js";
|
|
2
|
+
import { AreaLink as s } from "../components/AreaLink.js";
|
|
3
|
+
import { AreaTile as c, AreaTiles as l, PlaceTile as u } from "../components/AreaTiles.js";
|
|
4
|
+
import { AreaGroup as d, FoldedAnswer as f } from "../components/AreaWork.js";
|
|
5
|
+
import { DocIcon as p } from "../components/DocIcon.js";
|
|
6
|
+
import { EntityIcon as m } from "../components/EntityIcon.js";
|
|
7
|
+
import { AddIcon as h, AreaIcon as g, ChevronRightIcon as _, FileTextIcon as v, GridIcon as y, ListViewIcon as b } from "../components/icons.js";
|
|
8
|
+
import { WorkCounts as x } from "../components/WorkCounts.js";
|
|
9
|
+
import { useAreaActions as S } from "../lib/areas.js";
|
|
10
|
+
import { actorAvatar as C } from "../lib/avatar.js";
|
|
11
|
+
import { docRef as w } from "../lib/docs.js";
|
|
12
|
+
import { usePageTitle as T } from "../lib/pageTitle.js";
|
|
13
|
+
import { usePeople as E } from "../lib/people.js";
|
|
14
|
+
import { Link as D } from "../lib/router.js";
|
|
15
15
|
import { Avatar as O, Breadcrumbs as k, Button as A, Combobox as ee, EmptyState as j, ErrorText as M, IconButton as N, Input as P, Modal as F, ModalTitle as te, SegmentedControl as I, Select as L, Tooltip as R, buttonClasses as z, menuDivider as B, useOpenMenu as V } from "@parallelworks/ui";
|
|
16
16
|
import { useParams as H, useSearch as U } from "@tanstack/react-router";
|
|
17
17
|
import { Fragment as W, useMemo as G, useState as K } from "react";
|
|
@@ -23,32 +23,32 @@ import { MoreButton as ne } from "@parallelworks/ui/list";
|
|
|
23
23
|
// src/pages/areas.tsx
|
|
24
24
|
var re = (...e) => e.filter(Boolean).join(" ");
|
|
25
25
|
function ie() {
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
let
|
|
26
|
+
let n = J("areas"), { workspace: r, key: s } = H({ strict: !1 }), { team: c = s } = U({ strict: !1 }), { data: l } = $(e(r)), { data: u } = $(i(r)), p = u.find((e) => e.key === c);
|
|
27
|
+
T(n("title"), p?.name);
|
|
28
|
+
let _ = p ? l.filter((e) => e.teamId === p.id) : l, { data: v } = $(o(r)), { data: S } = $(t(r)), [C, w] = K(null), { data: E } = Q(a(r, p?.key)), D = E?.notInDocs.length ?? 0, O = _.filter((e) => e.status === "proposed"), k = [...!p && l.some((e) => !e.teamId) ? [{
|
|
29
29
|
id: "",
|
|
30
30
|
key: "workspace",
|
|
31
|
-
name:
|
|
32
|
-
icon:
|
|
33
|
-
color:
|
|
34
|
-
}] : [], ...
|
|
31
|
+
name: v.name,
|
|
32
|
+
icon: v.icon,
|
|
33
|
+
color: v.color
|
|
34
|
+
}] : [], ...u.filter((e) => !e.archivedAt && (!p || e.id === p.id)).map((e) => ({
|
|
35
35
|
id: e.id,
|
|
36
36
|
key: e.key,
|
|
37
37
|
name: e.name,
|
|
38
38
|
icon: e.icon,
|
|
39
39
|
color: e.color,
|
|
40
40
|
team: e
|
|
41
|
-
}))], ee = (e) => k.find((t) => t.id === (e.teamId ?? "")), M = () =>
|
|
41
|
+
}))], ee = (e) => k.find((t) => t.id === (e.teamId ?? "")), M = () => w({
|
|
42
42
|
kind: "create",
|
|
43
|
-
...
|
|
44
|
-
}), P = de(
|
|
43
|
+
...p && { space: p.key }
|
|
44
|
+
}), P = de(r, (e) => w({
|
|
45
45
|
kind: "edit",
|
|
46
46
|
area: e
|
|
47
|
-
}), (e) =>
|
|
47
|
+
}), (e) => w({
|
|
48
48
|
kind: "create",
|
|
49
49
|
parent: e
|
|
50
|
-
})), [F, te] = K(se), L =
|
|
51
|
-
workspace:
|
|
50
|
+
})), [F, te] = K(se), L = E && /* @__PURE__ */ X(Y, { children: E.notInDocs.map((e) => /* @__PURE__ */ X(f, {
|
|
51
|
+
workspace: r,
|
|
52
52
|
decision: e,
|
|
53
53
|
isNew: !1,
|
|
54
54
|
notInDocs: !0
|
|
@@ -61,21 +61,21 @@ function ie() {
|
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ X("h1", {
|
|
63
63
|
className: "text-sm font-semibold",
|
|
64
|
-
children:
|
|
64
|
+
children: p ? n("teamTitle", { team: p.name }) : n("title")
|
|
65
65
|
}),
|
|
66
66
|
/* @__PURE__ */ X("span", {
|
|
67
67
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
68
|
-
children:
|
|
68
|
+
children: n("count", { count: _.length })
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */ X(
|
|
71
|
-
counts:
|
|
72
|
-
teamId:
|
|
70
|
+
/* @__PURE__ */ X(x, {
|
|
71
|
+
counts: p ? S.teams[p.id] : S.workspace,
|
|
72
|
+
teamId: p?.id,
|
|
73
73
|
className: "max-sm:hidden"
|
|
74
74
|
}),
|
|
75
75
|
/* @__PURE__ */ X("div", {
|
|
76
76
|
className: "ml-auto",
|
|
77
77
|
children: /* @__PURE__ */ X(I, {
|
|
78
|
-
label:
|
|
78
|
+
label: n("view"),
|
|
79
79
|
size: "sm",
|
|
80
80
|
value: F,
|
|
81
81
|
onValueChange: (e) => {
|
|
@@ -83,111 +83,111 @@ function ie() {
|
|
|
83
83
|
},
|
|
84
84
|
options: [{
|
|
85
85
|
value: "icons",
|
|
86
|
-
label:
|
|
87
|
-
icon: /* @__PURE__ */ X(
|
|
86
|
+
label: n("icons"),
|
|
87
|
+
icon: /* @__PURE__ */ X(y, {})
|
|
88
88
|
}, {
|
|
89
89
|
value: "list",
|
|
90
|
-
label:
|
|
91
|
-
icon: /* @__PURE__ */ X(
|
|
90
|
+
label: n("list"),
|
|
91
|
+
icon: /* @__PURE__ */ X(b, {})
|
|
92
92
|
}]
|
|
93
93
|
})
|
|
94
94
|
}),
|
|
95
95
|
/* @__PURE__ */ X(A, {
|
|
96
96
|
variant: "primary",
|
|
97
97
|
size: "sm",
|
|
98
|
-
icon: /* @__PURE__ */ X(
|
|
98
|
+
icon: /* @__PURE__ */ X(h, { className: "size-3.5" }),
|
|
99
99
|
onClick: M,
|
|
100
|
-
children:
|
|
100
|
+
children: n("new")
|
|
101
101
|
})
|
|
102
102
|
]
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ Z("div", {
|
|
105
105
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
106
106
|
children: [
|
|
107
|
-
|
|
107
|
+
_.length === 0 ? /* @__PURE__ */ X("div", {
|
|
108
108
|
className: "p-6",
|
|
109
109
|
children: /* @__PURE__ */ X(j, {
|
|
110
|
-
icon: /* @__PURE__ */ X(
|
|
111
|
-
title:
|
|
112
|
-
description:
|
|
110
|
+
icon: /* @__PURE__ */ X(g, {}),
|
|
111
|
+
title: n("none"),
|
|
112
|
+
description: n("description"),
|
|
113
113
|
action: /* @__PURE__ */ X(A, {
|
|
114
114
|
variant: "primary",
|
|
115
115
|
size: "sm",
|
|
116
116
|
onClick: M,
|
|
117
|
-
children:
|
|
117
|
+
children: n("new")
|
|
118
118
|
})
|
|
119
119
|
})
|
|
120
|
-
}) : /* @__PURE__ */ Z(Y, { children: [O.length > 0 && /* @__PURE__ */ X(
|
|
121
|
-
title:
|
|
120
|
+
}) : /* @__PURE__ */ Z(Y, { children: [O.length > 0 && /* @__PURE__ */ X(d, {
|
|
121
|
+
title: n("toReview"),
|
|
122
122
|
count: O.length,
|
|
123
|
-
icon: /* @__PURE__ */ X(
|
|
123
|
+
icon: /* @__PURE__ */ X(g, { className: "size-4 text-warning" }),
|
|
124
124
|
children: O.map((e) => /* @__PURE__ */ X(pe, {
|
|
125
|
-
workspace:
|
|
125
|
+
workspace: r,
|
|
126
126
|
area: e,
|
|
127
|
-
counts:
|
|
128
|
-
siblings:
|
|
127
|
+
counts: S.areas[e.id],
|
|
128
|
+
siblings: _.filter((t) => (t.teamId ?? "") === (e.teamId ?? "")),
|
|
129
129
|
depth: 0,
|
|
130
130
|
review: ee(e)?.name,
|
|
131
131
|
areaMenu: P
|
|
132
132
|
}, e.id))
|
|
133
133
|
}), F === "icons" ? /* @__PURE__ */ X(ue, {
|
|
134
|
-
workspace:
|
|
134
|
+
workspace: r,
|
|
135
135
|
spaces: k,
|
|
136
|
-
areas:
|
|
137
|
-
unfiledCount:
|
|
136
|
+
areas: _,
|
|
137
|
+
unfiledCount: D,
|
|
138
138
|
unfiledRows: L,
|
|
139
139
|
areaMenu: P,
|
|
140
|
-
onCreate:
|
|
141
|
-
},
|
|
142
|
-
let
|
|
143
|
-
return /* @__PURE__ */ X(
|
|
140
|
+
onCreate: w
|
|
141
|
+
}, p?.id ?? "") : k.map((e) => {
|
|
142
|
+
let t = _.filter((t) => (t.teamId ?? "") === e.id);
|
|
143
|
+
return /* @__PURE__ */ X(d, {
|
|
144
144
|
title: e.name,
|
|
145
|
-
count:
|
|
146
|
-
icon: /* @__PURE__ */ X(
|
|
145
|
+
count: t.length,
|
|
146
|
+
icon: /* @__PURE__ */ X(m, {
|
|
147
147
|
icon: e.icon,
|
|
148
148
|
color: e.color,
|
|
149
149
|
name: e.name
|
|
150
150
|
}),
|
|
151
|
-
extra: e.team && /* @__PURE__ */ X(
|
|
152
|
-
counts:
|
|
151
|
+
extra: e.team && /* @__PURE__ */ X(x, {
|
|
152
|
+
counts: S.teams[e.team.id],
|
|
153
153
|
teamId: e.team.id,
|
|
154
154
|
className: "max-sm:hidden"
|
|
155
155
|
}),
|
|
156
156
|
action: e.team && /* @__PURE__ */ X(N, {
|
|
157
157
|
variant: "ghost",
|
|
158
158
|
size: "xs",
|
|
159
|
-
icon: /* @__PURE__ */ X(
|
|
160
|
-
label:
|
|
161
|
-
onClick: () =>
|
|
159
|
+
icon: /* @__PURE__ */ X(h, { className: "size-3.5" }),
|
|
160
|
+
label: n("newIn", { space: e.name }),
|
|
161
|
+
onClick: () => w({
|
|
162
162
|
kind: "create",
|
|
163
163
|
space: e.key
|
|
164
164
|
})
|
|
165
165
|
}),
|
|
166
166
|
children: /* @__PURE__ */ X(ae, {
|
|
167
|
-
workspace:
|
|
168
|
-
areas:
|
|
169
|
-
counts:
|
|
167
|
+
workspace: r,
|
|
168
|
+
areas: t,
|
|
169
|
+
counts: S.areas,
|
|
170
170
|
parent: void 0,
|
|
171
171
|
depth: 0,
|
|
172
172
|
areaMenu: P
|
|
173
173
|
})
|
|
174
174
|
}, e.key);
|
|
175
175
|
})] }),
|
|
176
|
-
F === "list" &&
|
|
177
|
-
title:
|
|
178
|
-
count:
|
|
179
|
-
icon: /* @__PURE__ */ X(
|
|
176
|
+
F === "list" && D > 0 && /* @__PURE__ */ X(d, {
|
|
177
|
+
title: n("unfiled"),
|
|
178
|
+
count: D,
|
|
179
|
+
icon: /* @__PURE__ */ X(g, { className: "size-4 text-muted-foreground" }),
|
|
180
180
|
children: L
|
|
181
181
|
}),
|
|
182
|
-
/* @__PURE__ */ X(me, { workspace:
|
|
182
|
+
/* @__PURE__ */ X(me, { workspace: r })
|
|
183
183
|
]
|
|
184
184
|
}),
|
|
185
|
-
|
|
186
|
-
workspace:
|
|
187
|
-
editing:
|
|
185
|
+
C && /* @__PURE__ */ X(ge, {
|
|
186
|
+
workspace: r,
|
|
187
|
+
editing: C,
|
|
188
188
|
spaces: k.filter((e) => e.team),
|
|
189
|
-
areas:
|
|
190
|
-
onClose: () =>
|
|
189
|
+
areas: l,
|
|
190
|
+
onClose: () => w(null)
|
|
191
191
|
})
|
|
192
192
|
]
|
|
193
193
|
});
|
|
@@ -223,51 +223,51 @@ function ce(e) {
|
|
|
223
223
|
} catch {}
|
|
224
224
|
}
|
|
225
225
|
var le = /* @__PURE__ */ new Map();
|
|
226
|
-
function ue({ workspace: e, spaces: t, areas: n, unfiledCount:
|
|
227
|
-
let
|
|
228
|
-
le.set(
|
|
229
|
-
},
|
|
226
|
+
function ue({ workspace: e, spaces: t, areas: n, unfiledCount: i, unfiledRows: a, areaMenu: o, onCreate: f }) {
|
|
227
|
+
let p = J("areas"), { data: _ = [] } = Q(r(e)), v = `${e}/${t.map((e) => e.id).join(",")}`, [y, b] = K(() => le.get(v) ?? null), x = (e) => {
|
|
228
|
+
le.set(v, e), b(e);
|
|
229
|
+
}, S = G(() => {
|
|
230
230
|
let e = /* @__PURE__ */ new Map();
|
|
231
|
-
for (let t of
|
|
231
|
+
for (let t of _) t.area && e.set(t.area.id, (e.get(t.area.id) ?? 0) + 1);
|
|
232
232
|
let t = (r) => (e.get(r) ?? 0) + n.filter((e) => e.parentId === r).reduce((e, n) => e + t(n.id), 0);
|
|
233
233
|
return t;
|
|
234
|
-
}, [
|
|
234
|
+
}, [_, n]), C = (e) => n.filter((t) => t.parentId === e), w = (t, n) => t.map((t) => /* @__PURE__ */ X(c, {
|
|
235
235
|
workspace: e,
|
|
236
236
|
area: t,
|
|
237
|
-
inside:
|
|
238
|
-
decisions:
|
|
237
|
+
inside: C(t.id).length,
|
|
238
|
+
decisions: S(t.id),
|
|
239
239
|
menu: () => o(t, n),
|
|
240
|
-
onOpen: (e) =>
|
|
240
|
+
onOpen: (e) => x({
|
|
241
241
|
kind: "area",
|
|
242
|
-
trail: [...
|
|
242
|
+
trail: [...y?.kind === "area" ? y.trail : [], e]
|
|
243
243
|
})
|
|
244
|
-
}, t.id)),
|
|
245
|
-
name:
|
|
246
|
-
icon: /* @__PURE__ */ X(
|
|
247
|
-
hint:
|
|
248
|
-
onOpen: () =>
|
|
244
|
+
}, t.id)), T = i > 0 && /* @__PURE__ */ X(u, {
|
|
245
|
+
name: p("unfiled"),
|
|
246
|
+
icon: /* @__PURE__ */ X(g, { className: "size-7 opacity-60" }),
|
|
247
|
+
hint: i,
|
|
248
|
+
onOpen: () => x({ kind: "unfiled" })
|
|
249
249
|
});
|
|
250
|
-
if (!
|
|
250
|
+
if (!y) return t.map((e, r) => {
|
|
251
251
|
let i = n.filter((t) => (t.teamId ?? "") === e.id);
|
|
252
|
-
return /* @__PURE__ */ X(
|
|
252
|
+
return /* @__PURE__ */ X(d, {
|
|
253
253
|
title: e.name,
|
|
254
|
-
count: i.length + (r === t.length - 1 &&
|
|
255
|
-
icon: /* @__PURE__ */ X(
|
|
254
|
+
count: i.length + (r === t.length - 1 && T ? 1 : 0),
|
|
255
|
+
icon: /* @__PURE__ */ X(m, {
|
|
256
256
|
icon: e.icon,
|
|
257
257
|
color: e.color,
|
|
258
258
|
name: e.name
|
|
259
259
|
}),
|
|
260
260
|
bare: !0,
|
|
261
|
-
children: /* @__PURE__ */ Z(
|
|
261
|
+
children: /* @__PURE__ */ Z(l, {
|
|
262
262
|
label: e.name,
|
|
263
|
-
children: [
|
|
263
|
+
children: [w(i.filter((e) => !e.parentId), i), r === t.length - 1 && T]
|
|
264
264
|
})
|
|
265
265
|
}, e.key);
|
|
266
266
|
});
|
|
267
|
-
let E =
|
|
268
|
-
label:
|
|
269
|
-
icon: /* @__PURE__ */ X(
|
|
270
|
-
}, ...
|
|
267
|
+
let E = y.kind === "area" ? y.trail.at(-1) : void 0, D = E && n.find((e) => e.id === E.id), O = D ? C(D.id) : [], A = [{
|
|
268
|
+
label: p("title"),
|
|
269
|
+
icon: /* @__PURE__ */ X(g, { className: "size-4" })
|
|
270
|
+
}, ...y.kind === "area" ? y.trail.map((e) => ({ label: n.find((t) => t.id === e.id)?.title ?? e.title })) : [{ label: p("unfiled") }]];
|
|
271
271
|
return /* @__PURE__ */ Z("section", {
|
|
272
272
|
"aria-label": A.at(-1)?.label,
|
|
273
273
|
children: [/* @__PURE__ */ Z("div", {
|
|
@@ -275,43 +275,43 @@ function ue({ workspace: e, spaces: t, areas: n, unfiledCount: r, unfiledRows: i
|
|
|
275
275
|
children: [/* @__PURE__ */ X(k, {
|
|
276
276
|
crumbs: A,
|
|
277
277
|
current: "location",
|
|
278
|
-
onSelect: (e, t) =>
|
|
279
|
-
...
|
|
280
|
-
trail:
|
|
278
|
+
onSelect: (e, t) => x(t === 0 || y.kind !== "area" ? null : {
|
|
279
|
+
...y,
|
|
280
|
+
trail: y.trail.slice(0, t)
|
|
281
281
|
}),
|
|
282
282
|
className: "min-w-0 flex-1"
|
|
283
|
-
}), D && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(
|
|
283
|
+
}), D && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(s, {
|
|
284
284
|
workspace: e,
|
|
285
285
|
area: D,
|
|
286
286
|
className: z({
|
|
287
287
|
variant: "ghost",
|
|
288
288
|
size: "xs"
|
|
289
289
|
}),
|
|
290
|
-
children:
|
|
290
|
+
children: p("openArea")
|
|
291
291
|
}), /* @__PURE__ */ X(N, {
|
|
292
292
|
variant: "ghost",
|
|
293
293
|
size: "xs",
|
|
294
|
-
icon: /* @__PURE__ */ X(
|
|
295
|
-
label:
|
|
296
|
-
onClick: () =>
|
|
294
|
+
icon: /* @__PURE__ */ X(h, { className: "size-3.5" }),
|
|
295
|
+
label: p("addInside"),
|
|
296
|
+
onClick: () => f({
|
|
297
297
|
kind: "create",
|
|
298
298
|
parent: D
|
|
299
299
|
})
|
|
300
300
|
})] })]
|
|
301
|
-
}),
|
|
301
|
+
}), y.kind === "unfiled" ? /* @__PURE__ */ X("ul", { children: a }) : O.length === 0 ? /* @__PURE__ */ X("div", {
|
|
302
302
|
className: "p-6",
|
|
303
303
|
children: /* @__PURE__ */ X(j, {
|
|
304
|
-
icon: /* @__PURE__ */ X(
|
|
305
|
-
title:
|
|
304
|
+
icon: /* @__PURE__ */ X(g, {}),
|
|
305
|
+
title: p("emptyArea")
|
|
306
306
|
})
|
|
307
|
-
}) : /* @__PURE__ */ X(
|
|
307
|
+
}) : /* @__PURE__ */ X(l, {
|
|
308
308
|
label: A.at(-1)?.label ?? "",
|
|
309
|
-
children:
|
|
309
|
+
children: w(O, O)
|
|
310
310
|
})]
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
function de(e, t, n) {
|
|
314
|
-
let r = J("areas"), i =
|
|
314
|
+
let r = J("areas"), i = S(e);
|
|
315
315
|
return (e, a) => {
|
|
316
316
|
let o = a.filter((t) => t.id !== e.id);
|
|
317
317
|
return [
|
|
@@ -348,57 +348,57 @@ function de(e, t, n) {
|
|
|
348
348
|
}
|
|
349
349
|
var fe = 20;
|
|
350
350
|
function pe({ workspace: e, area: t, counts: n, siblings: r, depth: i, review: a, areaMenu: o }) {
|
|
351
|
-
let
|
|
351
|
+
let c = J("areas"), l = J("common"), u = V(), d = S(e), f = q(), { nameOf: m, avatarOf: h } = E(e), _ = t.status === "proposed", y = () => o(t, r), b = d.accept.error ?? d.merge.error ?? d.archive.error, w = t.creator;
|
|
352
352
|
return /* @__PURE__ */ Z("li", {
|
|
353
353
|
className: "group flex min-h-10 items-center gap-2 border-b border-border/60 pr-2 hover:bg-muted/60",
|
|
354
354
|
children: [
|
|
355
|
-
/* @__PURE__ */ Z(
|
|
355
|
+
/* @__PURE__ */ Z(s, {
|
|
356
356
|
workspace: e,
|
|
357
357
|
area: t,
|
|
358
|
-
onContextMenu: (e) =>
|
|
358
|
+
onContextMenu: (e) => u(e, y()),
|
|
359
359
|
style: { paddingLeft: `calc(var(--row-start) + ${i * fe}px)` },
|
|
360
360
|
className: "flex min-w-0 flex-1 items-center gap-2 self-stretch py-2 [--row-start:1rem] md:[--row-start:1.25rem]",
|
|
361
361
|
children: [
|
|
362
|
-
t.icon ? /* @__PURE__ */ X(
|
|
362
|
+
t.icon ? /* @__PURE__ */ X(p, { icon: t.icon }) : /* @__PURE__ */ X(g, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
363
363
|
/* @__PURE__ */ X("span", {
|
|
364
364
|
className: "min-w-0 truncate text-sm font-medium",
|
|
365
365
|
children: t.title
|
|
366
366
|
}),
|
|
367
|
-
t.homeDocId && /* @__PURE__ */ X(
|
|
367
|
+
t.homeDocId && /* @__PURE__ */ X(v, {
|
|
368
368
|
className: "size-3.5 shrink-0 text-muted-foreground",
|
|
369
|
-
"aria-label":
|
|
369
|
+
"aria-label": c("hasHomeDoc")
|
|
370
370
|
}),
|
|
371
371
|
t.aliases.length > 0 && /* @__PURE__ */ X("span", {
|
|
372
372
|
className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
|
|
373
|
-
children:
|
|
373
|
+
children: c("alsoCalled", { names: t.aliases.join(", ") })
|
|
374
374
|
}),
|
|
375
375
|
a && /* @__PURE__ */ X("span", {
|
|
376
376
|
className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
|
|
377
|
-
children:
|
|
377
|
+
children: c("inSpace", { space: a })
|
|
378
378
|
})
|
|
379
379
|
]
|
|
380
380
|
}),
|
|
381
|
-
|
|
381
|
+
b && /* @__PURE__ */ X(M, {
|
|
382
382
|
inline: !0,
|
|
383
383
|
className: "shrink-0 text-xs",
|
|
384
|
-
children: f(
|
|
384
|
+
children: f(b)
|
|
385
385
|
}),
|
|
386
|
-
/* @__PURE__ */ X(
|
|
386
|
+
/* @__PURE__ */ X(x, {
|
|
387
387
|
counts: n,
|
|
388
388
|
teamId: t.teamId,
|
|
389
389
|
className: "max-sm:hidden"
|
|
390
390
|
}),
|
|
391
391
|
_ && !a && /* @__PURE__ */ X("span", {
|
|
392
392
|
className: "shrink-0 rounded border border-warning/60 px-1.5 py-0.5 text-[11px] leading-none text-warning",
|
|
393
|
-
children:
|
|
393
|
+
children: c("proposed")
|
|
394
394
|
}),
|
|
395
395
|
a && w && /* @__PURE__ */ X(R, {
|
|
396
|
-
content:
|
|
396
|
+
content: c("proposedBy", { name: m(w.kind, w.handle) }),
|
|
397
397
|
describesAnchor: !0,
|
|
398
398
|
children: /* @__PURE__ */ Z("span", {
|
|
399
399
|
className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground max-sm:hidden",
|
|
400
400
|
children: [/* @__PURE__ */ X(O, {
|
|
401
|
-
...
|
|
401
|
+
...C(w.kind),
|
|
402
402
|
name: m(w.kind, w.handle),
|
|
403
403
|
src: h(w.kind, w.handle),
|
|
404
404
|
size: "xs",
|
|
@@ -413,24 +413,24 @@ function pe({ workspace: e, area: t, counts: n, siblings: r, depth: i, review: a
|
|
|
413
413
|
a && /* @__PURE__ */ X(A, {
|
|
414
414
|
variant: "outline",
|
|
415
415
|
size: "xs",
|
|
416
|
-
loading:
|
|
417
|
-
onClick: () =>
|
|
418
|
-
children:
|
|
416
|
+
loading: d.accept.isPending,
|
|
417
|
+
onClick: () => d.accept.mutate(t.key),
|
|
418
|
+
children: c("accept")
|
|
419
419
|
}),
|
|
420
420
|
/* @__PURE__ */ X(ne, {
|
|
421
|
-
items:
|
|
422
|
-
label:
|
|
421
|
+
items: y,
|
|
422
|
+
label: l("moreActionsFor", { name: t.title })
|
|
423
423
|
})
|
|
424
424
|
]
|
|
425
425
|
});
|
|
426
426
|
}
|
|
427
|
-
function me({ workspace:
|
|
428
|
-
let
|
|
429
|
-
...
|
|
427
|
+
function me({ workspace: t }) {
|
|
428
|
+
let n = J("areas"), r = S(t), [i, a] = K(!1), { data: o = [], isPending: s } = Q({
|
|
429
|
+
...e(t, !0),
|
|
430
430
|
enabled: i
|
|
431
431
|
});
|
|
432
432
|
return /* @__PURE__ */ Z("section", {
|
|
433
|
-
"aria-label":
|
|
433
|
+
"aria-label": n("archived"),
|
|
434
434
|
children: [/* @__PURE__ */ X("h2", {
|
|
435
435
|
className: "border-b border-border",
|
|
436
436
|
children: /* @__PURE__ */ Z("button", {
|
|
@@ -439,8 +439,8 @@ function me({ workspace: e }) {
|
|
|
439
439
|
"aria-expanded": i,
|
|
440
440
|
className: "flex h-9 w-full items-center gap-2 px-4 text-xs font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground md:px-5",
|
|
441
441
|
children: [
|
|
442
|
-
/* @__PURE__ */ X(
|
|
443
|
-
|
|
442
|
+
/* @__PURE__ */ X(_, { className: re("size-3.5 transition-transform", i && "rotate-90") }),
|
|
443
|
+
n("archived"),
|
|
444
444
|
i && !s && /* @__PURE__ */ X("span", {
|
|
445
445
|
className: "tabular-nums",
|
|
446
446
|
children: o.length
|
|
@@ -449,11 +449,11 @@ function me({ workspace: e }) {
|
|
|
449
449
|
})
|
|
450
450
|
}), i && !s && (o.length === 0 ? /* @__PURE__ */ X("p", {
|
|
451
451
|
className: "border-b border-border/60 px-4 py-2.5 pl-10 text-xs text-muted-foreground md:pl-11",
|
|
452
|
-
children:
|
|
452
|
+
children: n("noArchived")
|
|
453
453
|
}) : /* @__PURE__ */ X("ul", { children: o.map((e) => /* @__PURE__ */ Z("li", {
|
|
454
454
|
className: "flex min-h-10 items-center gap-2 border-b border-border/60 py-1.5 pr-2 pl-4 text-muted-foreground md:pl-5",
|
|
455
455
|
children: [
|
|
456
|
-
/* @__PURE__ */ X(
|
|
456
|
+
/* @__PURE__ */ X(g, { className: "size-4 shrink-0" }),
|
|
457
457
|
/* @__PURE__ */ X("span", {
|
|
458
458
|
className: "min-w-0 truncate text-sm",
|
|
459
459
|
children: e.title
|
|
@@ -467,7 +467,7 @@ function me({ workspace: e }) {
|
|
|
467
467
|
size: "xs",
|
|
468
468
|
loading: r.restore.isPending && r.restore.variables === e.key,
|
|
469
469
|
onClick: () => r.restore.mutate(e.key),
|
|
470
|
-
children:
|
|
470
|
+
children: n("restore")
|
|
471
471
|
}),
|
|
472
472
|
/* @__PURE__ */ X("span", {
|
|
473
473
|
"aria-hidden": !0,
|
|
@@ -478,65 +478,65 @@ function me({ workspace: e }) {
|
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
var he = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
|
|
481
|
-
function ge({ workspace: e, editing:
|
|
482
|
-
let
|
|
483
|
-
...
|
|
484
|
-
enabled: I || !!
|
|
485
|
-
}), B = j ? z.find((e) => e.key === j) : z.find((e) => e.id ===
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
]), Y =
|
|
481
|
+
function ge({ workspace: e, editing: t, spaces: r, areas: i, onClose: a }) {
|
|
482
|
+
let o = J("areas"), s = J("common"), c = q(), l = S(e), u = t.kind === "edit" ? t.area : void 0, d = t.kind === "create" ? t.parent : void 0, [f, p] = K(u?.title ?? ""), [m, h] = K(u?.key ?? ""), [g, _] = K(!!u), [y, b] = K((u?.aliases ?? []).join(", ")), x = t.kind === "create" && t.space || r.find((e) => e.id === (u?.teamId ?? d?.teamId ?? ""))?.key || r[0]?.key || "", [C, T] = K(x), E = r.find((e) => e.key === C)?.id ?? "", [O, k] = K(d?.key ?? i.find((e) => e.id === u?.parentId)?.key ?? ""), [j, N] = K(""), [I, R] = K(!1), { data: z = [] } = Q({
|
|
483
|
+
...n(e),
|
|
484
|
+
enabled: I || !!u?.homeDocId
|
|
485
|
+
}), B = j ? z.find((e) => e.key === j) : z.find((e) => e.id === u?.homeDocId), V = !u || u.status === "proposed", H = l.create.isPending || l.update.isPending, U = l.create.error ?? l.update.error, W = G(() => i.filter((e) => (e.teamId ?? "") === E && e.id !== u?.id), [
|
|
486
|
+
i,
|
|
487
|
+
E,
|
|
488
|
+
u?.id
|
|
489
|
+
]), Y = y.split(",").map((e) => e.trim()).filter(Boolean);
|
|
490
490
|
return /* @__PURE__ */ X(F, {
|
|
491
491
|
open: !0,
|
|
492
|
-
onClose:
|
|
492
|
+
onClose: a,
|
|
493
493
|
className: "max-h-[85vh] w-full max-w-md overflow-y-auto p-5",
|
|
494
494
|
children: /* @__PURE__ */ Z("form", {
|
|
495
495
|
onSubmit: (e) => {
|
|
496
|
-
e.preventDefault(),
|
|
497
|
-
area:
|
|
496
|
+
e.preventDefault(), u ? l.update.mutate({
|
|
497
|
+
area: u.key,
|
|
498
498
|
body: {
|
|
499
|
-
title:
|
|
499
|
+
title: f,
|
|
500
500
|
aliases: Y,
|
|
501
|
-
...V &&
|
|
502
|
-
...O !== (
|
|
501
|
+
...V && m !== u.key && { key: m },
|
|
502
|
+
...O !== (i.find((e) => e.id === u.parentId)?.key ?? "") && { parent: O },
|
|
503
503
|
...j && { homeDoc: j }
|
|
504
504
|
}
|
|
505
|
-
}, { onSuccess:
|
|
506
|
-
key:
|
|
507
|
-
title:
|
|
505
|
+
}, { onSuccess: a }) : l.create.mutate({
|
|
506
|
+
key: m,
|
|
507
|
+
title: f,
|
|
508
508
|
aliases: Y,
|
|
509
|
-
space:
|
|
509
|
+
space: C,
|
|
510
510
|
...O && { parent: O },
|
|
511
511
|
...j && { homeDoc: j }
|
|
512
|
-
}, { onSuccess:
|
|
512
|
+
}, { onSuccess: a });
|
|
513
513
|
},
|
|
514
514
|
children: [
|
|
515
515
|
/* @__PURE__ */ X(te, {
|
|
516
516
|
className: "text-sm font-semibold",
|
|
517
|
-
children:
|
|
517
|
+
children: o(u ? "editTitle" : "newTitle")
|
|
518
518
|
}),
|
|
519
519
|
/* @__PURE__ */ Z("label", {
|
|
520
520
|
className: "mt-4 block text-xs font-medium text-muted-foreground",
|
|
521
|
-
children: [
|
|
522
|
-
value:
|
|
521
|
+
children: [o("fieldTitle"), /* @__PURE__ */ X(P, {
|
|
522
|
+
value: f,
|
|
523
523
|
onChange: (e) => {
|
|
524
|
-
|
|
524
|
+
p(e.target.value), g || h(he(e.target.value));
|
|
525
525
|
},
|
|
526
526
|
required: !0,
|
|
527
527
|
maxLength: 100,
|
|
528
|
-
placeholder:
|
|
528
|
+
placeholder: o("titlePlaceholder"),
|
|
529
529
|
className: "mt-1"
|
|
530
530
|
})]
|
|
531
531
|
}),
|
|
532
532
|
/* @__PURE__ */ Z("label", {
|
|
533
533
|
className: "mt-3 block text-xs font-medium text-muted-foreground",
|
|
534
534
|
children: [
|
|
535
|
-
|
|
535
|
+
o("fieldKey"),
|
|
536
536
|
/* @__PURE__ */ X(P, {
|
|
537
|
-
value:
|
|
537
|
+
value: m,
|
|
538
538
|
onChange: (e) => {
|
|
539
|
-
|
|
539
|
+
_(!0), h(e.target.value.toLowerCase());
|
|
540
540
|
},
|
|
541
541
|
disabled: !V,
|
|
542
542
|
required: !0,
|
|
@@ -546,53 +546,53 @@ function ge({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
|
|
|
546
546
|
}),
|
|
547
547
|
/* @__PURE__ */ X("span", {
|
|
548
548
|
className: "mt-1 block font-normal",
|
|
549
|
-
children:
|
|
549
|
+
children: o(V ? "keyHint" : "keyFixed")
|
|
550
550
|
})
|
|
551
551
|
]
|
|
552
552
|
}),
|
|
553
553
|
/* @__PURE__ */ Z("label", {
|
|
554
554
|
className: "mt-3 block text-xs font-medium text-muted-foreground",
|
|
555
|
-
children: [
|
|
556
|
-
value:
|
|
557
|
-
onChange: (e) =>
|
|
558
|
-
placeholder:
|
|
555
|
+
children: [o("fieldAliases"), /* @__PURE__ */ X(P, {
|
|
556
|
+
value: y,
|
|
557
|
+
onChange: (e) => b(e.target.value),
|
|
558
|
+
placeholder: o("aliasesPlaceholder"),
|
|
559
559
|
className: "mt-1"
|
|
560
560
|
})]
|
|
561
561
|
}),
|
|
562
562
|
/* @__PURE__ */ Z("div", {
|
|
563
563
|
className: "mt-3 flex flex-wrap gap-3",
|
|
564
|
-
children: [!
|
|
564
|
+
children: [!u && !d && /* @__PURE__ */ Z("div", {
|
|
565
565
|
className: "text-xs font-medium text-muted-foreground",
|
|
566
|
-
children: [
|
|
566
|
+
children: [o("fieldSpace"), /* @__PURE__ */ X("div", {
|
|
567
567
|
className: "mt-1",
|
|
568
568
|
children: /* @__PURE__ */ X(L, {
|
|
569
|
-
value:
|
|
569
|
+
value: C,
|
|
570
570
|
items: r.map((e) => ({
|
|
571
571
|
value: e.key,
|
|
572
572
|
label: e.name
|
|
573
573
|
})),
|
|
574
574
|
onValueChange: (e) => {
|
|
575
|
-
|
|
575
|
+
T(e), k("");
|
|
576
576
|
},
|
|
577
|
-
"aria-label":
|
|
577
|
+
"aria-label": o("fieldSpace"),
|
|
578
578
|
width: "content"
|
|
579
579
|
})
|
|
580
580
|
})]
|
|
581
581
|
}), /* @__PURE__ */ Z("div", {
|
|
582
582
|
className: "text-xs font-medium text-muted-foreground",
|
|
583
|
-
children: [
|
|
583
|
+
children: [o("fieldParent"), /* @__PURE__ */ X("div", {
|
|
584
584
|
className: "mt-1",
|
|
585
585
|
children: /* @__PURE__ */ X(L, {
|
|
586
586
|
value: O,
|
|
587
587
|
items: [{
|
|
588
588
|
value: "",
|
|
589
|
-
label:
|
|
589
|
+
label: o("top")
|
|
590
590
|
}, ...W.map((e) => ({
|
|
591
591
|
value: e.key,
|
|
592
592
|
label: e.title
|
|
593
593
|
}))],
|
|
594
594
|
onValueChange: (e) => k(e),
|
|
595
|
-
"aria-label":
|
|
595
|
+
"aria-label": o("fieldParent"),
|
|
596
596
|
width: "content"
|
|
597
597
|
})
|
|
598
598
|
})]
|
|
@@ -600,7 +600,7 @@ function ge({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
|
|
|
600
600
|
}),
|
|
601
601
|
/* @__PURE__ */ Z("div", {
|
|
602
602
|
className: "mt-3 text-xs font-medium text-muted-foreground",
|
|
603
|
-
children: [
|
|
603
|
+
children: [o("fieldHomeDoc"), /* @__PURE__ */ Z("div", {
|
|
604
604
|
className: "mt-1",
|
|
605
605
|
children: [/* @__PURE__ */ X(ee, {
|
|
606
606
|
open: I,
|
|
@@ -608,48 +608,48 @@ function ge({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
|
|
|
608
608
|
items: z.map((e) => ({
|
|
609
609
|
value: e.key,
|
|
610
610
|
label: e.title,
|
|
611
|
-
icon: /* @__PURE__ */ X(
|
|
611
|
+
icon: /* @__PURE__ */ X(v, { className: "size-3.5" })
|
|
612
612
|
})),
|
|
613
613
|
value: B?.key ?? null,
|
|
614
614
|
onValueChange: (e) => e !== null && N(e),
|
|
615
|
-
placeholder:
|
|
616
|
-
"aria-label":
|
|
615
|
+
placeholder: o("chooseDoc"),
|
|
616
|
+
"aria-label": o("fieldHomeDoc"),
|
|
617
617
|
trigger: /* @__PURE__ */ Z(A, {
|
|
618
618
|
type: "button",
|
|
619
619
|
className: "max-w-full font-normal",
|
|
620
|
-
children: [/* @__PURE__ */ X(
|
|
620
|
+
children: [/* @__PURE__ */ X(v, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ X("span", {
|
|
621
621
|
className: "truncate",
|
|
622
|
-
children: B?.title ??
|
|
622
|
+
children: B?.title ?? o("noDoc")
|
|
623
623
|
})]
|
|
624
624
|
})
|
|
625
|
-
}), B && /* @__PURE__ */ X(
|
|
625
|
+
}), B && /* @__PURE__ */ X(D, {
|
|
626
626
|
to: "/$workspace/docs/$doc",
|
|
627
627
|
params: {
|
|
628
628
|
workspace: e,
|
|
629
|
-
doc:
|
|
629
|
+
doc: w(B)
|
|
630
630
|
},
|
|
631
631
|
className: "ml-2 text-xs font-normal text-primary hover:underline",
|
|
632
|
-
children:
|
|
632
|
+
children: o("openDoc")
|
|
633
633
|
})]
|
|
634
634
|
})]
|
|
635
635
|
}),
|
|
636
636
|
U && /* @__PURE__ */ X(M, {
|
|
637
637
|
size: "md",
|
|
638
638
|
className: "mt-3",
|
|
639
|
-
children:
|
|
639
|
+
children: c(U)
|
|
640
640
|
}),
|
|
641
641
|
/* @__PURE__ */ Z("div", {
|
|
642
642
|
className: "mt-5 flex justify-end gap-2",
|
|
643
643
|
children: [/* @__PURE__ */ X(A, {
|
|
644
644
|
type: "button",
|
|
645
|
-
onClick:
|
|
646
|
-
children:
|
|
645
|
+
onClick: a,
|
|
646
|
+
children: s("cancel")
|
|
647
647
|
}), /* @__PURE__ */ X(A, {
|
|
648
648
|
type: "submit",
|
|
649
649
|
variant: "primary",
|
|
650
|
-
disabled: !
|
|
650
|
+
disabled: !f.trim() || !m,
|
|
651
651
|
loading: H,
|
|
652
|
-
children:
|
|
652
|
+
children: u ? s("save") : o("create")
|
|
653
653
|
})]
|
|
654
654
|
})
|
|
655
655
|
]
|